I know that I can go into Settings–>Users & Sharing, and click on each individual user to see which libraries I’m sharing with them, but is there a way I can do this at the library level? I want to be able to click on a library and see every user that the library is currently being shared with instead of having to click on 30 users one at a time to see if a particular library is shared or not.
Thanks SE56, viewing all of the play history is definitely a way to see if a particular user has ever played something in a particular library or not, but if they have access to a particular library but have never played anything in it, I don’t believe it would show up here. I’m looking for a quick way to see everyone that a particular library is shared with regardless if they’ve ever played something in it or not. (Currently, I have to go user by user.) Thanks for showing me this though. I use Tautulli for all of my play activity so had never really drilled down to this before within Plex. Appreciate it!
Gave it a try from the command prompt in Windows 10 but it looks like it didn’t like some of the import statements…I’ll keep messing with it:
C:\python>python plex_api_share.py --help
Traceback (most recent call last):
File “plex_api_share.py”, line 102, in
from plexapi.server import PlexServer, CONFIG
ModuleNotFoundError: No module named ‘plexapi’
You’re running the script with Python 3.x and it’s written with 2.7. Sorry for all the hoops for a simple request. Quick edit and pushed. Download the file and try again.
Oh boi. So since all you’re looking for is the library shares switch Line 291 from True to False.
if plex.myPlexSubscription is True:
# to
if plex.myPlexSubscription is False:
What is happening is that the script tries to load as much information as possible to be able to use it for choices in the arguments. So you couldn’t input an invalid choice like library name or user name when using the other features the script offers.
The problem you’re seeing is that it’s trying to pull all the ratings available since you have Plex Pass. There is an issue with pulling the ratings, could be your Plex Pass is a subscription and the data or endpoint is different than LifeTime Pass or there is an invalid rating or something else completely. So the quick and dirty solution to get what you initially wanted, just make the script skip this check for ratings. The simple edit above should do that.
Without the edit I would assume that using python plex_api_share.py -h would result in the same error.
woo hoo that did it! I do have a LifeTime Pass so it must be something else…but changing this caused it to display “No Plex Pass moving on…” and then it listed each library and the assigned users which is EXACTLY what I was looking for!
Thank you so much for all of your help! I sincerely appreciate it!!!
P.S. Yes you were absolutely correct, the -h argument was giving the exact same error until I modified the script to: if plex.myPlexSubscription is False
Also something interesting, I notice it doesn’t show any library where me as the admin user is the only user that has access…only if I’ve shared it with at least one other user does it show up in the script results…which is cool…so if I have a library called Movies-Private and I only temporarily share it with a few users, I can run this script to remember who those users were, individually remove access, and then the library should disappear completely from the script results. Cool! Thanks again!
Missing Admin from libraries listing is correct as Admin cannot be restricted in any way.
Check out some of the other features for the script. You can bulk add or remove access to libraries, create backups of your share settings, restore settings from backups, and make changes to users content restrictions, once the API server is functioning properly again and flip False back to True . There are a couple examples at the top of the script.
Also check out the rest of that repository. Contact info is here if you ever have a question or problem.