From 5bf7925585739193c6a6e11cb41de039889bcb1f Mon Sep 17 00:00:00 2001 From: blacktwin Date: Sun, 14 Jun 2020 15:48:20 -0400 Subject: [PATCH] #226 add check for user's existing shares. If no shares, print out "user has no shares" thanks @RXWatcher --- utility/plex_api_share.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utility/plex_api_share.py b/utility/plex_api_share.py index 143b533..f09a09e 100644 --- a/utility/plex_api_share.py +++ b/utility/plex_api_share.py @@ -457,8 +457,10 @@ if __name__ == "__main__": kill_session(user, kill) time.sleep(3) unshare(user, sections_lst) - elif opts.unshare: + elif opts.unshare and user_shares_lst: unshare(user, sections_lst) + elif opts.unshare and not user_shares_lst: + print('{} has no libraries shared...'.format(user)) elif kill: kill_session(user, kill)