From 54e1e4a8faff2541fff8aacbef21c434478cd3cd 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 --- config.ini | 9 --------- requirements.txt | 10 ---------- utility/sync_watch_status.py | 13 ++++--------- 3 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 config.ini delete mode 100644 requirements.txt diff --git a/config.ini b/config.ini deleted file mode 100644 index 00c8195..0000000 --- a/config.ini +++ /dev/null @@ -1,9 +0,0 @@ -# Specify your details to this file and most of the scripts will get it. - -[plex] -url = http://localhost:32400 -token = xxxx - -[tautulli] -url = http://localhost:8181/ -api = xxxx diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index d257d94..0000000 --- a/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -#--------------------------------------------------------- -# Potential requirements. -# pip install -r requirements.txt -#--------------------------------------------------------- -requests -plexapi -configparser -matplotlib -numpy -basemap \ No newline at end of file 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()