mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
Some more first run fixes
This commit is contained in:
parent
7cd38581a6
commit
a449670667
4 changed files with 18 additions and 12 deletions
|
@ -18,7 +18,6 @@
|
||||||
<link href="${http_root}css/selectize.bootstrap3.css" rel="stylesheet">
|
<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/opensans.min.css" rel="stylesheet">
|
||||||
<link href="${http_root}css/font-awesome.min.css" rel="stylesheet">
|
<link href="${http_root}css/font-awesome.min.css" rel="stylesheet">
|
||||||
${next.headIncludes()}
|
|
||||||
|
|
||||||
<!-- Favicons -->
|
<!-- Favicons -->
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="${http_root}images/favicon/favicon-32x32.png?v=2.0.0">
|
<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 -->
|
<!-- Required fields but hidden -->
|
||||||
<div style="display: none;">
|
<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="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_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']}>
|
<input type="checkbox" name="refresh_libraries_on_startup" id="refresh_libraries_on_startup" value="1" ${config['refresh_libraries_on_startup']}>
|
||||||
|
|
|
@ -175,8 +175,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'GIT_PATH': (str, 'General', ''),
|
'GIT_PATH': (str, 'General', ''),
|
||||||
'GIT_REMOTE': (str, 'General', 'origin'),
|
'GIT_REMOTE': (str, 'General', 'origin'),
|
||||||
'GIT_TOKEN': (str, 'General', ''),
|
'GIT_TOKEN': (str, 'General', ''),
|
||||||
'GIT_USER': (str, 'General', 'tautulli'),
|
'GIT_USER': (str, 'General', 'JonnyWong16'),
|
||||||
'GIT_REPO': (str, 'General', 'tautulli'),
|
'GIT_REPO': (str, 'General', 'plexpy'),
|
||||||
'GRAPH_TYPE': (str, 'General', 'plays'),
|
'GRAPH_TYPE': (str, 'General', 'plays'),
|
||||||
'GRAPH_DAYS': (int, 'General', 30),
|
'GRAPH_DAYS': (int, 'General', 30),
|
||||||
'GRAPH_MONTHS': (int, 'General', 12),
|
'GRAPH_MONTHS': (int, 'General', 12),
|
||||||
|
@ -873,8 +873,3 @@ class Config(object):
|
||||||
self.MUSIC_WATCHED_PERCENT = self.NOTIFY_WATCHED_PERCENT
|
self.MUSIC_WATCHED_PERCENT = self.NOTIFY_WATCHED_PERCENT
|
||||||
|
|
||||||
self.CONFIG_VERSION == 9
|
self.CONFIG_VERSION == 9
|
||||||
|
|
||||||
if self.CONFIG_VERSION == 9:
|
|
||||||
if self.GIT_USER.lower() == 'jonnywong16':
|
|
||||||
self.GIT_USER = 'tautulli'
|
|
||||||
self.CONFIG_VERSION = 10
|
|
|
@ -33,10 +33,11 @@ ws_reconnect = False
|
||||||
|
|
||||||
|
|
||||||
def start_thread():
|
def start_thread():
|
||||||
# Check for any existing sessions on start up
|
if plexpy.CONFIG.FIRST_RUN_COMPLETE:
|
||||||
activity_pinger.check_active_sessions(ws_request=True)
|
# Check for any existing sessions on start up
|
||||||
# Start the websocket listener on it's own thread
|
activity_pinger.check_active_sessions(ws_request=True)
|
||||||
threading.Thread(target=run).start()
|
# Start the websocket listener on it's own thread
|
||||||
|
threading.Thread(target=run).start()
|
||||||
|
|
||||||
|
|
||||||
def on_disconnect():
|
def on_disconnect():
|
||||||
|
|
|
@ -2722,12 +2722,18 @@ class WebInterface(object):
|
||||||
del kwargs[use_config]
|
del kwargs[use_config]
|
||||||
|
|
||||||
# Check if we should refresh our data
|
# Check if we should refresh our data
|
||||||
|
first_run = False
|
||||||
server_changed = False
|
server_changed = False
|
||||||
reschedule = False
|
reschedule = False
|
||||||
https_changed = False
|
https_changed = False
|
||||||
refresh_libraries = False
|
refresh_libraries = False
|
||||||
refresh_users = 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 we change any monitoring settings, make sure we reschedule tasks.
|
||||||
if kwargs.get('check_github') != plexpy.CONFIG.CHECK_GITHUB or \
|
if kwargs.get('check_github') != plexpy.CONFIG.CHECK_GITHUB or \
|
||||||
kwargs.get('refresh_libraries_interval') != str(plexpy.CONFIG.REFRESH_LIBRARIES_INTERVAL) 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()
|
pmsconnect.get_server_friendly_name()
|
||||||
web_socket.reconnect()
|
web_socket.reconnect()
|
||||||
|
|
||||||
|
# If first run, start websocket
|
||||||
|
if first_run:
|
||||||
|
web_socket.start_thread()
|
||||||
|
|
||||||
# Reconfigure scheduler if intervals changed
|
# Reconfigure scheduler if intervals changed
|
||||||
if reschedule:
|
if reschedule:
|
||||||
plexpy.initialize_scheduler()
|
plexpy.initialize_scheduler()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue