2014-03-10 05:18:05 +00:00
|
|
|
#import sickbeard
|
|
|
|
#import datetime
|
2015-03-17 18:58:19 +00:00
|
|
|
#import re
|
2014-03-10 05:18:05 +00:00
|
|
|
#from sickbeard import db, sbdatetime
|
|
|
|
#from sickbeard.common import *
|
2018-01-09 23:47:36 +00:00
|
|
|
#from sickbeard.helpers import df
|
2018-01-26 20:55:25 +00:00
|
|
|
#from sickbeard.webserve import MainHandler
|
Add fanart to Episodes View, Display Show, Edit Show, and Media Renamer page.
Add "Maximum fanart image files per show to cache" to config General/Interface.
Add populate images when the daily show updater is run with a default maximum 3 images per show.
Change force full update in a show will replace existing images with new.
Add fanart livepanel to lower right of Episodes View and Display Show page.
Add highlight panel red until button is clicked a few times.
Add flick through multiple background images on Episodes View and Display Show page.
Add persistent move poster image to right hand side or hide on Display Show page (multi-click the eye).
Add persistent translucency of background images on Episodes View and Display Show page.
Add persistent fanart rating to avoid art completely, random display, random from a group, or display fave always.
Add persistent views of the show detail on Display Show page.
Add persistent views on Episodes View.
Add persistent button to collapse and expand card images on Episode View/Layout daybyday.
Add non persistent "Open gear" and "Full fanart" image views to Episodes View and Display Show page.
Add "smart" selection of fanart image to display on Episode view.
Change insert [!] and change text shade of ended shows in drop down show list on Display Show page.
Change button graphic for next and previous show of show list on Display Show page.
Add logic to hide some livepanel buttons until artwork becomes available or in other circumstances.
Add "(Ended)" where appropriate to show title on Display Show page.
Add links to fanart.tv where appropriate on Display Show page.
Change use tense for label "Airs" or "Aired" depending on if show ended.
Change display "No files" instead of "0 files" and "Upgrade once" instead of "End upgrade on first match".
Add persistent button to newest season to "Show all" episodes.
Add persistent button to all shown seasons to "Hide most" episodes.
Add button to older seasons to toggle "Show Season n" or "Show Specials" with "Hide..." episodes.
Add season level status counts next to each season header on display show page
Add sorting to season table headers on display show page
Add filename and size to quality badge on display show page, removed its redundant "downloaded" text
Remove redundant "Add show" buttons
Change combine the NFO and TBN columns into a single Meta column
Change reduce screen estate used by episode numbers columns
Change improve clarity of text on Add Show page.
Add "Reset fanart ratings" to show Edit/Other tab.
Add fanart usage to show Edit/Other tab.
Add fanart keys guide to show Edit/Other tab.
Change add placeholder tip to "Alternative release name(s)" on show Edit.
Change add placeholder tip to search box on shows Search.
Change hide Anime tips on show Edit when selecting its mutually exclusive options.
Change label "End upgrade on first match" to "Upgrade once" on show Edit.
Change improve performance rendering displayShow.
Add total episodes to start of show description (excludes specials if those are hidden).
Add "Add show" actions i.e. "Search", "Trakt cards", "IMDb cards", and "Anime" to Shows menu.
Add "Import (existing)" action to Tools menu.
Change SD quality from red to dark green, 2160p UHD 4K is red.
Change relocate the functions of Logs & Errors to the right side Tools menu -> View Log File.
Add warning indicator to the Tools menu in different colour depending on error count (green through red).
Change View Log error item output from reversed to natural order.
Change View Log add a typeface and some colour to improve readability.
Change View Log/Errors only display "Clear Errors" button when there are errors to clear.
Change improve performance of View Log File.
2016-02-28 23:43:40 +00:00
|
|
|
<% def sg_var(varname, default=False): return getattr(sickbeard, varname, default) %>#slurp#
|
|
|
|
<% def sg_str(varname, default=''): return getattr(sickbeard, varname, default) %>#slurp#
|
2015-05-07 00:36:40 +00:00
|
|
|
##
|
|
|
|
</div><!-- /content -->
|
|
|
|
</div><!-- /contentWrapper -->
|
2014-07-21 05:38:50 +00:00
|
|
|
|
2015-05-07 00:36:40 +00:00
|
|
|
<footer>
|
|
|
|
<div class="footer clearfix">
|
2014-11-13 17:07:10 +00:00
|
|
|
#set $my_db = $db.DBConnection()
|
|
|
|
#set $today = str($datetime.date.today().toordinal())
|
2017-11-27 19:35:20 +00:00
|
|
|
#set status_quality = '(%s)' % ','.join([str(quality) for quality in $Quality.SNATCHED_ANY])
|
|
|
|
#set status_download = '(%s)' % ','.join([str(quality) for quality in $Quality.DOWNLOADED + $Quality.ARCHIVED])
|
2015-02-14 11:05:35 +00:00
|
|
|
#set $sql_statement = 'SELECT '\
|
|
|
|
+ '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 AND status IN %s) AS ep_snatched, '\
|
|
|
|
% $status_quality\
|
|
|
|
+ '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 AND status IN %s) AS ep_downloaded, '\
|
|
|
|
% $status_download\
|
|
|
|
+ '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 '\
|
|
|
|
+ ' AND ((airdate <= %s AND (status = %s OR status = %s)) '\
|
|
|
|
% ($today, str($SKIPPED), str($WANTED))\
|
|
|
|
+ ' OR (status IN %s) OR (status IN %s))) AS ep_total FROM tv_episodes tv_eps LIMIT 1'\
|
|
|
|
% ($status_quality, $status_download)
|
2015-05-07 00:36:40 +00:00
|
|
|
##
|
2014-11-13 17:07:10 +00:00
|
|
|
#set $sql_result = $my_db.select($sql_statement)
|
2015-05-07 00:36:40 +00:00
|
|
|
##
|
Add fanart to Episodes View, Display Show, Edit Show, and Media Renamer page.
Add "Maximum fanart image files per show to cache" to config General/Interface.
Add populate images when the daily show updater is run with a default maximum 3 images per show.
Change force full update in a show will replace existing images with new.
Add fanart livepanel to lower right of Episodes View and Display Show page.
Add highlight panel red until button is clicked a few times.
Add flick through multiple background images on Episodes View and Display Show page.
Add persistent move poster image to right hand side or hide on Display Show page (multi-click the eye).
Add persistent translucency of background images on Episodes View and Display Show page.
Add persistent fanart rating to avoid art completely, random display, random from a group, or display fave always.
Add persistent views of the show detail on Display Show page.
Add persistent views on Episodes View.
Add persistent button to collapse and expand card images on Episode View/Layout daybyday.
Add non persistent "Open gear" and "Full fanart" image views to Episodes View and Display Show page.
Add "smart" selection of fanart image to display on Episode view.
Change insert [!] and change text shade of ended shows in drop down show list on Display Show page.
Change button graphic for next and previous show of show list on Display Show page.
Add logic to hide some livepanel buttons until artwork becomes available or in other circumstances.
Add "(Ended)" where appropriate to show title on Display Show page.
Add links to fanart.tv where appropriate on Display Show page.
Change use tense for label "Airs" or "Aired" depending on if show ended.
Change display "No files" instead of "0 files" and "Upgrade once" instead of "End upgrade on first match".
Add persistent button to newest season to "Show all" episodes.
Add persistent button to all shown seasons to "Hide most" episodes.
Add button to older seasons to toggle "Show Season n" or "Show Specials" with "Hide..." episodes.
Add season level status counts next to each season header on display show page
Add sorting to season table headers on display show page
Add filename and size to quality badge on display show page, removed its redundant "downloaded" text
Remove redundant "Add show" buttons
Change combine the NFO and TBN columns into a single Meta column
Change reduce screen estate used by episode numbers columns
Change improve clarity of text on Add Show page.
Add "Reset fanart ratings" to show Edit/Other tab.
Add fanart usage to show Edit/Other tab.
Add fanart keys guide to show Edit/Other tab.
Change add placeholder tip to "Alternative release name(s)" on show Edit.
Change add placeholder tip to search box on shows Search.
Change hide Anime tips on show Edit when selecting its mutually exclusive options.
Change label "End upgrade on first match" to "Upgrade once" on show Edit.
Change improve performance rendering displayShow.
Add total episodes to start of show description (excludes specials if those are hidden).
Add "Add show" actions i.e. "Search", "Trakt cards", "IMDb cards", and "Anime" to Shows menu.
Add "Import (existing)" action to Tools menu.
Change SD quality from red to dark green, 2160p UHD 4K is red.
Change relocate the functions of Logs & Errors to the right side Tools menu -> View Log File.
Add warning indicator to the Tools menu in different colour depending on error count (green through red).
Change View Log error item output from reversed to natural order.
Change View Log add a typeface and some colour to improve readability.
Change View Log/Errors only display "Clear Errors" button when there are errors to clear.
Change improve performance of View Log File.
2016-02-28 23:43:40 +00:00
|
|
|
#set $shows_total = len($sg_str('showList'))
|
|
|
|
#set $shows_active = len([show for show in $sg_str('showList') if 0 == show.paused and 'Ended' != show.status])
|
2015-05-07 00:36:40 +00:00
|
|
|
##
|
2014-11-13 17:07:10 +00:00
|
|
|
#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
|
2015-03-17 18:58:19 +00:00
|
|
|
#set $ep_percentage = '' if $ep_total == 0 else '(<span class="footerhighlight">%s%%</span>)' % re.sub(r'(\d+)(\.\d)\d+', r'\1\2', str((float($ep_downloaded)/float($ep_total))*100))
|
2015-05-07 00:36:40 +00:00
|
|
|
##
|
2014-12-13 15:47:58 +00:00
|
|
|
#try
|
|
|
|
#set $localRoot = $sbRoot
|
|
|
|
#except NotFound
|
|
|
|
#set $localRoot = ''
|
|
|
|
#end try
|
|
|
|
#try
|
|
|
|
#set $localheader = $header
|
|
|
|
#except NotFound
|
|
|
|
#set $localheader = ''
|
|
|
|
#end try
|
2016-09-04 20:00:44 +00:00
|
|
|
<%
|
2018-01-09 23:47:36 +00:00
|
|
|
diskfree, min_output = df()
|
|
|
|
if min_output:
|
|
|
|
avail = ', '.join(['%s <span class="footerhighlight">%s</span>' % (drive, free) for (drive, free) in diskfree])
|
2018-01-15 17:54:36 +00:00
|
|
|
%>#slurp#
|
2015-05-07 00:36:40 +00:00
|
|
|
##
|
|
|
|
<span class="footerhighlight">$shows_total</span> shows (<span class="footerhighlight">$shows_active</span> active)
|
|
|
|
| <span class="footerhighlight">$ep_downloaded</span><%=
|
2015-02-14 11:05:35 +00:00
|
|
|
(
|
|
|
|
'',
|
|
|
|
' (<span class="footerhighlight">+%s</span> snatched)'\
|
2015-03-18 22:22:54 +00:00
|
|
|
% '<a href="%s/manage/episodeStatuses?whichStatus=2" title="View overview of snatched episodes">%s</a>'
|
|
|
|
% (localRoot, str(ep_snatched))
|
2015-02-14 11:05:35 +00:00
|
|
|
)[0 < ep_snatched]
|
|
|
|
%> / <span class="footerhighlight">$ep_total</span> episodes downloaded $ep_percentage
|
2018-01-27 16:17:21 +00:00
|
|
|
#for i, event in enumerate($MainHandler.getFooterTime(change_layout=False, json_dump=False))
|
2018-01-26 20:55:25 +00:00
|
|
|
#for k, v in event.items()
|
|
|
|
#set info = re.findall('(.*)_(timeleft|time)', k)[0]
|
|
|
|
#if not i
|
2018-01-27 16:17:21 +00:00
|
|
|
<br>next connect <i class="icon-glyph layout $info[1]" title="Change time layout"></i> for...
|
2018-01-26 20:55:25 +00:00
|
|
|
#end if
|
2018-01-27 16:17:21 +00:00
|
|
|
<span id="next-connect-$info[0]">| $info[0].replace('-', ' '): <span class="footerhighlight $info[0]">$v</span></span>
|
2018-01-26 20:55:25 +00:00
|
|
|
#end for
|
|
|
|
#end for
|
2018-01-09 23:47:36 +00:00
|
|
|
#if diskfree
|
|
|
|
#if min_output
|
|
|
|
<br>free space $avail
|
|
|
|
#else
|
|
|
|
<div class="table-responsive">
|
2018-01-15 17:54:36 +00:00
|
|
|
<style>
|
|
|
|
.stat-table{margin:0 auto}
|
|
|
|
.stat-table > tbody > tr > td{padding:0 5px}
|
|
|
|
</style>
|
2018-01-09 23:47:36 +00:00
|
|
|
<table class="stat-table" cellspacing="5" cellpadding="5">
|
|
|
|
<caption style="display:none">Free space stats for volume/path</caption>
|
|
|
|
<tbody>
|
|
|
|
#for i, drive in enumerate(diskfree)
|
|
|
|
<tr>
|
|
|
|
<td>#if not i#free space#end if#</td>
|
|
|
|
<td><span class="footerhighlight">$drive[1]</span></td>
|
|
|
|
<td style="text-align:left">$drive[0]</td>
|
|
|
|
</tr>
|
|
|
|
#end for
|
|
|
|
</tobdy>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
#end if
|
|
|
|
#end if
|
2015-05-07 00:36:40 +00:00
|
|
|
</div>
|
2018-01-26 20:55:25 +00:00
|
|
|
<script>
|
|
|
|
var footerTimeUrl = '$localRoot/getFooterTime';
|
|
|
|
#raw
|
2018-01-27 16:17:21 +00:00
|
|
|
function getFooterTime(params){
|
|
|
|
params = /undefined/.test(params) && {} || params;
|
|
|
|
$.getJSON(footerTimeUrl, params, function(data){
|
|
|
|
var info, footerIcon$ = $('.footer').find('.icon-glyph.layout'), enabledPropers = !1;
|
|
|
|
$.each(data, function(i, eventItems){
|
|
|
|
$.each(eventItems, function(k, v){
|
|
|
|
info = k.match(/(.*)_(timeleft|time)/);
|
|
|
|
$('.footer').find('.' + info[1]).html(v);
|
|
|
|
footerIcon$.removeClass('time').removeClass('timeleft').addClass(info[2]);
|
|
|
|
enabledPropers |= /propers/.test(info[1]); // enable only if key is found in response
|
2018-01-26 20:55:25 +00:00
|
|
|
});
|
|
|
|
});
|
2018-01-27 16:17:21 +00:00
|
|
|
|
|
|
|
var propers$ = $('#next-connect-propers');
|
|
|
|
if(enabledPropers){
|
|
|
|
propers$.show();
|
|
|
|
} else {
|
|
|
|
propers$.hide();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
$('.footer').find('.layout').click(function(){
|
|
|
|
getFooterTime();
|
2018-01-26 20:55:25 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
#end raw
|
|
|
|
</script>
|
2015-05-07 00:36:40 +00:00
|
|
|
</footer>
|
2014-03-10 05:18:05 +00:00
|
|
|
</body>
|
2016-09-04 20:00:44 +00:00
|
|
|
</html>
|