Issues with configuring virtual folders

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
iCEQB
Posts: 2
Joined: Sun Feb 16, 2020 5:25 am

Issues with configuring virtual folders

Post by iCEQB »

Hey everybody,

I was looking around the web for an alternative for SimpleDLNA. I have very low requirements for a DLNA Server and SimpleDLNA did everything I asked for. The problem I have with SimpleDLNA is that it's outdated, has a memory leak and is not maintained by the author since 2016.

What I want from a DLNA Server is the ability to create root categories / instances / folders that I can name however I want (for example "Movies" and "Shows") and configure several paths for each category.

So for example:

Code: Select all

----- Movies
  |
  |--- C:\Movies
  |           |
  |           |--- All Subfolders
  |
  |--- D:\Movies
              |
              |--- All Subfolders
With UMS I believe I found a fitting alternative for SimpleDLNA that allows me to do this with it's virtual folder functionality - but I'm having issues with the configuration.

I am able to create the virtual folders and I can see them on my TV, but there doesn't seem to be any content available in them. Could it be that it doesn't scan all subfolders of the configured paths?

My folder structures look like this:

C:\Shows\Show1\Season 1\*.mkv

And in my VirtualFolders.conf I passed "C:\Shows" as one path, but it it doesn't display any show names.

Another issue I have is the removal of the default Windows folders. In the GUI I can remove 2 of the 3 default folders, but once I remove the third, UMS displays them all again after a restart. This seems to be the intended behaviour according to the UMS.conf which saddens me - I don't want these folders to be scanned / listed :(
I can remove them all if I specify another folder, but this is not how I want to use UMS.
In my opinion, users should have the choice to deactivate this functionality or override it in case virtual folders are configured.

I hope you guys can help me fix these issues. I can't be the only one on this planet who uses DLNA like this :D

Thanks and regards,
iCEQB
User avatar
mik_s
Moderator
Posts: 1141
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Issues with configuring virtual folders

Post by mik_s »

I managed to get virtual folders set up to combine files from accross several drives into a couple of folders in UMS. I did have trouble setting the paths correctly as all slashes have to be doubled up like "C:\\Shows\\" (might be / instead if \ though, not at home atm so can't check my config) I don't know why but there must be a technical reason, sonething about java syntax I think.

Use the example virtual folder as a guide but from memory should look something like this, but is probably incorrect. :?

Code: Select all

	{"Movies";
		{"C:\\movies\\","D:\\more movies\\","E:\\even more movies\\"}
	};
	{"Shows";
		{"C:\\shows\\","D:\\my shows\\","F:\\Wifes shows\\"}
	};	
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Issues with configuring virtual folders

Post by Nadahar »

The reason for the double backslashes is the "format" which is called Java Properties files. They aren't UTF-8, so all non ASCII (or really non Latin1 I think) characters must be written in the form "\uxxxx". Because of this, and the fact that you can specify special characters like newline as "\n", means that "\" has a special meaning. The backslash is the so-called "escape character". As is often the case, the escape character itself must be escaped for it to be represented as a "literal character" instead of just the escape character. As a consequence, all "\" characters must be written "\\".

This means that to be able to enter a Windows UNC path for example (which always starts with "\\"), you must actually write "\\\\". But, it gets worse. Some places in the configuration files you can use regular expressions. Regular expressions also use "\" as the escape character, if you want to specify a backslash inside a regular expression in such a configuration file, you must actually write "\\\\". To specify the start of a UNC path in a regular expression, you thus have to type "\\\\\\\\". Enjoy :roll:

Edit: When thinking of it, I don't think the virtual folders configuration file is a "properties file". From the excerpt posted above, it looks like JSON. Regardless, the same escape mechanism applies for JSON as for "properties files": https://www.json.org/json-en.html
Post Reply