mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-16 04:55:38 +00:00
use config where applicable
This commit is contained in:
parent
2258b21b2c
commit
a9d2225de0
@ -6,6 +6,7 @@ Requires: requests, plexapi, python3.6+
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from requests import Session
|
from requests import Session
|
||||||
|
from plexapi.server import CONFIG
|
||||||
from json.decoder import JSONDecodeError
|
from json.decoder import JSONDecodeError
|
||||||
from plexapi.myplex import MyPlexAccount
|
from plexapi.myplex import MyPlexAccount
|
||||||
|
|
||||||
@ -19,6 +20,13 @@ PLEX_PASSWORD = ''
|
|||||||
BACKUP_DB = True
|
BACKUP_DB = True
|
||||||
|
|
||||||
# Do not edit past this line #
|
# Do not edit past this line #
|
||||||
|
|
||||||
|
# Grab config vars if not set in script
|
||||||
|
TAUTULLI_URL = TAUTULLI_URL or CONFIG.data['auth'].get('tautulli_baseurl')
|
||||||
|
TAUTULLI_API_KEY = TAUTULLI_API_KEY or CONFIG.data['auth'].get('tautulli_apikey')
|
||||||
|
PLEX_USERNAME = PLEX_USERNAME or CONFIG.data['auth'].get('myplex_username')
|
||||||
|
PLEX_PASSWORD = PLEX_PASSWORD or CONFIG.data['auth'].get('myplex_password')
|
||||||
|
|
||||||
account = MyPlexAccount(PLEX_USERNAME, PLEX_PASSWORD)
|
account = MyPlexAccount(PLEX_USERNAME, PLEX_PASSWORD)
|
||||||
|
|
||||||
session = Session()
|
session = Session()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user