Lock for Plex Google Chrome App




This is brilliant :)

https://forums.plex.tv/topic/46225-very-popular-parental-controls/ - im sure 724 people will be happy from this thread

I have tested and it works on my platforms

Windows 8

Plex web

Plex iOS iphone/ipad

Samsung Plex app ( reports a error but still locks/unlocks folders - need to exit app and restart to take effect)

Attached are some screenshots of it working via the plex iOS app

![post-117256-0-78300500-1409044547.png|333x500](upload://jT5D1QZ41ZKV7u0mOFWbu29SKFb.png)     ![post-117256-0-47197500-1409044550.png|333x500](upload://bbaB33H0r9aLlD6lTUfj9lx8eW2.png)

![post-117256-0-22372600-1409044950.png|333x500](upload://7DTV54rcEvf4qjKOjqBTJDqL5kv.png)     ![post-117256-0-66132100-1409044552.png|333x500](upload://brEBWURGFzRQnjzNXdVmvfPmLzG.png)


Where to add password in plex web to unlock sections



Great , when do you expect to support Linux / FreeBSD ? 





I'm getting "This channel is not responding" when clicking on "Lock". I have moved my Plex Media Server folder to a different location, but I edited the .bat files to point to the new location. Still, I suspect that may have something to do with it. Is it possible to use this with a non-default Plex Media Server folder location?




At this time only the default location will work.

Since your looking under the hood, look at the "__init__.py" file in Lock.bundle>contents>code and change the paths for BASEPATHLOCK and BASEPATHUNLOCK, you should be good to go ; )

Okay, I made the change and I get the "Section Successfully Locked" message with no prompt to run the bat file. The section doesn't appear to be locked, so I'm not getting any errors but it still isn't working. Oh well, thanks for help anyway!




Are the lock.sql and unlock.sql files in the same folder as the .bat files? along with sqlite3?!

Anyway, let me know if you need more help!

Sent from my iPhone using Tapatalk

Yep, they're all in there. I'm going to try disabling UAC and see if that helps...

Edit: Nope, disabling UAC didn't help. Can I just run the bat file directly?






Double click the lock.bat file and check if the section locks/hides!?
Then try to double click the unlock.bat

Only other thing I can think of if the above does not work is the database path in the .bat file is incorrect letmekno

Sent from my iPhone using Tapatalk

Database path was correct. Double-clicking on the bat file actually caused the section I was trying to lock to disappear completely (probably something I did). Luckily I was able to restore from the automated backup and everything is back to normal.




This plugin generator actually removes data from the sqllite db and stores the data in a file in the generated plugin.

I prefer an approach where I leave most of the data in the sqllite db. This approach that does not remove data, but filters the data:

To Setup:

create table private_sections (id int);

alter table library_sections add column IsPublic bool default 1;

To enable:

alter table library_sections rename to real_library_sections;

create view library_sections as select * from real_library_sections where IsPublic=1;

To Hide:

update real_library_sections set IsPublic=0 where id in ( select id from private_sections);

update metadata_items set added_at='null' where id in (select id from private_sections);

To Unhide:

update real_library_sections set IsPublic=1 where id in (select id from private_sections)

To uninstall:

drop view library_sections;

alter table real_library_sections rename to library_sections;




One suggestion, take it or leave it:

Once it's unlocked, only unlock for X hours, then automatically relock.

No parent can remember to re-lock it every time, and exactly the kinds of situations where something else is the priority are the same situations where the kids are up first the next morning.








Let me start by saying thank you for your hard work!

I just tried this out on Windows 7.  The .BAT files seem to work perfectly locking and unlocking the section. However when I use the channel I get the success notification, but the section does not lock or unlock.  This using the IOS app and the web client.

One note, I do not get the windows security popup as written in step 3 of your instructions.  I also do not have UAC on.

I manually ran the batch files and sqlite3.exe to check off the windows 7 dialog that did not appear, but this didn't change anything.

Any ideas?