added support for admin account
This commit is contained in:
parent
59add7f167
commit
90738fc076
@ -68,8 +68,13 @@ plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=sess)
|
||||
|
||||
sections_lst = [x.title for x in plex.library.sections()]
|
||||
user_lst = [x.title for x in plex.myPlexAccount().users()]
|
||||
# Adding admin account name to list
|
||||
user_lst.append(plex.myPlexAccount().title)
|
||||
|
||||
def get_account(user):
|
||||
if user == plex.myPlexAccount().title:
|
||||
server = plex
|
||||
else:
|
||||
# Access Plex User's Account
|
||||
userAccount = plex.myPlexAccount().user(user)
|
||||
token = userAccount.get_token(plex.machineIdentifier)
|
||||
|
Loading…
Reference in New Issue
Block a user