Some more first run fixes

This commit is contained in:
JonnyWong16 2017-12-17 23:12:56 -08:00
parent 7cd38581a6
commit a449670667
4 changed files with 18 additions and 12 deletions

View file

@ -18,7 +18,6 @@
<link href="${http_root}css/selectize.bootstrap3.css" rel="stylesheet">
<link href="${http_root}css/opensans.min.css" rel="stylesheet">
<link href="${http_root}css/font-awesome.min.css" rel="stylesheet">
${next.headIncludes()}
<!-- Favicons -->
<link rel="icon" type="image/png" sizes="32x32" href="${http_root}images/favicon/favicon-32x32.png?v=2.0.0">
@ -164,6 +163,7 @@
<!-- Required fields but hidden -->
<div style="display: none;">
<input type="checkbox" name="first_run" id="first_run" value="1" checked>
<input type="checkbox" name="launch_browser" id="launch_browser" value="1" ${config['launch_browser']}>
<input type="checkbox" name="refresh_users_on_startup" id="refresh_users_on_startup" value="1" ${config['refresh_users_on_startup']}>
<input type="checkbox" name="refresh_libraries_on_startup" id="refresh_libraries_on_startup" value="1" ${config['refresh_libraries_on_startup']}>

View file

@ -175,8 +175,8 @@ _CONFIG_DEFINITIONS = {
'GIT_PATH': (str, 'General', ''),
'GIT_REMOTE': (str, 'General', 'origin'),
'GIT_TOKEN': (str, 'General', ''),
'GIT_USER': (str, 'General', 'tautulli'),
'GIT_REPO': (str, 'General', 'tautulli'),
'GIT_USER': (str, 'General', 'JonnyWong16'),
'GIT_REPO': (str, 'General', 'plexpy'),
'GRAPH_TYPE': (str, 'General', 'plays'),
'GRAPH_DAYS': (int, 'General', 30),
'GRAPH_MONTHS': (int, 'General', 12),
@ -873,8 +873,3 @@ class Config(object):
self.MUSIC_WATCHED_PERCENT = self.NOTIFY_WATCHED_PERCENT
self.CONFIG_VERSION == 9
if self.CONFIG_VERSION == 9:
if self.GIT_USER.lower() == 'jonnywong16':
self.GIT_USER = 'tautulli'
self.CONFIG_VERSION = 10

View file

@ -33,6 +33,7 @@ ws_reconnect = False
def start_thread():
if plexpy.CONFIG.FIRST_RUN_COMPLETE:
# Check for any existing sessions on start up
activity_pinger.check_active_sessions(ws_request=True)
# Start the websocket listener on it's own thread

View file

@ -2722,12 +2722,18 @@ class WebInterface(object):
del kwargs[use_config]
# Check if we should refresh our data
first_run = False
server_changed = False
reschedule = False
https_changed = False
refresh_libraries = False
refresh_users = False
# First run from the setup wizard
if kwargs.get('first_run'):
del kwargs['first_run']
first_run = True
# If we change any monitoring settings, make sure we reschedule tasks.
if kwargs.get('check_github') != plexpy.CONFIG.CHECK_GITHUB or \
kwargs.get('refresh_libraries_interval') != str(plexpy.CONFIG.REFRESH_LIBRARIES_INTERVAL) or \
@ -2796,6 +2802,10 @@ class WebInterface(object):
pmsconnect.get_server_friendly_name()
web_socket.reconnect()
# If first run, start websocket
if first_run:
web_socket.start_thread()
# Reconfigure scheduler if intervals changed
if reschedule:
plexpy.initialize_scheduler()