From d1a16f2bcd2889fd5ad1de80588196b0110cf66b Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Tue, 10 Apr 2018 13:34:28 -0400 Subject: [PATCH] update getting url and token variables --- utility/sync_watch_status.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/utility/sync_watch_status.py b/utility/sync_watch_status.py index 9c3e3dc..108d65a 100644 --- a/utility/sync_watch_status.py +++ b/utility/sync_watch_status.py @@ -57,17 +57,12 @@ from plexapi.server import PlexServer PLEX_FALLBACK_URL = 'http://127.0.0.1:32400' -PLEX_FALLBACK_TOKEN = '' -PLEX_URL = os.getenv('PLEX_URL', PLEX_FALLBACK_URL) -PLEX_TOKEN = os.getenv('PLEX_TOKEN', PLEX_FALLBACK_TOKEN) - PLEX_OVERRIDE_URL = '' -PLEX_OVERRIDE_TOKEN = '' +PLEX_URL = PLEX_OVERRIDE_URL or os.getenv('PLEX_URL', PLEX_FALLBACK_URL) -if PLEX_OVERRIDE_URL: - PLEX_URL = PLEX_OVERRIDE_URL -if PLEX_OVERRIDE_TOKEN: - PLEX_TOKEN = PLEX_OVERRIDE_TOKEN +PLEX_FALLBACK_TOKEN = '' +PLEX_OVERRIDE_TOKEN = '' +PLEX_TOKEN = PLEX_OVERRIDE_URL or os.getenv('PLEX_TOKEN', PLEX_FALLBACK_TOKEN) sess = requests.Session()