Virtual Folders

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

Re: Virtual Folders

Postby ExSport » Sun Jun 06, 2010 6:11 pm

I don't have Mac but on WIN and UNIX/Linux systems you need to add plugins and update.jar to starting command line:
Code: Select all
 javaw -Xmx1290M -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -classpath update.jar;pms.jar;plugins/*;plugins net.pms.PMS

So I suppose if it will be loaded same way also on MAC, it will work.
Possibility as a plugin will be also great.

Some requests/tips:
- When subfolder already exists in root virtual folder, merge all of them to only one (c:\movies\fun + d:\movies\fun = MOVIES\FUN - now two FUN subfolders created)
- support of virtual_folders=video\movies\english|d:\\video\\eng,e:\\video\\en,f:\\video-eng; syntax
- thumbnail fix
- plugin support
- GUI support
- etc. 8-)
Many thanks!!!
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Virtual Folders

Postby jamiecreek » Wed Jun 09, 2010 11:50 am

I wonder, would it be tricky to build in an extension to the idea of virtual folders, such that the folder scanner is able to translate shortcut files (.lnk) into their actual path and incorporate them seamlessly.

There is some discussion on resolving .lnk files in Java on the following thread that may prove useful:

http://stackoverflow.com/questions/3094 ... er-in-java

Would this be a useful extension?
jamiecreek
 
Posts: 5
Joined: Tue Jun 30, 2009 7:23 pm

Re: Virtual Folders

Postby lightglitch » Fri Jun 11, 2010 6:24 pm

Hi,

After checking all your post I decided to implement a generic solution.
I tried to implement as a plugin but there were to many problems that couldn't be fixed so I decided to patch PS3MS and to do this without
replicating code I had to reformulate a lot of code.
This is a big patch but I think it's a good implementation.

The sintax for the virtual folders tokens is json:

Code: Select all
vfolders = [{"name":"teste","files":["D:\\\\downloads","C:\\\\"],"childs":[{"name":"teste1", "files":["C:\\\\"]}]}]

Note:
  • The char "\" is escaped twice because it's the java and json escape apply to it.
  • This structure represents a tree so the childs elements can also have childs.
  • If you need validate your json use http://www.jsonlint.com/.

The gui editor is still missing.

Tell me what you think and test it because I only test it with xbmc in my laptop (not home to test it on PS3).
lightglitch a.k.a Mário Franco
lightglitch
Project Member
 
Posts: 113
Joined: Mon Jun 22, 2009 2:58 pm

Re: Virtual Folders

Postby ExSport » Fri Jun 11, 2010 9:54 pm

What "features" this code adds that there are so many changes in code?
Quite hard to understand what exactly we can expect with your update, lightglitch.
Many thanks
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Virtual Folders

Postby lightglitch » Sat Jun 12, 2010 1:45 am

ExSport wrote:What "features" this code adds that there are so many changes in code?
Quite hard to understand what exactly we can expect with your update, lightglitch.
Many thanks


With this update you have:

  • All the virtual folders you want
  • The virtual folders hierarchy you want
  • Each virtual folder can not only contain other virtual folders but also can me mapped to several physical folders (containing all their files)
  • Complete integration with the media library (useful because of cache)
  • No problems with thumbnails because it behaves like a normal folder in the current version of PS3MS
  • You can also define the folder thumbnail like in normal folder

In more technical way what I implemented was:

In current version of PS3MS exists the type RealFile that represents a single physical file (folder is just a special file) and what I needed was a type
that represented several physical files, for this I created the type MapFile.

After looking at the RealFile and VirtualFolder code I realize that the type I wanted was a mixture of both. It was a VirtualFolder but the code for handling the children was similar to the RealFile (when this represents a folder).

After some copy and paste and some changes I created my MapFile, after being done I realize the RealFile was just a special case of the type created so I change the RealFile to descend from MapFile and removed all the duplicate code.


Hope it helps to understand the changes.
lightglitch a.k.a Mário Franco
lightglitch
Project Member
 
Posts: 113
Joined: Mon Jun 22, 2009 2:58 pm

Re: Virtual Folders

Postby chocolateboy » Sat Jun 12, 2010 12:14 pm

I would still recommend going down the plugin route.

shagrath hasn't visited this forum in over a month; PMS hasn't been updated for over two months; and there are hundreds of unapplied patches on this forum and on Google Code, including documentation patches and bugfixes that ought to be no-brainers.

Also, I would suggest using a separate config file. No-one wants to be typing in millions of backslashes to set up virtual folders.
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: Virtual Folders

Postby lightglitch » Sat Jun 12, 2010 1:56 pm

chocolateboy wrote:I would still recommend going down the plugin route.

shagrath hasn't visited this forum in over a month; PMS hasn't been updated for over two months; and there are hundreds of unapplied patches on this forum and on Google Code, including documentation patches and bugfixes that ought to be no-brainers.

Also, I would suggest using a separate config file. No-one wants to be typing in millions of backslashes to set up virtual folders.


The plugin way is not possible because the way some stuff is implemented in PS3MS.

About the config in a separate file that can be done easy.
lightglitch a.k.a Mário Franco
lightglitch
Project Member
 
Posts: 113
Joined: Mon Jun 22, 2009 2:58 pm

Re: Virtual Folders

Postby chocolateboy » Sat Jun 12, 2010 2:13 pm

lightglitch wrote:The plugin way is not possible because the way some stuff is implemented in PS3MS.


I can't see anything in the patch that can't be done in a plugin. Did you follow the links? You might also want to take a look at this thread.
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: Virtual Folders

Postby squadjot » Sat Jun 12, 2010 6:47 pm

From scratch.. how do a newbie try this.. how to install...step by step plase :P
User avatar
squadjot
 
Posts: 243
Joined: Thu Mar 25, 2010 10:03 pm

Re: Virtual Folders

Postby majorwest » Tue Jul 13, 2010 3:39 am

So how exactly is this implemented??

I've downloaded the update jar.zip file to my pms folder and unzipped it. Not sure what to do next...

Btw, I got "access denied" msgs on a few files during the extract process...license.txt, and a couple other dll files.
majorwest
 
Posts: 6
Joined: Mon Nov 09, 2009 3:11 am

PreviousNext

Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests