Virtual Folders

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

Re: Virtual Folders

Postby chocolateboy » Sat Oct 16, 2010 1:03 am

It would be nice if you could specify the location in the DLNA tree of each virtual folder e.g.

Code: Select all
[
    {
       "name": "Movies", // root folder
       "files": [ "/path/to/Movies1", "/path/to/Movies2" ]
    },
    {
       "name": "/Media/TV", // TV appears under the Media folder
       "files": [ "/path/to/TV1", "/path/to/TV2" ]
    }
]


Also: why do you need the @ sign?

Code: Select all
vfolders = @vfolders.json


And, someone (I guess me) should mention the fact that the "children" field is optional.

Oh, and thanks to everyone who's contributed! It works well. :D
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: Virtual Folders

Postby lightglitch » Sat Oct 16, 2010 12:57 pm

chocolateboy wrote:It would be nice if you could specify the location in the DLNA tree of each virtual folder e.g.

Code: Select all
[
    {
       "name": "Movies", // root folder
       "files": [ "/path/to/Movies1", "/path/to/Movies2" ]
    },
    {
       "name": "/Media/TV", // TV appears under the Media folder
       "files": [ "/path/to/TV1", "/path/to/TV2" ]
    }
]



You can by using the children, the structure is a recursive tree. You can specify all the levels that you want.

chocolateboy wrote:Also: why do you need the @ sign?

Code: Select all
vfolders = @vfolders.json



That's because you can set the vfolders configuration inline and I needed a token to know if it's inline or in a file.
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 Oct 16, 2010 6:12 pm

lightglitch wrote:You can by using the children, the structure is a recursive tree. You can specify all the levels that you want.


That's a nice feature, but it creates duplicates rather than merging folders with the same name. It still works well, but it requires the filesystem to be reordered somewhat.
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: Virtual Folders

Postby lightglitch » Sun Oct 17, 2010 1:36 am

chocolateboy wrote:
lightglitch wrote:You can by using the children, the structure is a recursive tree. You can specify all the levels that you want.


That's a nice feature, but it creates duplicates rather than merging folders with the same name. It still works well, but it requires the filesystem to be reordered somewhat.


I don't understand how it creates duplicates, can you put your configuration here?
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 » Sun Oct 17, 2010 1:47 am

PMS.conf

Code: Select all
folders = \/path\/to\/media
vfolders = @vfolders.json


vfolders.json

Code: Select all
[
    {
        "name": "media",
        "children": [
            {
                "name": "Movies",
                files: [
                    "/path/to/Movies 1",
                    "/path/to/Movies 2",
                ]
            }
        ]
    }
]


This creates a second top-level folder called media (containing the merged Movies folder), instead of adding Movies to the original top-level media folder.
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: Virtual Folders

Postby lightglitch » Sun Oct 17, 2010 2:22 am

Ok, now I understand. The best option to solve that would be make the normal folders parameter disappear because virtual folders includes normal folders functionality but because I didn't implemented gui I decided to maintain both.
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 » Sun Oct 17, 2010 2:24 am

Fair enough. Thanks.
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: Virtual Folders

Postby DerMega » Sat Dec 25, 2010 5:36 pm

Hi,

@first: Great Job!! I appreciate what you do here.
The virtual folder plugin is what I needet.

I took the community Beta from here : viewtopic.php?f=14&t=7844&p=36961#p36961
The installation was no problem. But I can´t figure out how this vfolder addon works.
I created the vfolder.json file an adde the "vfolders = @vfolders.json" line in PMS.conf but it won´t work.

vfolder.json:
Code: Select all
[
    {
       "name":"Serien all",
       "files":["E:\\Serien","I:\\Serien 2"]
    }
]


Any ideas to this?
DerMega
 
Posts: 1
Joined: Sat Dec 25, 2010 5:30 pm

Re: Virtual Folders

Postby lightglitch » Sat Dec 25, 2010 5:56 pm

DerMega wrote:I created the vfolder.json file an adde the "vfolders = @vfolders.json" line in PMS.conf but it won´t work.
Any ideas to this?


Do you have the names correct because in your post you don't.
Do you have any errors in the debug log? What is your system configuration?
lightglitch a.k.a Mário Franco
lightglitch
Project Member
 
Posts: 113
Joined: Mon Jun 22, 2009 2:58 pm

Re: Virtual Folders

Postby coryj » Mon Jan 03, 2011 9:08 pm

I am running the latest community build (December 17 version)...

I set up a test and it worked one time, but now all that it shows are the folders that I set to share through the GUI... is there anything I need to do/not do in the GUI or other settings to make this work?

I am just trying to set up a test, and like I said, it worked correctly once but then disappeared for good after I changed a setting and restarted the service.

PMS.conf
Code: Select all
vfolders = @vfolders.json
thumbnails = true
network_interface = eth4
hostname = 10.0.0.79

vfolders.json
Code: Select all
[
    {
       "name":"Movies",
       "files":["Y:\\Movies","Z:\\Movies"]
    }
]
coryj
 
Posts: 6
Joined: Tue Mar 02, 2010 9:36 pm

PreviousNext

Return to Developers

Who is online

Users browsing this forum: No registered users and 3 guests