From 71c2208fee8944e0ff23040c6c6299dea74dbd09 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Sat, 8 Feb 2020 13:12:30 -0500 Subject: [PATCH] Now works with Python 3.7 error found by slayerinokc in Plex Forums --- utility/plex_api_share.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utility/plex_api_share.py b/utility/plex_api_share.py index 1c76a97..e97a266 100644 --- a/utility/plex_api_share.py +++ b/utility/plex_api_share.py @@ -132,7 +132,7 @@ if sess.verify is False: plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=sess) user_lst = {x.title: x.email if x.email else x.title for x in plex.myPlexAccount().users() if x.title} -user_choices = list(set(user_lst.values() + user_lst.keys())) +user_choices = list(set(user_lst.values())) + list(user_lst.keys()) sections_lst = [x.title for x in plex.library.sections()] movies_keys = [x.key for x in plex.library.sections() if x.type == 'movie'] show_keys = [x.key for x in plex.library.sections() if x.type == 'show'] @@ -401,6 +401,7 @@ if __name__ == "__main__": for section, users in section_users.items(): print("{} is shared to the following users:\n {}\n".format(section, ", ".join(users))) + exit() # Share, Unshare, Kill, Add, or Remove for user in users: