From b5c40b29d28223d356d85a354f2831e3859de10c Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Fri, 9 Nov 2018 01:33:47 -0500 Subject: [PATCH] allow user arg for backup --- utility/plex_api_share.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utility/plex_api_share.py b/utility/plex_api_share.py index d20139b..08978da 100644 --- a/utility/plex_api_share.py +++ b/utility/plex_api_share.py @@ -64,6 +64,9 @@ Usage: plex_api_share.py --backup - Backup all user shares to a json file + + plex_api_share.py --backup --user USER + - Backup USER shares to a json file plex_api_share.py --restore - Only restore all Plex user's shares and settings from backup json file @@ -425,7 +428,10 @@ if __name__ == "__main__": if opts.backup: print('Backing up share information...') users_shares = [] - for user in user_lst: + # If user arg is defined then abide, else backup all + if not users: + users = user_lst + for user in users: # print('...Found {}'.format(user)) users_shares.append(find_shares(user)) json_file = '{}_Plex_share_backup_{}.json'.format(plex.friendlyName, timestr)