[Accepted] Folder Whitelisting

If you have a suggestion for a feature, post it here
Post Reply
fhaq
Posts: 3
Joined: Mon Oct 21, 2013 10:45 am

[Accepted] Folder Whitelisting

Post by fhaq »

I'm putting in a suggestion for folder white listing. ie This ip xxx.xxx.xxx.xx1 receives all folders while xxx.xxx.xxx.xx2 only receives folders kids_shows, cartoons, pg13_movies, ect. (unless anyone has a way to already do this). Lets face it, the kids don't need access to all the media.
User avatar
DeFlanko
Posts: 724
Joined: Thu Jun 21, 2012 3:43 am
Location: San Pedro, CA
Contact:

[Suggestion] Folder Whitelisting

Post by DeFlanko »

Honestly its a good idea as i have a little one on the way and the only other way i can think of doing this would be to run two instances of UMS (but then they would be named the same and it might be conflicting).

I would call this something like Content filtering based on your folder selection to a media renderer or IP.
:thumbup:
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: Folder White listing

Post by SharkHunter »

I had mad something close to this way back in some old SHB release. In Channels I even added pin-code on various folders. The drawback there is a) punching in codes using the remote sucks b) once unlocked it's unlocked.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
User avatar
DeFlanko
Posts: 724
Joined: Thu Jun 21, 2012 3:43 am
Location: San Pedro, CA
Contact:

Re: Folder White listing

Post by DeFlanko »

SharkHunter wrote:I had mad something close to this way back in some old SHB release. In Channels I even added pin-code on various folders. The drawback there is a) punching in codes using the remote sucks b) once unlocked it's unlocked.
There is no way to code in a timer after so many minutes reactivate?
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: Folder White listing

Post by SharkHunter »

Everything is possible. I'll try and readd this functionality.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
User avatar
DeFlanko
Posts: 724
Joined: Thu Jun 21, 2012 3:43 am
Location: San Pedro, CA
Contact:

Re: Folder White listing

Post by DeFlanko »

Thank you sir!
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: [Accepted] Folder Whitelisting

Post by SharkHunter »

I've added this here https://github.com/UniversalMediaServer ... 8b5b109b23.
A small note on how it wroks.

To your UMS.conf (currently no GUI options) you add lines of format
tag.option = value
where tag is either an IP address or a render name. The render name should with spaces changed to _ instead.
The option is one of
  • folders
  • vfolders
  • plugins
  • web
  • recent
  • new_media
  • hide_set
The value is option dependent. The last 4 are boolean values. for folders and vfolders it is a list of folders. for plugins it's a list of allowed plugins

Example

folders =
hide_video_settings = false
192.168.1.1.folders = c:\\child_safe
192.168.1.1.plugins = SafePlugin
192.168.1.1.hide_set = true
192.168.1.1.recent = true

This will for IP address 192.168.1.1:
1) Share the folder c:\child_safe
2) Only allow it to use plugin SafePlugin
3) Hide the Server Settings folder
4) Hide the Recently played list

All other renders will use the "global" settings ie. see all folders, and the ServerSettings and all Plugins.

Note that the plugin list (a comma separated list) is which plugins are ALLOWED and case sensitive. To allow all plugins except on you have to list all except the one that shouldn't be there
(If you have plugins A,B,C,D and want to allow access to A,C,D the add 192.168.1.1.plugins = A,C,D).

If an option is not present it will fallback to the "global" config or if that isn't present to the default value..
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: [Accepted] Folder Whitelisting

Post by SharkHunter »

This feature is now added to 3.1.0. There is no GUI option (since it is to complicated for that) so you'll need to add the stuff to your UMS.conf. As an extra twist you can add a file called UMS.deny to the same dir as your UMS.conf and to that file add add
tag.[name|file|sys]=regex
For each folder/file that should be added UMS will apply the regexp to the name,filename or system name and if the regexp matches the folder/file will NOT be added.
For example
192.168.1.1.name=*.private.*
will remove all folders/files which has the word private in it.
192.168.1.1.file=c:\\tst.*
will remove all files that have c:\tst in there path
etc.

If no rule in the deny file matches the file/folder is added.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
Post Reply