Commit d79c6032 authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/9.2.61'

parents 7c1a4359 f2d7dc6a
# Changelog
- * 2fc0e9b - 2017-12-10: Release v9.2.57
- * a264d26 - 2017-12-10: Release v9.2.61
- * 656a038 - 2017-12-10: Overall stats now only displayed for main shows page, helps reduce overhead
- * 75fa296 - 2017-12-10: Release v9.2.57
- * 6c4534b - 2017-12-10: Fixed TorrentRSSFeed issues
- * f376394 - 2017-12-10: Refactored Full Update function to now update/overwrite existing metadata
- * 9596e8c - 2017-12-10: Updated git ignore file
......
......@@ -60,7 +60,7 @@ from sickrage.core.helpers import argToBool, backupSR, chmodAsParent, findCertai
getDiskSpaceUsage, makeDir, readFileBuffered, \
remove_article, restoreConfigZip, \
sanitizeFileName, clean_url, try_int, torrent_webui_url, checkbox_to_value, clean_host, \
clean_hosts
clean_hosts, overall_stats
from sickrage.core.helpers.browser import foldersAtPath
from sickrage.core.helpers.compat import cmp
from sickrage.core.helpers.srdatetime import srDateTime
......@@ -185,6 +185,7 @@ class BaseHandler(RequestHandler):
'numWarnings': len(WarningViewer.errors),
'srStartTime': self.startTime,
'makoStartTime': time.time(),
'overall_stats': None,
'torrent_webui_url': torrent_webui_url(),
'application': self.application,
'request': self.request,
......@@ -641,15 +642,16 @@ class Home(WebHandler):
else:
showlists['Shows'] = sickrage.app.showlist
stats = self.show_statistics()
show_stats = self.show_statistics()
return self.render(
"/home/index.mako",
title="Home",
header="Show List",
topmenu="home",
showlists=showlists,
show_stat=stats[0],
max_download_count=stats[1],
show_stat=show_stats[0],
max_download_count=show_stats[1],
overall_stats=overall_stats(),
controller='home',
action='index'
)
......
......@@ -6,7 +6,7 @@
import sickrage
from sickrage.core.updaters import tz_updater
from sickrage.core.helpers import pretty_filesize, overall_stats, memory_usage
from sickrage.core.helpers import pretty_filesize, memory_usage
%>
<!DOCTYPE html>
<html>
......@@ -430,36 +430,38 @@
% if current_user:
<div class="row">
<div class="footer text-center clearfix col-lg-10 col-lg-offset-1 col-md-10 col-md-offset-1 col-sm-12 col-xs-12">
<%
stats = overall_stats()
total_size = pretty_filesize(stats['total_size'])
ep_downloaded = stats['episodes']['downloaded']
ep_snatched = stats['episodes']['snatched']
ep_total = stats['episodes']['total']
ep_percentage = '' if ep_total == 0 else '(<span class="footer-highlight">%s%%</span>)' % re.sub(r'(\d+)(\.\d)\d+', r'\1\2', str((float(ep_downloaded)/float(ep_total))*100))
%>
<div>
<span class="footer-highlight">${stats['shows']['total']}</span> ${_('Shows')} (<span
class="footer-highlight">${stats['shows']['active']}</span> ${_('Active')})
| <span class="footer-highlight">${ep_downloaded}</span>
% if overall_stats:
<%
total_size = pretty_filesize(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="footer-highlight">%s%%</span>)' % re.sub(r'(\d+)(\.\d)\d+', r'\1\2', str((float(ep_downloaded)/float(ep_total))*100))
%>
<span class="footer-highlight">${overall_stats['shows']['total']}</span> ${_('Shows')} (<span
class="footer-highlight">${overall_stats['shows']['active']}</span> ${_('Active')})
| <span class="footer-highlight">${ep_downloaded}</span>
% if ep_snatched:
<span class="footer-highlight">
<a href="${srWebRoot}/manage/episodeStatuses?whichStatus=2">+${ep_snatched}</a>
</span>
<a href="${srWebRoot}/manage/episodeStatuses?whichStatus=2">+${ep_snatched}</a>
</span>
${_('Snatched')}
% endif
&nbsp;/&nbsp;<span
class="footer-highlight">${ep_total}</span> ${_('Episodes Downloaded')} ${ep_percentage}
&nbsp;/&nbsp;<span class="footer-highlight">${total_size}</span> ${_('Overall Downloaded')}
| ${_('Daily Search:')} <span
class="footer-highlight">${str(sickrage.app.scheduler.get_job('DAILYSEARCHER').next_run_time).split('.')[0]}</span>
| ${_('Backlog Search:')} <span
class="footer-highlight">${str(sickrage.app.scheduler.get_job('BACKLOG').next_run_time).split('.')[0]}</span>
&nbsp;/&nbsp;<span
class="footer-highlight">${ep_total}</span> ${_('Episodes Downloaded')} ${ep_percentage}
&nbsp;/&nbsp;<span class="footer-highlight">${total_size}</span> ${_('Overall Downloaded')}
% endif
</div>
<div>
${_('Daily Search:')} <span
class="footer-highlight">${str(sickrage.app.scheduler.get_job('DAILYSEARCHER').next_run_time).split('.')[0]}</span>
|
${_('Backlog Search:')} <span
class="footer-highlight">${str(sickrage.app.scheduler.get_job('BACKLOG').next_run_time).split('.')[0]}</span>
|
${_('Memory used:')}
<span class="footer-highlight">
${memory_usage()}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Supports Markdown
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