mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Merge pull request #7 from JackDandy/feature/ChangeFooterStats
Change footer stats to not add newlines when copy/pasting.
This commit is contained in:
commit
b9a3bd30d0
3 changed files with 41 additions and 40 deletions
|
@ -1,5 +1,9 @@
|
|||
### 0.x.x (2014-11-xx xx:xx:xx UTC)
|
||||
|
||||
* Change footer stats to not add newlines when copy/pasting from them
|
||||
* Remove redundant references from Config / Help & Info
|
||||
|
||||
|
||||
### 0.3.0 (2014-11-12 14:30:00 UTC)
|
||||
|
||||
* Change logos, text etc. branding to SickGear
|
||||
|
|
|
@ -39,11 +39,11 @@
|
|||
#end if
|
||||
<font color="red">You are using BETA software</font>
|
||||
</td></tr>
|
||||
<tr><td class="infoTableHeader">SR Config file:</td><td class="infoTableCell">$sickbeard.CONFIG_FILE</td></tr>
|
||||
<tr><td class="infoTableHeader">SR Database file:</td><td class="infoTableCell">$db.dbFilename()</td></tr>
|
||||
<tr><td class="infoTableHeader">SR Cache Dir:</td><td class="infoTableCell">$sickbeard.CACHE_DIR</td></tr>
|
||||
<tr><td class="infoTableHeader">SR Arguments:</td><td class="infoTableCell">$sickbeard.MY_ARGS</td></tr>
|
||||
<tr><td class="infoTableHeader">SR Web Root:</td><td class="infoTableCell">$sickbeard.WEB_ROOT</td></tr>
|
||||
<tr><td class="infoTableHeader">Config file:</td><td class="infoTableCell">$sickbeard.CONFIG_FILE</td></tr>
|
||||
<tr><td class="infoTableHeader">Database file:</td><td class="infoTableCell">$db.dbFilename()</td></tr>
|
||||
<tr><td class="infoTableHeader">Cache Dir:</td><td class="infoTableCell">$sickbeard.CACHE_DIR</td></tr>
|
||||
<tr><td class="infoTableHeader">Arguments:</td><td class="infoTableCell">$sickbeard.MY_ARGS</td></tr>
|
||||
<tr><td class="infoTableHeader">Web Root:</td><td class="infoTableCell">$sickbeard.WEB_ROOT</td></tr>
|
||||
<tr><td class="infoTableHeader">Python Version:</td><td class="infoTableCell">$sys.version[:120]</td></tr>
|
||||
<tr class="infoTableSeperator"><td class="infoTableHeader"><i class="icon16-sb"></i> Homepage</td><td class="infoTableCell"><a href="<%= anon_url('https://github.com/SickGear/SickGear/wiki') %>" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">https://github.com/SickGear/SickGear/wiki</a></td></tr>
|
||||
<tr><td class="infoTableHeader"><i class="icon16-github"></i> Source</td><td class="infoTableCell"><a href="<%= anon_url('https://github.com/SickGear/SickGear/') %>" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">https://github.com/SickGear/SickGear/</a></td></tr>
|
||||
|
|
|
@ -3,53 +3,50 @@
|
|||
#from sickbeard import db, sbdatetime
|
||||
#from sickbeard.common import *
|
||||
|
||||
</div> <!-- /content -->
|
||||
</div> <!-- /content -->
|
||||
</div> <!-- /contentWrapper -->
|
||||
|
||||
<footer>
|
||||
<div class="footer clearfix">
|
||||
#set $myDB = $db.DBConnection()
|
||||
#set $today = str($datetime.date.today().toordinal())
|
||||
#set status_quality = '(' + ','.join([str(quality) for quality in $Quality.SNATCHED + $Quality.SNATCHED_PROPER]) + ')'
|
||||
#set status_download = '(' + ','.join([str(quality) for quality in $Quality.DOWNLOADED + [$ARCHIVED]]) + ')'
|
||||
#set $my_db = $db.DBConnection()
|
||||
#set $today = str($datetime.date.today().toordinal())
|
||||
#set status_quality = '(' + ','.join([str(quality) for quality in $Quality.SNATCHED + $Quality.SNATCHED_PROPER]) + ')'
|
||||
#set status_download = '(' + ','.join([str(quality) for quality in $Quality.DOWNLOADED + [$ARCHIVED]]) + ')'
|
||||
|
||||
#set $sql_statement = 'SELECT '
|
||||
#set $sql_statement = 'SELECT '
|
||||
|
||||
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 AND status IN ' + $status_quality + ') AS ep_snatched, '
|
||||
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 AND status IN ' + $status_download + ') AS ep_downloaded, '
|
||||
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 AND status IN ' + $status_quality + ') AS ep_snatched, '
|
||||
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 AND status IN ' + $status_download + ') AS ep_downloaded, '
|
||||
|
||||
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 '
|
||||
#set $sql_statement += ' AND ((airdate <= ' + $today + ' AND (status = ' + str($SKIPPED) + ' OR status = ' + str($WANTED) + ')) '
|
||||
#set $sql_statement += ' OR (status IN ' + status_quality + ') OR (status IN ' + status_download + '))) AS ep_total '
|
||||
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 '
|
||||
#set $sql_statement += ' AND ((airdate <= ' + $today + ' AND (status = ' + str($SKIPPED) + ' OR status = ' + str($WANTED) + ')) '
|
||||
#set $sql_statement += ' OR (status IN ' + status_quality + ') OR (status IN ' + status_download + '))) AS ep_total '
|
||||
|
||||
#set $sql_statement += ' FROM tv_episodes tv_eps LIMIT 1'
|
||||
|
||||
#set $sql_result = $myDB.select($sql_statement)
|
||||
#set $sql_statement += ' FROM tv_episodes tv_eps LIMIT 1'
|
||||
|
||||
#set $shows_total = len($sickbeard.showList)
|
||||
#set $shows_active = len([show for show in $sickbeard.showList if show.paused == 0 and show.status != "Ended"])
|
||||
#set $sql_result = $my_db.select($sql_statement)
|
||||
|
||||
#if $sql_result:
|
||||
#set $ep_snatched = $sql_result[0]['ep_snatched']
|
||||
#set $ep_downloaded = $sql_result[0]['ep_downloaded']
|
||||
#set $ep_total = $sql_result[0]['ep_total']
|
||||
#else
|
||||
#set $ep_snatched = 0
|
||||
#set $ep_downloaded = 0
|
||||
#set $ep_total = 0
|
||||
#end if
|
||||
|
||||
<div class="footerhighlight">$shows_total</div> Shows (<div class="footerhighlight">$shows_active</div> Active) | <div class="footerhighlight"><%=ep_downloaded%></div>#if $ep_snatched > 0 then " (" + "<div class=\"footerhighlight\">+" + str($ep_snatched) + "</div> snatched)" else ""# / <div class="footerhighlight">$ep_total</div> Episodes Downloaded | Daily Search: <div class="footerhighlight"><%=str(sickbeard.dailySearchScheduler.timeLeft()).split('.')[0]%></div> | Backlog Search: <div class="footerhighlight">$sbdatetime.sbdatetime.sbfdate($sickbeard.backlogSearchScheduler.nextRun())</div>
|
||||
#set $shows_total = len($sickbeard.showList)
|
||||
#set $shows_active = len([show for show in $sickbeard.showList if show.paused == 0 and show.status != "Ended"])
|
||||
|
||||
#if $sql_result:
|
||||
#set $ep_snatched = $sql_result[0]['ep_snatched']
|
||||
#set $ep_downloaded = $sql_result[0]['ep_downloaded']
|
||||
#set $ep_total = $sql_result[0]['ep_total']
|
||||
#else
|
||||
#set $ep_snatched = 0
|
||||
#set $ep_downloaded = 0
|
||||
#set $ep_total = 0
|
||||
#end if
|
||||
|
||||
<span class="footerhighlight">$shows_total</span> shows (<span class="footerhighlight">$shows_active</span> active)
|
||||
| <span class="footerhighlight"><%= ep_downloaded %></span><%= ('', ' (<span class="footerhighlight">+%s</span> snatched)' % str(ep_snatched))[ep_snatched > 0] %> / <span class="footerhighlight">$ep_total</span> episodes downloaded
|
||||
| daily search: <span class="footerhighlight"><%= str(sickbeard.dailySearchScheduler.timeLeft()).split('.')[0] %></span>
|
||||
| backlog search: <span class="footerhighlight">$sbdatetime.sbdatetime.sbfdate($sickbeard.backlogSearchScheduler.nextRun())</span>
|
||||
|
||||
</div>
|
||||
<!--
|
||||
<ul style="display: table; margin: 0 auto; font-size: 12px; list-style-type: none; padding: 0; padding-top: 10px;">
|
||||
<li><a href="$sbRoot/manage/manageSearches/forceVersionCheck"><img src="$sbRoot/images/menu/update16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Force Version Check</a></li>
|
||||
<li><a href="$sbRoot/home/restart/?pid=$sbPID" class="confirm"><img src="$sbRoot/images/menu/restart16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Restart</a></li>
|
||||
<li><a href="$sbRoot/home/shutdown/?pid=$sbPID" class="confirm"><img src="$sbRoot/images/menu/shutdown16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Shutdown</a></li>
|
||||
</ul>
|
||||
-->
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue