From dfb9382546e01f01dea29e4c73de2bc3948c4e2a Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Thu, 2 Aug 2018 16:22:10 -0400 Subject: [PATCH] obsolete use plex_api_share.py --- utility/plex_allow_sync.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 utility/plex_allow_sync.py diff --git a/utility/plex_allow_sync.py b/utility/plex_allow_sync.py deleted file mode 100644 index 9ed2b2e..0000000 --- a/utility/plex_allow_sync.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Allow syncing for users - -""" - -import requests -from plexapi.server import PlexServer - -PLEX_URL = 'http://localhost:32400' -PLEX_TOKEN = 'xxxx' -plex = PlexServer(PLEX_URL, PLEX_TOKEN) - -USER_IGNORE = ['username'] - -headers = {'X-Plex-Token': PLEX_TOKEN} -payload = {'allowSync': 1} # 1 = Allow, 0 = Not Allow - -for user in plex.myPlexAccount().users(): - if user.title not in USER_IGNORE: - r = requests.put('http://plex.tv/api/friends/{}'.format(user.id), headers=headers, params=payload)