About showing files in virtual folder

Discuss issues related to PS3 Media Server development (only for programmers)

About showing files in virtual folder

Postby wusucuma » Tue Mar 11, 2014 10:14 am

Hello.

We're a new ones about making plug-in.

And We're making a video player on Smart TV, Smartphone using PS3 media server.

Now we faced a problem about showing files in virtual folder.

Can anyone let us know how to show files in virtual folder.

We tried to solve this by ourselves but failed.

We attached the source code that mentioned.

Please help us to solve this problem.

- FTAU

Code: Select all
package com.keti.rook;

import java.io.File;
import java.util.ArrayList;

import net.pms.dlna.RealFile;
import net.pms.dlna.virtual.VirtualFolder;

public class UserFolder extends VirtualFolder {
   
   private ArrayList<VideoDAO> list;

   public UserFolder(String name, ArrayList<VideoDAO> list) {
      super(name, null);
      this.list = list;
      // TODO Auto-generated constructor stub
   }

   @Override
   public void discoverChildren() {
      // TODO Auto-generated method stub
      
      for (int i = 0; i < list.size(); i++) {
         VideoDAO dao = list.get(i);
         RookLog.info(dao.getPath()+ dao.getName());
         addChild(new RealFile(dao.getFile()));
      }
      
   }
   
   

}

wusucuma
 
Posts: 5
Joined: Fri Mar 07, 2014 12:37 am

Re: About showing files in virtual folder

Postby taconaut » Tue Mar 11, 2014 3:24 pm

Hi,
What's the actual problem? Have you been able to debug your code to make sure addChild() is being called and dao.getFile() returns a string with a valid path to an existing file?
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 1096
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: About showing files in virtual folder

Postby wusucuma » Thu Mar 13, 2014 5:39 am

Thank you for your reply.

Thanks to all your effort, we solved that problem.

But now, we got an another issue.

We want to play a video from the time we want to start so that user can play from where they watched.

So we're trying to look for 'seek time' function in the source code, but we can't.

and if we can find the function(if that function is included in PMS), can we transfer the video from that time to client?

or if that isn't in PMS, is there any possible we can make it?

Wait for your reply.

Thank you.

-FTAU
wusucuma
 
Posts: 5
Joined: Fri Mar 07, 2014 12:37 am


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest