Commit 401e6a9f authored by echel0n's avatar echel0n

Added lazy loading to main shows page, reduces page load times.

parent 749ed1b5
......@@ -4284,7 +4284,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -4699,7 +4700,8 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -4755,6 +4757,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -4798,12 +4801,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......@@ -5791,6 +5796,16 @@
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
"dev": true
},
"infinite-scroll": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/infinite-scroll/-/infinite-scroll-3.0.6.tgz",
"integrity": "sha512-679gpKlS/XuAnA+spIRNFSel1dsZ44ljKVlkWHVNTtibJR0cUIC3jwZaBQUsaR1TvPFnaQijRlS8Q/lPgx1VAA==",
"dev": true,
"requires": {
"ev-emitter": "^1.1.0",
"fizzy-ui-utils": "^2.0.5"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
......@@ -8746,7 +8761,8 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true
"dev": true,
"optional": true
},
"gauge": {
"version": "2.6.0",
......@@ -8792,6 +8808,7 @@
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -8803,6 +8820,7 @@
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz",
"integrity": "sha1-9psZLT99keOC5Lcb3bd4eGGasMY=",
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
},
......@@ -8811,7 +8829,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz",
"integrity": "sha1-wCD1KcUoKt/dIz2R1LGBw9aG3Es=",
"dev": true
"dev": true,
"optional": true
}
}
},
......@@ -8820,6 +8839,7 @@
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
},
......@@ -8828,7 +8848,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz",
"integrity": "sha1-wCD1KcUoKt/dIz2R1LGBw9aG3Es=",
"dev": true
"dev": true,
"optional": true
}
}
}
......@@ -11685,6 +11706,15 @@
}
}
},
"rechoir": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
"dev": true,
"requires": {
"resolve": "^1.1.6"
}
},
"redent": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
......@@ -12261,6 +12291,17 @@
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
},
"shelljs": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
"integrity": "sha1-p/MxlSDr8J7oEnWyNorbKGZZsJc=",
"dev": true,
"requires": {
"glob": "^7.0.0",
"interpret": "^1.0.0",
"rechoir": "^0.6.2"
}
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
......
......@@ -89,8 +89,7 @@ class TVCache(object):
sickrage.app.log.warning("Authentication error: {}".format(e))
return False
except Exception as e:
sickrage.app.log.debug(
"Error while searching {}, skipping: {}".format(self.provider.name, repr(e)))
sickrage.app.log.debug("Error while searching {}, skipping: {}".format(self.provider.name, repr(e)))
return False
return True
......
......@@ -87,7 +87,6 @@ class SearchResult(object):
self.files = {}
def __str__(self):
if self.provider is None:
return "Invalid provider, unable to print self"
......
......@@ -659,8 +659,7 @@ def chmod_as_parent(child_path):
try:
os.chmod(child_path, child_mode)
sickrage.app.log.debug(
"Setting permissions for %s to %o as parent directory has %o" % (child_path, child_mode, parent_mode))
sickrage.app.log.debug("Setting permissions for %s to %o as parent directory has %o" % (child_path, child_mode, parent_mode))
except OSError:
sickrage.app.log.debug("Failed to set permission for %s to %o" % (child_path, child_mode))
......
......@@ -134,7 +134,7 @@ class SearchQueue(SRQueue):
return
if not len(sickrage.app.search_providers.enabled()):
sickrage.app.log.warning("Search Failed, No NZB/Torrent providers enabled")
# sickrage.app.log.warning("Search Failed, No NZB/Torrent providers enabled")
return
if isinstance(item, DailySearchQueueItem):
......
......@@ -62,7 +62,7 @@ from sickrage.core.webserver.handlers.home import HomeHandler, IsAliveHandler, T
DeleteShowHandler, RefreshShowHandler, UpdateShowHandler, SubtitleShowHandler, UpdateKODIHandler, UpdatePLEXHandler, \
UpdateEMBYHandler, SyncTraktHandler, DeleteEpisodeHandler, SetStatusHandler, TestRenameHandler, DoRenameHandler, \
SearchEpisodeHandler, GetManualSearchStatusHandler, SearchEpisodeSubtitlesHandler, \
SetSceneNumberingHandler
SetSceneNumberingHandler, LoadShowsHandler
from sickrage.core.webserver.handlers.home.add_shows import HomeAddShowsHandler, SearchIndexersForShowNameHandler, \
MassAddTableHandler, NewShowHandler, TraktShowsHandler, PopularShowsHandler, AddShowToBlacklistHandler, \
ExistingShowsHandler, AddShowByIDHandler, AddNewShowHandler, AddExistingShowsHandler
......@@ -243,6 +243,7 @@ class WebServer(object):
(r'%s/browser(/?)' % sickrage.app.config.web_root, WebFileBrowserHandler),
(r'%s/browser/complete(/?)' % sickrage.app.config.web_root, WebFileBrowserCompleteHandler),
(r'%s/home(/?)' % sickrage.app.config.web_root, HomeHandler),
(r'%s/home/loadShows(/?)' % sickrage.app.config.web_root, LoadShowsHandler),
(r'%s/home/is_alive(/?)' % sickrage.app.config.web_root, IsAliveHandler),
(r'%s/home/testSABnzbd(/?)' % sickrage.app.config.web_root, TestSABnzbdHandler),
(r'%s/home/testTorrent(/?)' % sickrage.app.config.web_root, TestTorrentHandler),
......
......@@ -18,13 +18,17 @@
# You should have received a copy of the GNU General Public License
# along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>.
# ##############################################################################
import calendar
import datetime
import os
import re
import time
from abc import ABC
from collections import OrderedDict
from functools import cmp_to_key
from urllib.parse import unquote_plus, quote_plus
import unidecode
from sqlalchemy import orm
from tornado import gen
from tornado.escape import json_encode
......@@ -40,10 +44,11 @@ from sickrage.core.databases.main import MainDB
from sickrage.core.exceptions import AnidbAdbaConnectionException, CantRefreshShowException, NoNFOException, \
CantUpdateShowException, CantRemoveShowException, EpisodeDeletedException, EpisodeNotFoundException, \
MultipleEpisodesInDatabaseException
from sickrage.core.helpers import clean_url, clean_host, clean_hosts, get_disk_space_usage, checkbox_to_value, try_int
from sickrage.core.helpers import clean_url, clean_host, clean_hosts, get_disk_space_usage, checkbox_to_value, try_int, srdatetime
from sickrage.core.helpers.anidb import get_release_groups_for_anime, short_group_names
from sickrage.core.helpers.srdatetime import SRDateTime
from sickrage.core.helpers.tornado_http import TornadoHTTP
from sickrage.core.media.util import showImage
from sickrage.core.queues.search import BacklogQueueItem, FailedQueueItem, ManualSearchQueueItem
from sickrage.core.scene_exceptions import get_scene_exceptions, update_scene_exceptions
from sickrage.core.scene_numbering import get_scene_numbering_for_show, get_xem_numbering_for_show, \
......@@ -87,16 +92,16 @@ class HomeHandler(BaseHandler, ABC):
return self.redirect('/home/addShows/')
showlists = OrderedDict({'Shows': []})
if sickrage.app.config.anime_split_home:
for show in get_show_list():
if show.is_anime:
if 'Anime' not in list(showlists.keys()):
showlists['Anime'] = []
showlists['Anime'] += [show]
else:
showlists['Shows'] += [show]
else:
showlists['Shows'] = get_show_list()
# if sickrage.app.config.anime_split_home:
# for show in sorted(get_show_list(), key=cmp_to_key(lambda x, y: x.name < y.name)):
# if show.is_anime:
# if 'Anime' not in list(showlists.keys()):
# showlists['Anime'] = []
# showlists['Anime'] += [show]
# else:
# showlists['Shows'] += [show]
# else:
# showlists['Shows'] = sorted(get_show_list(), key=cmp_to_key(lambda x, y: x.name < y.name))
return self.render(
"/home/index.mako",
......@@ -152,6 +157,27 @@ class HomeHandler(BaseHandler, ABC):
return show_stat, overall_stats
class LoadShowsHandler(BaseHandler, ABC):
@authenticated
async def get(self, *args, **kwargs):
layout = self.get_argument('layout', 'poster')
to_return = ""
loading_show_list_ids = [int(x['indexer_id']) for x in sickrage.app.show_queue.loading_show_list]
for show in get_show_list():
if show.indexer_id in loading_show_list_ids:
continue
if layout == 'poster':
to_return += self.render_string("/templates/show-container-grid.mako", show=show)
else:
to_return += self.render_string("/templates/show-container-list.mako", show=show)
return self.write(to_return)
class IsAliveHandler(BaseHandler, ABC):
def get(self, *args, **kwargs):
self.set_header('Content-Type', 'text/javascript')
......
......@@ -371,52 +371,52 @@
<div class="container-fluid">
% if current_user:
<footer class="text-center">
<div>
% if overall_stats:
<%
total_size = pretty_file_size(overall_stats['total_size'])
ep_downloaded = overall_stats['episodes']['downloaded']
ep_snatched = overall_stats['episodes']['snatched']
ep_total = overall_stats['episodes']['total']
ep_percentage = '' if ep_total == 0 else '(<span class="text-primary">%s%%</span>)' % re.sub(r'(\d+)(\.\d)\d+', r'\1\2', str((float(ep_downloaded)/float(ep_total))*100))
%>
<span class="text-primary">${overall_stats['shows']['total']}</span> ${_('Shows')}
(<span class="text-primary">${overall_stats['shows']['active']}</span> ${_('Active')})
| <span class="text-primary">${ep_downloaded}</span>
% if ep_snatched:
<span class="text-primary">
<a href="${srWebRoot}/manage/episodeStatuses?whichStatus=2">+${ep_snatched}</a>
</span>
${_('Snatched')}
% endif
/&nbsp;<span class="text-primary">${ep_total}</span> ${_('Episodes Downloaded')} ${ep_percentage}
/&nbsp;<span class="text-primary">${total_size}</span> ${_('Overall Downloaded')}
% endif
</div>
<div>
${_('Daily Search:')} <span
class="text-primary">${str(sickrage.app.scheduler.get_job('DAILYSEARCHER').next_run_time).split('.')[0]}</span>
|
${_('Backlog Search:')} <span
class="text-primary">${str(sickrage.app.scheduler.get_job('BACKLOG').next_run_time).split('.')[0]}</span>
|
${_('Memory used:')}
<span class="text-primary">
${memory_usage()}
</span> |
${_('Load time:')}
<span class="text-primary">
${"{:10.4f}".format(time() - srStartTime)}s
</span> / Mako:
<span class="text-primary">
${"{:10.4f}".format(time() - makoStartTime)}s
</span> |
${_('Now:')}
<span class="text-primary">
${str(datetime.datetime.now(sickrage.app.tz)).split('.')[0]}
</span>
</div>
## <div>
## % if overall_stats:
## <%
## total_size = pretty_file_size(overall_stats['total_size'])
## ep_downloaded = overall_stats['episodes']['downloaded']
## ep_snatched = overall_stats['episodes']['snatched']
## ep_total = overall_stats['episodes']['total']
## ep_percentage = '' if ep_total == 0 else '(<span class="text-primary">%s%%</span>)' % re.sub(r'(\d+)(\.\d)\d+', r'\1\2', str((float(ep_downloaded)/float(ep_total))*100))
## %>
## <span class="text-primary">${overall_stats['shows']['total']}</span> ${_('Shows')}
## (<span class="text-primary">${overall_stats['shows']['active']}</span> ${_('Active')})
## | <span class="text-primary">${ep_downloaded}</span>
## % if ep_snatched:
## <span class="text-primary">
## <a href="${srWebRoot}/manage/episodeStatuses?whichStatus=2">+${ep_snatched}</a>
## </span>
## ${_('Snatched')}
## % endif
## /&nbsp;<span class="text-primary">${ep_total}</span> ${_('Episodes Downloaded')} ${ep_percentage}
## /&nbsp;<span class="text-primary">${total_size}</span> ${_('Overall Downloaded')}
## % endif
## </div>
##
## <div>
## ${_('Daily Search:')} <span
## class="text-primary">${str(sickrage.app.scheduler.get_job('DAILYSEARCHER').next_run_time).split('.')[0]}</span>
## |
## ${_('Backlog Search:')} <span
## class="text-primary">${str(sickrage.app.scheduler.get_job('BACKLOG').next_run_time).split('.')[0]}</span>
## |
## ${_('Memory used:')}
## <span class="text-primary">
## ${memory_usage()}
## </span> |
## ${_('Load time:')}
## <span class="text-primary">
## ${"{:10.4f}".format(time() - srStartTime)}s
## </span> / Mako:
## <span class="text-primary">
## ${"{:10.4f}".format(time() - makoStartTime)}s
## </span> |
## ${_('Now:')}
## <span class="text-primary">
## ${str(datetime.datetime.now(sickrage.app.tz)).split('.')[0]}
## </span>
## </div>
</footer>
% endif
......
<%!
import re
import calendar
import unidecode
import datetime
import sickrage
from sickrage.core.helpers import srdatetime, pretty_file_size
from sickrage.core.media.util import showImage
%>
<%namespace file="../includes/quality_defaults.mako" import="renderQualityPill"/>
<%
download_stat_tip = ''
display_status = show.status
if display_status:
if re.search(r'(?i)(?:new|returning)\s*series', show.status):
display_status = _('Continuing')
elif re.search(r'(?i)(?:nded)', show.status):
display_status = _('Ended')
cur_airs_next = show.airs_next
cur_snatched = show.episodes_snatched
cur_downloaded = show.episodes_downloaded
cur_total = len(show.episodes) - show.episodes_special - show.episodes_unaired
if cur_total != 0:
download_stat = str(cur_downloaded)
download_stat_tip = _("Downloaded: ") + str(cur_downloaded)
if cur_snatched > 0:
download_stat = download_stat
download_stat_tip = download_stat_tip + " " + _("Snatched: ") + str(cur_snatched)
download_stat = download_stat + " / " + str(cur_total)
download_stat_tip = download_stat_tip + " " + _("Total: ") + str(cur_total)
else:
download_stat = '?'
download_stat_tip = _("no data")
progressbar_percent = int(cur_downloaded * 100 / cur_total if cur_total > 0 else 1)
progressbar_percent_class = "progress-{}".format('100' if progressbar_percent > 80 else '80' if progressbar_percent > 60 else '60' if progressbar_percent > 40 else '40' if progressbar_percent > 20 else '20')
data_date = '6000000000.0'
if cur_airs_next > datetime.date.min:
data_date = calendar.timegm(srdatetime.SRDateTime(sickrage.app.tz_updater.parse_date_time(cur_airs_next, show.airs, show.network), convert=True).dt.timetuple())
elif display_status:
if 'nded' not in display_status and 1 == int(show.paused):
data_date = '5000000500.0'
elif 'ontinu' in display_status:
data_date = '5000000000.0'
elif 'nded' in display_status:
data_date = '5000000100.0'
network_class_name = None
if show.network:
network_class_name = re.sub(r'(?!\w|\s).', '', unidecode.unidecode(show.network))
network_class_name = re.sub(r'\s+', '-', network_class_name)
network_class_name = re.sub(r'^(\s*)([\W\w]*)(\b\s*$)', '\\2', network_class_name)
network_class_name = network_class_name.lower()
%>
<div class="show-container" id="show${show.indexer_id}" data-name="${show.name}"
data-date="${data_date}" data-network="${show.network}"
data-progress="${progressbar_percent}">
<div class="card card-block text-white bg-dark m-1 shadow">
<a href="${srWebRoot}/home/displayShow?show=${show.indexer_id}">
<img alt="" class="card-img-top" src="${srWebRoot}${showImage(show.indexer_id, 'poster').url}"/>
</a>
<div class="card-header bg-dark py-0 px-0">
<span style="display: none;">${download_stat}</span>
<div class="bg-dark progress shadow">
<div class="progress-bar ${progressbar_percent_class} d-print-none" style="width: ${progressbar_percent}%">
<div class="progressbarText" title="${download_stat_tip}">${download_stat}</div>
</div>
</div>
</div>
<div class="card-body text-truncate py-1 px-1 small">
<div class="show-title">
${show.name}
</div>
<div class="show-date" style="color: grey">
% if cur_airs_next > datetime.date.min:
<% ldatetime = srdatetime.SRDateTime(sickrage.app.tz_updater.parse_date_time(cur_airs_next, show.airs, show.network), convert=True).dt %>
<%
try:
out = srdatetime.SRDateTime(ldatetime).srfdate()
except ValueError:
out = _('Invalid date')
%>
% else:
<% display_status = show.status %>
<%
out = 'UNKNOWN'
if display_status:
out = display_status
if 'nded' not in display_status and 1 == int(show.paused):
out = _('Paused')
%>
% endif
${out}
</div>
</div>
<div class="card-footer show-details p-1">
<table class="show-details w-100" style="height:40px">
<tr>
<td class="text-left align-middle w-25">
% if show.network:
<span>
<i class="show-network-image sickrage-network sickrage-network-${network_class_name}"
title="${show.network}"></i>
</span>
% else:
<span>
<i class="show-network-image sickrage-network sickrage-network-unknown"
title="${_('No Network')}"></i>
</span>
% endif
</td>
<td class="text-right align-middle w-25">
${renderQualityPill(show.quality, showTitle=True)}
</td>
</tr>
</table>
</div>
</div>
</div>
\ No newline at end of file
<%!
import re
import calendar
import unidecode
import datetime
from functools import cmp_to_key
import sickrage
from sickrage.core.tv.show.helpers import get_show_list
from sickrage.core.helpers import srdatetime, pretty_file_size
from sickrage.core.media.util import showImage
%>
<%namespace file="../includes/quality_defaults.mako" import="renderQualityPill"/>
<%
download_stat_tip = ''
cur_airs_next = show.airs_next
cur_airs_prev = show.airs_prev
cur_snatched = show.episodes_snatched
cur_downloaded = show.episodes_downloaded
cur_total = len(show.episodes) - show.episodes_special - show.episodes_unaired
show_size = show.total_size
if cur_total != 0:
download_stat = str(cur_downloaded)
download_stat_tip = _("Downloaded: ") + str(cur_downloaded)
if cur_snatched > 0:
download_stat = download_stat + "+" + str(cur_snatched)
download_stat_tip = download_stat_tip + "&#013;" + _("Snatched: ") + str(cur_snatched)
download_stat = download_stat + " / " + str(cur_total)
download_stat_tip = download_stat_tip + "&#013;" + _("Total: ") + str(cur_total)
else:
download_stat = '?'
download_stat_tip = _("no data")
progressbar_percent = int(cur_downloaded * 100 / cur_total if cur_total > 0 else 1)
progressbar_percent_class = "progress-{}".format('100' if progressbar_percent > 80 else '80' if progressbar_percent > 60 else '60' if progressbar_percent > 40 else '40' if progressbar_percent > 20 else '20')
network_class_name = None
if show.network:
network_class_name = re.sub(r'(?!\w|\s).', '', unidecode.unidecode(show.network))
network_class_name = re.sub(r'\s+', '-', network_class_name)
network_class_name = re.sub(r'^(\s*)([\W\w]*)(\b\s*$)', '\\2', network_class_name)
network_class_name = network_class_name.lower()
%>
<tr class="show-list-item">
% if cur_airs_next > datetime.date.min:
<% airDate = srdatetime.SRDateTime(sickrage.app.tz_updater.parse_date_time(cur_airs_next, show.airs, show.network), convert=True).dt %>
% try:
<td class="table-fit align-middle">
<time datetime="${airDate.isoformat()}"
class="date">${srdatetime.SRDateTime(airDate).srfdate()}</time>
</td>
% except ValueError:
<td class="table-fit"></td>
% endtry
% else:
<td class="table-fit"></td>
% endif
% if cur_airs_prev > datetime.date.min:
<% airDate = srdatetime.SRDateTime(sickrage.app.tz_updater.parse_date_time(cur_airs_prev, show.airs, show.network), convert=True).dt %>
% try:
<td class="table-fit align-middle">
<time datetime="${airDate.isoformat()}" class="date">
${srdatetime.SRDateTime(airDate).srfdate()}
</time>
</td>
% except ValueError:
<td class="table-fit"></td>
% endtry
% else:
<td class="table-fit"></td>
% endif
% if sickrage.app.config.home_layout == 'small':
<td class="tvShow">
<a href="${srWebRoot}/home/displayShow?show=${show.indexer_id}"
title="${show.name}">
<img src="${srWebRoot}${showImage(show.indexer_id, 'poster_thumb').url}"
class="img-smallposter rounded shadow"
alt="${show.indexer_id}"/>
${show.name}
</a>
</td>
% elif sickrage.app.config.home_layout == 'banner':
<td class="table-fit tvShow">
<span class="d-none">${show.name}</span>
<a href="${srWebRoot}/home/displayShow?show=${show.indexer_id}">
<img src="${srWebRoot}${showImage(show.indexer_id, 'banner').url}"
class="img-banner rounded shadow" alt="${show.indexer_id}"
title="${show.name}"/>
</a>
</td>
% elif sickrage.app.config.home_layout == 'simple':
<td class="tvShow">
<a href="${srWebRoot}/home/displayShow?show=${show.indexer_id}">
${show.name}
</a>
</td>
% endif
% if sickrage.app.config.home_layout != 'simple':
<td class="table-fit align-middle">
% if show.network:
<span title="${show.network}">
<i class="sickrage-network sickrage-network-${network_class_name}"></i>
</span>
<span class="d-none d-print-inline">${show.network}</span>
% else:
<span title="${_('No Network')}">
<i class="sickrage-network sickrage-network-unknown"></i>
</span>
<span class="d-none d-print-inline">No Network</span>
% endif
</td>
% else:
<td class="table-fit">
<span title="${show.network}">${show.network}</span>
</td>
% endif
<td class="table-fit align-middle">${renderQualityPill(show.quality, showTitle=True)}</td>
<td class="align-middle">
<span style="display: none;">${download_stat}</span>
<div class="bg-dark rounded shadow">
<div class="progress-bar rounded ${progressbar_percent_class}" style="width: ${progressbar_percent}%">
<div class="progressbarText" title="${download_stat_tip}">${download_stat}</div>
</div>
</div>
</td>
<td class="table-fit align-middle" data-show-size="${show_size}">
${pretty_file_size(show_size)}
</td>
<td class="table-fit align-middle">
<i class="fa ${("fa-times text-danger", "fa-check text-success")[not bool(show.paused)]}"></i>
<span class="d-none d-print-inline">${('No', 'Yes')[not bool(show.paused)]}</span>
</td>
<td class="table-fit align-middle">
% if show.status and re.search(r'(?i)(?:new|returning)\s*series', show.status):
${_('Continuing')}
% elif show.status and re.search('(?i)(?:nded)', show.status):
${_('Ended')}
% else:
${show.status}
% endif
</td>
</tr>
\ No newline at end of file
This diff is collapsed.
......@@ -515,4 +515,10 @@ input[type=checkbox].toggle {
user-select: none;
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
}
.show-container {
-webkit-transform:translate3d(0,0,0);
-moz-transform:translate3d(0,0,0);
transform:translate3d(0,0,0);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment