remove config.ini mentions
This commit is contained in:
parent
12a6dd1778
commit
51a86268a6
@ -9,22 +9,12 @@ from plexapi.server import PlexServer
|
||||
import configparser
|
||||
|
||||
# EDIT THESE SETTINGS #
|
||||
PLEX_URL = '' # leave blank if using config.ini. Overrides config
|
||||
PLEX_TOKEN = '' # leave blank if using config.ini. Overrides config
|
||||
PLEX_URL = ''
|
||||
PLEX_TOKEN = ''
|
||||
|
||||
MESSAGE = 'Because....'
|
||||
# /EDIT THESE SETTINGS #
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
try:
|
||||
config.read('../config.ini')
|
||||
if not PLEX_URL:
|
||||
PLEX_URL = config.get('plex', 'url')
|
||||
if not PLEX_TOKEN:
|
||||
PLEX_TOKEN = config.get('plex', 'token')
|
||||
except configparser.NoSectionError:
|
||||
sys.exit('Error: No config and missing var values.')
|
||||
|
||||
sess = requests.Session()
|
||||
sess.verify = False
|
||||
plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=sess)
|
||||
|
Loading…
Reference in New Issue
Block a user