From 558023e18e4331ecab7254d2143909c31010d550 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 25 Oct 2020 13:07:42 -0700 Subject: [PATCH] Improve startup speed by refreshing on a separate thread --- data/interfaces/default/css/tautulli.css | 7 +- data/interfaces/default/index.html | 120 +++++++++++++---------- plexpy/__init__.py | 44 +++++---- plexpy/libraries.py | 3 +- plexpy/webserve.py | 25 +++++ 5 files changed, 122 insertions(+), 77 deletions(-) diff --git a/data/interfaces/default/css/tautulli.css b/data/interfaces/default/css/tautulli.css index f2118fab..61566265 100644 --- a/data/interfaces/default/css/tautulli.css +++ b/data/interfaces/default/css/tautulli.css @@ -750,7 +750,9 @@ a .users-poster-face:hover { position: relative; } #dashboard-checking-activity, -#dashboard-no-activity { +#dashboard-no-activity, +#dashboard-checking-recently-added, +#dashboard-no-recently-added { margin-bottom: 20px; } .dashboard-activity-instance { @@ -1446,9 +1448,6 @@ a:hover .dashboard-stats-square { -moz-box-shadow: inset 0 0 0 2px #e9a049; box-shadow: inset 0 0 0 2px #e9a049; } -#dashboard-no-recently-added { - margin-bottom: 20px; -} .dashboard-recent-media-row { width: 100%; margin: 0 auto; diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html index 8a92f4f4..2936c774 100644 --- a/data/interfaces/default/index.html +++ b/data/interfaces/default/index.html @@ -24,17 +24,13 @@
% if PLEX_SERVER_UP: -
Checking for activity...
+
  Checking for activity...
% elif config['pms_is_cloud']:
Plex Cloud server is sleeping.
% elif not config['first_run_complete']:
The Tautulli setup wizard has not been completed. Please click here to go to the setup wizard.
% else: -
There was an error communicating with your Plex Server. - % if _session['user_group'] == 'admin': - Check the logs and verify your server connection in the settings. - % endif -
+
  Tautulli is connecting to the Plex server...
% endif
@@ -65,7 +61,7 @@
-
Loading stats...
+
  Loading stats...

@@ -84,7 +80,7 @@
-
Loading stats...
+
  Loading stats...

@@ -132,17 +128,12 @@
% if PLEX_SERVER_UP: -
Looking for new items...
+
  Looking for new items...
% elif config['pms_is_cloud']:
Plex Cloud server is sleeping.
% else: -
There was an error communicating with your Plex Server. - % if _session['user_group'] == 'admin': - Check the logs and verify your server connection in the settings. - % endif -
+
  Tautulli is connecting to your Plex server...
% endif -
@@ -229,7 +220,6 @@ <%def name="javascriptIncludes()"> -<% from plexpy import PLEX_SERVER_UP %> -% if 'current_activity' in config['home_sections'] and PLEX_SERVER_UP: +% if 'current_activity' in config['home_sections']: % endif -% if 'recently_added' in config['home_sections'] and PLEX_SERVER_UP: +% if 'recently_added' in config['home_sections']: