@ -2,15 +2,16 @@
#import datetime
#import datetime
#from sickbeard . common import *
#from sickbeard . common import *
#from sickbeard import sbdatetime
#from sickbeard import sbdatetime
#from sickbeard . helpers import anon_url
#set global $ title = " Coming Episodes "
#set global $ title = ' Coming Episodes '
#set global $ header = " Coming Episodes "
#set global $ header = ' Coming Episodes '
#set global $ sbPath = " .. "
#set global $ sbPath = ' .. '
#set global $ topmenu = " comingEpisodes "
#set global $ topmenu = ' comingEpisodes '
#import os . path
#import os . path
#include $ os . path . join ( $ sickbeard . PROG_DIR , " gui/slick/interfaces/default/inc_top.tmpl " )
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_top.tmpl ' )
#set $ sort = $ sickbeard . COMING_EPS_SORT
#set $ sort = $ sickbeard . COMING_EPS_SORT
<script type="text/javascript" src=" $ sbRoot /js/ajaxEpSearch.js? $ sbPID "></script>
<script type="text/javascript" src=" $ sbRoot /js/ajaxEpSearch.js? $ sbPID "></script>
#if $ varExists ( ' header ' )
#if $ varExists ( ' header ' )
@ -20,31 +21,31 @@
#end if
#end if
<style type="text/css">
<style type="text/css">
#SubMenu { display : none ; }
#SubMenu { display : none }
#contentWrapper { padding - top : 30 px ; }
#contentWrapper { padding - top : 30 px }
</style>
</style>
<div class="h2footer pull-right">
<div class="h2footer pull-right">
<span> Layout:
<span>Layout:
<select name="layout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
<select name="layout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
<option value=" $ sbRoot /setComingEpsLayout/?layout=poster" #if $ sickbeard . COMING_EPS_LAYOUT == " poster " then " selected= \" selected \" " else " " # >Poster</option>
<option value=" $ sbRoot /setComingEpsLayout/?layout=poster" #if ' poster ' == $ sickbeard . COMING_EPS_LAYOUT then ' selected= " selected " ' else ' ' # >Poster</option>
<option value=" $ sbRoot /setComingEpsLayout/?layout=calendar" #if $ sickbeard . COMING_EPS_LAYOUT == " calendar " then " selected= \" selected \" " else " " # >Calendar</option>
<option value=" $ sbRoot /setComingEpsLayout/?layout=calendar" #if ' calendar ' == $ sickbeard . COMING_EPS_LAYOUT then ' selected= " selected " ' else ' ' # >Calendar</option>
<option value=" $ sbRoot /setComingEpsLayout/?layout=banner" #if $ sickbeard . COMING_EPS_LAYOUT == " banner " then " selected= \" selected \" " else " " # >Banner</option>
<option value=" $ sbRoot /setComingEpsLayout/?layout=banner" #if ' banner ' == $ sickbeard . COMING_EPS_LAYOUT then ' selected= " selected " ' else ' ' # >Banner</option>
<option value=" $ sbRoot /setComingEpsLayout/?layout=list" #if $ sickbeard . COMING_EPS_LAYOUT == " list " then " selected= \" selected \" " else " " # >List</option>
<option value=" $ sbRoot /setComingEpsLayout/?layout=list" #if ' list ' == $ sickbeard . COMING_EPS_LAYOUT then ' selected= " selected " ' else ' ' # >List</option>
</select>
</select>
</span>
</span>
<span> Sort By:
<span>Sort By:
<select name="sort" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
<select name="sort" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
<option value=" $ sbRoot /setComingEpsSort/?sort=date" #if $ sickbeard . COMING_EPS_SORT == " date " then " selected= \" selected \" " else " " # >Date</option>
<option value=" $ sbRoot /setComingEpsSort/?sort=date" #if ' date ' == $ sickbeard . COMING_EPS_SORT then ' selected= " selected " ' else ' ' # >Date</option>
<option value=" $ sbRoot /setComingEpsSort/?sort=network" #if $ sickbeard . COMING_EPS_SORT == " network " then " selected= \" selected \" " else " " # >Network</option>
<option value=" $ sbRoot /setComingEpsSort/?sort=network" #if ' network ' == $ sickbeard . COMING_EPS_SORT then ' selected= " selected " ' else ' ' # >Network</option>
<option value=" $ sbRoot /setComingEpsSort/?sort=show" #if $ sickbeard . COMING_EPS_SORT == " show " then " selected= \" selected \" " else " " # >Show</option>
<option value=" $ sbRoot /setComingEpsSort/?sort=show" #if ' show ' == $ sickbeard . COMING_EPS_SORT then ' selected= " selected " ' else ' ' # >Show</option>
</select>
</select>
</span>
</span>
<span> View Paused:
<span>View Paused:
<select name="viewpaused" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
<select name="viewpaused" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
<option value=" $ sbRoot /toggleComingEpsDisplayPaused"<%= (' selected="selected"', '')[True == sickbeard.COMING_EPS_DISPLAY_PAUSED] %>>Hidden</option>
<option value=" $ sbRoot /toggleComingEpsDisplayPaused"<%= (' selected="selected"', '')[True == sickbeard.COMING_EPS_DISPLAY_PAUSED] %>>Hidden</option>
<option value=" $ sbRoot /toggleComingEpsDisplayPaused"<%= ('', ' selected="selected"')[True == sickbeard.COMING_EPS_DISPLAY_PAUSED] %>>Shown</option>
<option value=" $ sbRoot /toggleComingEpsDisplayPaused"<%= ('', ' selected="selected"')[True == sickbeard.COMING_EPS_DISPLAY_PAUSED] %>>Shown</option>
@ -53,7 +54,7 @@
</div>
</div>
<div class="key pull-right">
<div class="key pull-right">
#if $ layout != ' calendar ' :
#if ' calendar ' != $ layout :
<b>Key:</b>
<b>Key:</b>
<span class="listing-key listing-overdue">Missed</span>
<span class="listing-key listing-overdue">Missed</span>
<span class="listing-key listing-current">Current</span>
<span class="listing-key listing-current">Current</span>
@ -66,44 +67,45 @@
<br>
<br>
#if $ layout == ' list ' :
#if ' list ' == $ layout :
<!-- start list view //-->
<!-- start list view //-->
<script type="text/javascript" src=" $ sbRoot /js/plotTooltip.js? $ sbPID "></script>
<script type="text/javascript" src=" $ sbRoot /js/plotTooltip.js? $ sbPID "></script>
<script type="text/javascript" charset="utf-8">
<script type="text/javascript" charset="utf-8">
<!--
<!--
\$.tablesorter.addParser({
\$.tablesorter.addParser({
id: 'loadingNames',
id: 'loadingNames',
is: function(s) {
is: function(s) {
return false;
return false
},
},
format: function(s) {
format: function(s) {
if (s.indexOf('Loading...') == 0 )
if (0 == s.indexOf('Loading...'))
return s.replace('Loading...','000');
return s.replace('Loading...', '000')
#if not $ sickbeard . SORT_ARTICLE :
#if not $ sickbeard . SORT_ARTICLE :
return (s || '').replace(/^(The|A|An)\s/i,'');
return (s || '').replace(/^(The|A|An)\s/i, '')
#else :
#else :
return (s || '');
return (s || '')
#end if
#end if
},
},
type: 'text'
type: 'text'
});
});
\$.tablesorter.addParser({
\$.tablesorter.addParser({
id: 'quality',
id: 'quality',
is: function(s) {
is: function(s) {
return false;
return false
},
},
format: function(s) {
format: function(s) {
return s.replace('hd1080p',5).replace('hd720p',4).replace('hd',3).replace('sd',2).replace('any',1).replace('best',0).replace('custom',7);
return s.replace('hd1080p', 5).replace('hd720p', 4).replace('hd', 3).replace('sd', 2).replace('any', 1).replace('best', 0).replace('custom', 7)
},
},
type: 'numeric'
type: 'numeric'
});
});
\$.tablesorter.addParser({
\$.tablesorter.addParser({
id: 'cDate',
id: 'cDate',
is: function(s) {
is: function(s) {
return false;
return false
},
},
format: function(s) {
format: function(s) {
return s;
return s
},
},
type: 'numeric'
type: 'numeric'
});
});
@ -114,15 +116,16 @@
#if $ sort not in $ sort_codes :
#if $ sort not in $ sort_codes :
$ sort = 'date'
$ sort = 'date'
#end if
#end if
sortList = [[ $ sort_codes [ $ sort ],0]];
\$(" #showListTable : has ( tbody tr ) " ).tablesorter( {
sortList = [[ $ sort_codes [ $ sort ], 0]];
\$(' #showListTable : has ( tbody tr ) ' ).tablesorter( {
widgets: ['stickyHeaders'],
widgets: ['stickyHeaders'],
sortList: sortList,
sortList: sortList,
textExtraction: {
textExtraction: {
0: function(node) { return \$(node).find("span").text().toLowerCase(); },
0: function(node) { return \$(node).find('span').text().toLowerCase() },
4: function(node) { return \$(node).find("img").attr("alt"); },
4: function(node) { return \$(node).find('img').attr('alt') },
5: function(node) { return \$(node).find("span").text().toLowerCase(); }
5: function(node) { return \$(node).find('span').text().toLowerCase() }
},
},
headers: {
headers: {
0: { sorter: 'cDate' },
0: { sorter: 'cDate' },
@ -146,7 +149,7 @@
dateHasTime : true,
dateHasTime : true,
dateFormat : ' ${ sickbeard . DATE_PRESET } ',
dateFormat : ' ${ sickbeard . DATE_PRESET } ',
timeFormat : ' ${ sickbeard . TIME_PRESET } ',
timeFormat : ' ${ sickbeard . TIME_PRESET } ',
trimZero : #if $ sickbeard . TRIM_ZERO then " true " else " false " #
trimZero : #if $ sickbeard . TRIM_ZERO then ' true ' else ' false ' #
});
});
#end if
#end if
@ -154,7 +157,7 @@
//-->
//-->
</script>
</script>
#set $ show_div = " listing-default "
#set $ show_div = ' listing-default '
<input type="hidden" id="sbRoot" value=" $ sbRoot " />
<input type="hidden" id="sbRoot" value=" $ sbRoot " />
@ -175,82 +178,82 @@
<tbody style="text-shadow:none;">
<tbody style="text-shadow:none;">
#for $ cur_result in $ sql_results :
#for $ cur_result in $ sql_results :
#set $ cur_indexer = int ( $ cur_result [ " indexer " ] )
#set $ cur_indexer = int ( $ cur_result [ ' indexer ' ] )
#set $ runtime = $ cur_result [ " runtime " ]
#set $ runtime = $ cur_result [ ' runtime ' ]
#if int ( $ cur_result [ " paused " ] ) and not $ sickbeard . COMING_EPS_DISPLAY_PAUSED :
#if int ( $ cur_result [ ' paused ' ] ) and not $ sickbeard . COMING_EPS_DISPLAY_PAUSED :
#continue
#continue
#end if
#end if
#set $ cur_ep_airdate = $ cur_result [ " localtime " ] . date ( )
#set $ cur_ep_airdate = $ cur_result [ ' localtime ' ] . date ( )
#if $ runtime :
#if $ runtime :
#set $ cur_ep_enddate = $ cur_result [ " localtime " ] + datetime . timedelta ( minutes = $ runtime )
#set $ cur_ep_enddate = $ cur_result [ ' localtime ' ] + datetime . timedelta ( minutes = $ runtime )
#if $ cur_ep_enddate < $ today :
#if $ cur_ep_enddate < $ today :
#set $ show_div = " listing-overdue "
#set $ show_div = ' listing-overdue '
#elif $ cur_ep_airdate > = $ next_week . date ( ) :
#elif $ cur_ep_airdate > = $ next_week . date ( ) :
#set $ show_div = " listing-toofar "
#set $ show_div = ' listing-toofar '
#elif $ cur_ep_airdate > = $ today . date ( ) and $ cur_ep_airdate < $ next_week . date ( ) :
#elif $ cur_ep_airdate > = $ today . date ( ) and $ cur_ep_airdate < $ next_week . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#set $ show_div = " listing-current "
#set $ show_div = ' listing-current '
#else :
#else :
#set $ show_div = " listing-default "
#set $ show_div = ' listing-default '
#end if
#end if
#end if
#end if
#end if
#end if
<!-- start $ cur_result ["show_name" ] //-->
<!-- start $ cur_result ['show_name' ] //-->
<tr class=" $ show_div ">
<tr class=" $ show_div ">
## forced to use a div to wrap airdate, the column sort went crazy with a span
## forced to use a div to wrap airdate, the column sort went crazy with a span
<td align="center" class="nowrap">
<td align="center" class="nowrap">
<div class=" ${ fuzzydate } "> $ sbdatetime . sbdatetime . sbfdatetime ( $ cur_result ["localtime" ]).decode( $ sickbeard . SYS_ENCODING )</div><span class="sort_data"> $ time . mktime ( $ cur_result ["localtime" ].timetuple())</span>
<div class=" ${ fuzzydate } "> $ sbdatetime . sbdatetime . sbfdatetime ( $ cur_result ['localtime' ]).decode( $ sickbeard . SYS_ENCODING )</div><span class="sort_data"> $ time . mktime ( $ cur_result ['localtime' ].timetuple())</span>
</td>
</td>
<td class="tvShow"><a href=" $ sbRoot /home/displayShow?show= ${ cur_result [ " showid " ] } "> $ cur_result ["show_name" ]</a>
<td class="tvShow"><a href=" $ sbRoot /home/displayShow?show= ${ cur_result [ ' showid ' ] } "> $ cur_result ['show_name' ]</a>
#if int ( $ cur_result [ " paused " ] ) :
#if int ( $ cur_result [ ' paused ' ] ) :
<span class="pause">[paused]</span>
<span class="pause">[paused]</span>
#end if
#end if
</td>
</td>
<td class="nowrap" align="center">
<td class="nowrap" align="center">
<%="S%02i" % int(cur_result["season"])+"E%02i" % int(cur_result["episode"] ) %>
<%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode']) ) %>
</td>
</td>
<td>
<td>
#if $ cur_result [ " description " ] != " " and $ cur_result [ " description " ] != None :
#if $ cur_result [ ' description ' ] :
<img alt="" src=" $ sbRoot /images/info32.png" height="16" width="16" class="plotInfo" id="plot_info_<%=str(cur_result["showid"])+"_"+str(cur_result["season"])+"_"+str(cur_result["episode"]) %>" />
<img alt='' src=' $ sbRoot /images/info32.png' height='16' width='16' class='plotInfo' id="plot_info_<%= '%s_%s_%s' % (str(cur_result['showid']), str(cur_result['season']), str(cur_result['episode'])) %>" />
#else :
#else :
<img src=" $ sbRoot /images/info32.png" width="16" height="16" class="plotInfoNone" alt="" />
<img alt="" src=" $ sbRoot /images/info32.png" width="16" height="16" class="plotInfoNone" />
#end if
#end if
$ cur_result ["name" ]
$ cur_result ['name' ]
</td>
</td>
<td align="center">
<td align="center">
$ cur_result ["network" ]
$ cur_result ['network' ]
</td>
</td>
<td align="center">
<td align="center">
#if int ( $ cur_result [ " quality " ] ) in $ qualityPresets :
#if int ( $ cur_result [ ' quality ' ] ) in $ qualityPresets :
<span class="quality $ qualityPresetStrings [int( $ cur_result ["quality" ])]"> $ qualityPresetStrings [int( $ cur_result ["quality" ])]</span>
<span class="quality $ qualityPresetStrings [int( $ cur_result ['quality' ])]"> $ qualityPresetStrings [int( $ cur_result ['quality' ])]</span>
#else :
#else :
<span class="quality Custom">Custom</span>
<span class="quality Custom">Custom</span>
#end if
#end if
</td>
</td>
<td align="center" style="vertical-align: middle;">
<td align="center" style="vertical-align: middle;">
#if $ cur_result [ " imdb_id " ] :
#if $ cur_result [ ' imdb_id ' ] :
<a href="http://www.imdb.com/title/ ${ cur_result [ " imdb_id " ] } " rel="noreferrer" onclick="window.open(' ${ sickbeard . ANON_REDIRECT } ' + this.href, '_blank'); return false; " title="http://www.imdb.com/title/ ${ cur_result [ " imdb_id " ] } "><img alt="[imdb]" height="16" width="16" src=" $ sbRoot /images/imdb.png" />
<a href="<%= anon_url('http://www.imdb.com/title/', cur_result['imdb_id']) %> " rel="noreferrer" onclick="window.open(this.href, '_blank'); return false" title="http://www.imdb.com/title/ ${ cur_result [ ' imdb_id ' ] } "><img alt="[imdb]" height="16" width="16" src=" $ sbRoot /images/imdb.png" />
#end if
#end if
<a href=" $ sickbeard . indexerApi ( $ cur_indexer ).config["show_url"] ${ cur_result [ " showid " ] } " rel="noreferrer" onclick="window.open(' ${ sickbeard . ANON_REDIRECT } ' + this.href, '_blank'); return false; " title=" $ sickbeard . indexerApi ( $ cur_indexer ).config["show_url" ] ${ cur_result [ " showid " ] } "><img alt=" $ sickbeard . indexerApi ( $ cur_indexer ).name" height="16" width="16" src=" $ sbRoot /images/ $ sickbeard . indexerApi ( $ cur_indexer ).config["icon" ]" /></a>
<a href="<%= anon_url(sickbeard.indexerApi(cur_indexer).config['show_url'], cur_result['showid']) %> " rel="noreferrer" onclick="window.open(this.href, '_blank'); return false" title="$ sickbeard . indexerApi ( $ cur_indexer ).config['show_url' ] ${ cur_result [ ' showid ' ] } "><img alt=" $ sickbeard . indexerApi ( $ cur_indexer ).name" height="16" width="16" src=" $ sbRoot /images/ $ sickbeard . indexerApi ( $ cur_indexer ).config['icon' ]" /></a>
</td>
</td>
<td align="center">
<td align="center">
<a href=" $ sbRoot /home/searchEpisode?show= ${ cur_result [ " showid " ] } &season= $ cur_result ["season" ]&episode= $ cur_result ["episode" ]" title="Manual Search" id="forceUpdate- ${ cur_result [ " showid " ] } " class="forceUpdate epSearch"><img alt="[search]" height="16" width="16" src=" $ sbRoot /images/search16.png" id="forceUpdateImage- ${ cur_result [ " showid " ] } " /></a>
<a href=" $ sbRoot /home/searchEpisode?show= ${ cur_result [ ' showid ' ] } &season= $ cur_result ['season' ]&episode= $ cur_result ['episode' ]" title="Manual Search" id="forceUpdate- ${ cur_result [ ' showid ' ] } " class="forceUpdate epSearch"><img alt="[search]" height="16" width="16" src=" $ sbRoot /images/search16.png" id="forceUpdateImage- ${ cur_result [ ' showid ' ] } " /></a>
</td>
</td>
</tr>
</tr>
<!-- end $ cur_result ["show_name" ] //-->
<!-- end $ cur_result ['show_name' ] //-->
#end for
#end for
</tbody>
</tbody>
<tfoot>
<tfoot>
@ -262,18 +265,20 @@
</table>
</table>
<!-- end list view //-->
<!-- end list view //-->
#else if $ layout in [ ' banner ' , ' poster ' ] :
#else if $ layout in [ ' banner ' , ' poster ' ] :
<!-- start non list view //-->
<!-- start non list view //-->
<script type="text/javascript" charset="utf-8">
<script type="text/javascript" charset="utf-8">
<!--
<!--
\$(document).ready(function(){
\$(document).ready(function(){
\$(' #sbRoot ' ).ajaxEpSearch( { ' size ' : 16, ' loadingImage ' : ' loading16 ' + themeSpinner + ' . gif ' });
\$(' #sbRoot ' ).ajaxEpSearch( { ' size ' : 16, ' loadingImage ' : ' loading16 ' + themeSpinner + ' . gif ' });
\$(".ep_summary" ).hide();
\$('.ep_summary' ).hide();
\$(".ep_summaryTrigger" ).click(function() {
\$('.ep_summaryTrigger' ).click(function() {
\$(this).next(".ep_summary" ).slideToggle('normal', function() {
\$(this).next('.ep_summary' ).slideToggle('normal', function() {
\$(this).prev(".ep_summaryTrigger" ).attr('src', function(i, src) {
\$(this).prev('.ep_summaryTrigger' ).attr('src', function(i, src) {
return \$(this).next(".ep_summary" ).is(':visible') ? src.replace('plus','minus') : src.replace('minus','plus');
return \$(this).next('.ep_summary' ).is(':visible') ? src.replace('plus','minus') : src.replace('minus','plus')
});
});
});
});
});
});
@ -287,7 +292,7 @@
dateHasTime : true,
dateHasTime : true,
dateFormat : ' ${ sickbeard . DATE_PRESET } ',
dateFormat : ' ${ sickbeard . DATE_PRESET } ',
timeFormat : ' ${ sickbeard . TIME_PRESET } ',
timeFormat : ' ${ sickbeard . TIME_PRESET } ',
trimZero : #if $ sickbeard . TRIM_ZERO then " true " else " false " #
trimZero : #if $ sickbeard . TRIM_ZERO then ' true ' else ' false ' #
});
});
#end if
#end if
@ -299,52 +304,52 @@
#set $ too_late_header = False
#set $ too_late_header = False
#set $ missed_header = False
#set $ missed_header = False
#set $ today_header = False
#set $ today_header = False
#set $ show_div = " ep_listing listing-default "
#set $ show_div = ' ep_listing listing-default '
#if $ sort == " show " :
#if ' show ' == $ sort :
<br /><br />
<br /><br />
#end if
#end if
#for $ cur_result in $ sql_results :
#for $ cur_result in $ sql_results :
#set $ cur_indexer = int ( $ cur_result [ " indexer " ] )
#set $ cur_indexer = int ( $ cur_result [ ' indexer ' ] )
<!-- start $ cur_result ["show_name" ] //-->
<!-- start $ cur_result ['show_name' ] //-->
#if int ( $ cur_result [ " paused " ] ) and not $ sickbeard . COMING_EPS_DISPLAY_PAUSED :
#if int ( $ cur_result [ ' paused ' ] ) and not $ sickbeard . COMING_EPS_DISPLAY_PAUSED :
#continue
#continue
#end if
#end if
#set $ runtime = $ cur_result [ " runtime " ]
#set $ runtime = $ cur_result [ ' runtime ' ]
#if $ sort == " network " :
#if ' network ' == $ sort :
#if $ cur_result [ " network " ] and $ cur_segment != $ cur_result [ " network " ] :
#if $ cur_result [ ' network ' ] and $ cur_segment != $ cur_result [ ' network ' ] :
<div class="comingepheader">
<div class="comingepheader">
<br><h2 class="network"> $ cur_result ["network" ]</h2>
<br><h2 class="network"> $ cur_result ['network' ]</h2>
#set $ cur_segment = $ cur_result [ " network " ]
#set $ cur_segment = $ cur_result [ ' network ' ]
#end if
#end if
#set $ cur_ep_airdate = $ cur_result [ " localtime " ] . date ( )
#set $ cur_ep_airdate = $ cur_result [ ' localtime ' ] . date ( )
#if $ runtime :
#if $ runtime :
#set $ cur_ep_enddate = $ cur_result [ " localtime " ] + datetime . timedelta ( minutes = $ runtime )
#set $ cur_ep_enddate = $ cur_result [ ' localtime ' ] + datetime . timedelta ( minutes = $ runtime )
#if $ cur_ep_enddate < $ today :
#if $ cur_ep_enddate < $ today :
#set $ show_div = " ep_listing listing-overdue "
#set $ show_div = ' ep_listing listing-overdue '
#elif $ cur_ep_airdate > = $ next_week . date ( ) :
#elif $ cur_ep_airdate > = $ next_week . date ( ) :
#set $ show_div = " ep_listing listing-toofar "
#set $ show_div = ' ep_listing listing-toofar '
#elif $ cur_ep_enddate > = $ today and $ cur_ep_airdate < $ next_week . date ( ) :
#elif $ cur_ep_enddate > = $ today and $ cur_ep_airdate < $ next_week . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#set $ show_div = " ep_listing listing-current "
#set $ show_div = ' ep_listing listing-current '
#else :
#else :
#set $ show_div = " ep_listing listing-default "
#set $ show_div = ' ep_listing listing-default '
#end if
#end if
#end if
#end if
#end if
#end if
#elif $ sort == " date " :
#elif ' date ' == $ sort :
#set $ cur_ep_airdate = $ cur_result [ " localtime " ] . date ( )
#set $ cur_ep_airdate = $ cur_result [ ' localtime ' ] . date ( )
#if $ cur_segment != $ cur_ep_airdate :
#if $ cur_segment != $ cur_ep_airdate :
#if $ runtime :
#if $ runtime :
#set $ cur_ep_enddate = $ cur_result [ " localtime " ] + datetime . timedelta ( minutes = $ runtime )
#set $ cur_ep_enddate = $ cur_result [ ' localtime ' ] + datetime . timedelta ( minutes = $ runtime )
#if $ cur_ep_enddate < $ today and $ cur_ep_airdate != $ today . date ( ) and not $ missed_header :
#if $ cur_ep_enddate < $ today and $ cur_ep_airdate != $ today . date ( ) and not $ missed_header :
<br /><h2 class="day">Missed</h2>
<br /><h2 class="day">Missed</h2>
#set $ missed_header = True
#set $ missed_header = True
@ -353,10 +358,10 @@
#set $ too_late_header = True
#set $ too_late_header = True
#elif $ cur_ep_enddate > = $ today and $ cur_ep_airdate < $ next_week . date ( ) :
#elif $ cur_ep_enddate > = $ today and $ cur_ep_airdate < $ next_week . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
<br /><h2 class="day"> $ datetime . date . fromordinal ( $ cur_ep_airdate . toordinal ).strftime("%A" ).decode( $ sickbeard . SYS_ENCODING ).capitalize() <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
<br /><h2 class="day"> $ datetime . date . fromordinal ( $ cur_ep_airdate . toordinal ).strftime('%A' ).decode( $ sickbeard . SYS_ENCODING ).capitalize() <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
#set $ today_header = True
#set $ today_header = True
#else :
#else :
<br /><h2 class="day"> $ datetime . date . fromordinal ( $ cur_ep_airdate . toordinal ).strftime("%A" ).decode( $ sickbeard . SYS_ENCODING ).capitalize()</h2>
<br /><h2 class="day"> $ datetime . date . fromordinal ( $ cur_ep_airdate . toordinal ).strftime('%A' ).decode( $ sickbeard . SYS_ENCODING ).capitalize()</h2>
#end if
#end if
#end if
#end if
#end if
#end if
@ -365,83 +370,83 @@
#if $ cur_ep_airdate == $ today . date ( ) and not $ today_header :
#if $ cur_ep_airdate == $ today . date ( ) and not $ today_header :
<div class="comingepheader">
<div class="comingepheader">
<br /><h2 class="day"> $ datetime . date . fromordinal ( $ cur_ep_airdate . toordinal ).strftime("%A" ).decode( $ sickbeard . SYS_ENCODING ).capitalize() <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
<br /><h2 class="day"> $ datetime . date . fromordinal ( $ cur_ep_airdate . toordinal ).strftime('%A' ).decode( $ sickbeard . SYS_ENCODING ).capitalize() <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
#set $ today_header = True
#set $ today_header = True
#end if
#end if
#if $ runtime :
#if $ runtime :
#if $ cur_ep_enddate < $ today :
#if $ cur_ep_enddate < $ today :
#set $ show_div = " ep_listing listing-overdue "
#set $ show_div = ' ep_listing listing-overdue '
#elif $ cur_ep_airdate > = $ next_week . date ( ) :
#elif $ cur_ep_airdate > = $ next_week . date ( ) :
#set $ show_div = " ep_listing listing-toofar "
#set $ show_div = ' ep_listing listing-toofar '
#elif $ cur_ep_enddate > = $ today and $ cur_ep_airdate < $ next_week . date ( ) :
#elif $ cur_ep_enddate > = $ today and $ cur_ep_airdate < $ next_week . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#set $ show_div = " ep_listing listing-current "
#set $ show_div = ' ep_listing listing-current '
#else :
#else :
#set $ show_div = " ep_listing listing-default "
#set $ show_div = ' ep_listing listing-default '
#end if
#end if
#end if
#end if
#end if
#end if
#elif $ sort == " show " :
#elif ' show ' == $ sort :
#set $ cur_ep_airdate = $ cur_result [ " localtime " ] . date ( )
#set $ cur_ep_airdate = $ cur_result [ ' localtime ' ] . date ( )
#if $ runtime :
#if $ runtime :
#set $ cur_ep_enddate = $ cur_result [ " localtime " ] + datetime . timedelta ( minutes = $ runtime )
#set $ cur_ep_enddate = $ cur_result [ ' localtime ' ] + datetime . timedelta ( minutes = $ runtime )
#if $ cur_ep_enddate < $ today :
#if $ cur_ep_enddate < $ today :
#set $ show_div = " ep_listing listing-overdue listingradius "
#set $ show_div = ' ep_listing listing-overdue listingradius '
#elif $ cur_ep_airdate > = $ next_week . date ( ) :
#elif $ cur_ep_airdate > = $ next_week . date ( ) :
#set $ show_div = " ep_listing listing-toofar listingradius "
#set $ show_div = ' ep_listing listing-toofar listingradius '
#elif $ cur_ep_enddate > = $ today and $ cur_ep_airdate < $ next_week . date ( ) :
#elif $ cur_ep_enddate > = $ today and $ cur_ep_airdate < $ next_week . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#if $ cur_ep_airdate == $ today . date ( ) :
#set $ show_div = " ep_listing listing-current listingradius "
#set $ show_div = ' ep_listing listing-current listingradius '
#else :
#else :
#set $ show_div = " ep_listing listing-default listingradius "
#set $ show_div = ' ep_listing listing-default listingradius '
#end if
#end if
#end if
#end if
#end if
#end if
#end if
#end if
<div class=" $ show_div " id="listing- ${ cur_result [ " showid " ] } ">
<div class=" $ show_div " id="listing- ${ cur_result [ ' showid ' ] } ">
<div class="tvshowDiv">
<div class="tvshowDiv">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<tr>
<th #if $ layout == ' banner ' then " class= \" nobg \" " else " rowspan= \" 2 \" " # valign="top">
<th #if ' banner ' == $ layout then ' class= " nobg " ' else ' rowspan= " 2 " ' # valign="top">
<a href=" $ sbRoot /home/displayShow?show= ${ cur_result [ " showid " ] } "><img alt="" class=" #if $ layout == ' banner ' then " bannerThumb " else " posterThumb " # " src=" $ sbRoot /showPoster/?show= ${ cur_result [ " showid " ] } &which= #if $ layout == ' poster ' then " poster_thumb " else $ layout # " /></a>
<a href=" $ sbRoot /home/displayShow?show= ${ cur_result [ ' showid ' ] } "><img alt="" class=" #if ' banner ' == $ layout then ' bannerThumb ' else ' posterThumb ' # " src=" $ sbRoot /showPoster/?show= ${ cur_result [ ' showid ' ] } &which= #if ' poster ' == $ layout then ' poster_thumb ' else $ layout # " /></a>
</th>
</th>
#if $ layout == ' banner ' :
#if ' banner ' == $ layout :
</tr>
</tr>
<tr>
<tr>
#end if
#end if
<td class="next_episode">
<td class="next_episode">
<div class="clearfix">
<div class="clearfix">
<span class="tvshowTitle">
<span class="tvshowTitle">
<a href=" $ sbRoot /home/displayShow?show= ${ cur_result [ " showid " ] } "> $ cur_result ["show_name" ]
<a href=" $ sbRoot /home/displayShow?show= ${ cur_result [ ' showid ' ] } '> $ cur_result ['show_name' ]
#if int ( $ cur_result [ " paused " ] ) :
#if int ( $ cur_result [ ' paused ' ] ) :
<span class="pause">[paused]</span>
<span class="pause">[paused]</span>
#end if
#end if
</a></span>
</a></span>
<span class="tvshowTitleIcons">
<span class="tvshowTitleIcons">
#if $ cur_result [ " imdb_id " ] :
#if $ cur_result [ ' imdb_id ' ] :
<a href="http://www.imdb.com/title/ ${ cur_result [ " imdb_id " ] } " rel="noreferrer" onclick="window.open(' ${ sickbeard . ANON_REDIRECT } ' + this.href, '_blank'); return false; " title="http://www.imdb.com/title/ ${ cur_result [ " imdb_id " ] } "><img alt="[imdb]" height="16" width="16" src=" $ sbRoot /images/imdb.png" />
<a href="<%= anon_url('http://www.imdb.com/title/', cur_result['imdb_id']) %> " rel="noreferrer" onclick="window.open(this.href, '_blank'); return false" title="http://www.imdb.com/title/ ${ cur_result [ ' imdb_id ' ] } "><img alt="[imdb]" height="16" width="16" src=" $ sbRoot /images/imdb.png" />
#end if
#end if
<a href=" $ sickbeard . indexerApi ( $ cur_indexer ).config["show_url"] ${ cur_result [ " showid " ] } " rel="noreferrer" onclick="window.open(' ${ sickbeard . ANON_REDIRECT } ' + this.href, '_blank'); return false; " title=" $ sickbeard . indexerApi ( $ cur_indexer ).config["show_url" ] ${ cur_result [ " showid " ] } "><img alt=" $ sickbeard . indexerApi ( $ cur_indexer ).name" height="16" width="16" src=" $ sbRoot /images/ $ sickbeard . indexerApi ( $ cur_indexer ).config["icon" ]" /></a>
<a href="<%= anon_url(sickbeard.indexerApi(cur_indexer).config['show_url'], cur_result['showid']) %> " rel="noreferrer" onclick="window.open(this.href, '_blank'); return false" title=" $ sickbeard . indexerApi ( $ cur_indexer ).config['show_url' ] ${ cur_result [ ' showid ' ] } "><img alt=" $ sickbeard . indexerApi ( $ cur_indexer ).name" height="16" width="16" src=" $ sbRoot /images/ $ sickbeard . indexerApi ( $ cur_indexer ).config['icon' ]" /></a>
<span><a href=" $ sbRoot /home/searchEpisode?show= ${ cur_result [ " showid " ] } &season= $ cur_result ["season" ]&episode= $ cur_result ["episode" ]" title="Manual Search" id="forceUpdate- ${ cur_result [ " showid " ] } " class="epSearch forceUpdate"><img alt="[search]" height="16" width="16" src=" $ sbRoot /images/search16.png" id="forceUpdateImage- ${ cur_result [ " showid " ] } " /></a></span>
<span><a href=" $ sbRoot /home/searchEpisode?show= ${ cur_result [ ' showid ' ] } &season= $ cur_result ['season' ]&episode= $ cur_result ['episode' ]" title="Manual Search" id="forceUpdate- ${ cur_result [ ' showid ' ] } " class="epSearch forceUpdate"><img alt="[search]" height="16" width="16" src=" $ sbRoot /images/search16.png" id="forceUpdateImage- ${ cur_result [ ' showid ' ] } " /></a></span>
</span>
</span>
</div>
</div>
<span class="title">Next Episode:</span> <span><%="S%02i" % int(cur_result["season"])+"E%02i" % int(cur_result["episode"]) %> - $ cur_result ["name" ]</span>
<span class="title">Next Episode:</span> <span><%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - $ cur_result ['name' ]</span>
<div class="clearfix">
<div class="clearfix">
<span class="title">Airs: </span><span class=" ${ fuzzydate } "> $ sbdatetime . sbdatetime . sbfdatetime ( $ cur_result ["localtime" ]).decode( $ sickbeard . SYS_ENCODING )</span><span> on $ cur_result ["network" ]</span>
<span class="title">Airs: </span><span class=" ${ fuzzydate } "> $ sbdatetime . sbdatetime . sbfdatetime ( $ cur_result ['localtime' ]).decode( $ sickbeard . SYS_ENCODING )</span><span> on $ cur_result ['network' ]</span>
</div>
</div>
<div class="clearfix">
<div class="clearfix">
<span class="title">Quality:</span>
<span class="title">Quality:</span>
#if int ( $ cur_result [ " quality " ] ) in $ qualityPresets :
#if int ( $ cur_result [ ' quality ' ] ) in $ qualityPresets :
<span class="quality $ qualityPresetStrings [int( $ cur_result ["quality" ])]"> $ qualityPresetStrings [int( $ cur_result ["quality" ])]</span>
<span class="quality $ qualityPresetStrings [int( $ cur_result ['quality' ])]"> $ qualityPresetStrings [int( $ cur_result ['quality' ])]</span>
#else :
#else :
<span class="quality Custom">Custom</span>
<span class="quality Custom">Custom</span>
#end if
#end if
@ -451,13 +456,13 @@
<tr>
<tr>
<td style="vertical-align: top;">
<td style="vertical-align: top;">
<div>
<div>
#if $ cur_result [ " description " ] != " " and $ cur_result [ " description " ] != None :
#if $ cur_result [ ' description ' ] :
<span class="title" style="vertical-align:middle;">Plot:</span>
<span class="title" style="vertical-align:middle;">Plot:</span>
<img class="ep_summaryTrigger" src=" $ sbRoot /images/plus.png" height="16" width="16" alt="" title="Toggle Summary" /><div class="ep_summary"> $ cur_result ["description" ]</div>
<img class="ep_summaryTrigger" src=" $ sbRoot /images/plus.png" height="16" width="16" alt="" title="Toggle Summary" /><div class="ep_summary"> $ cur_result ['description' ]</div>
#else :
#else :
<span class="title ep_summaryTriggerNone" style="vertical-align:middle;">Plot:</span>
<span class="title ep_summaryTriggerNone" style="vertical-align:middle;">Plot:</span>
<img class="ep_summaryTriggerNone" src=" $ sbRoot /images/plus.png" height="16" width="16" alt="" />
<img class="ep_summaryTriggerNone" src=" $ sbRoot /images/plus.png" height="16" width="16" alt="" />
#end if
#end if
</div>
</div>
</td>
</td>
</tr>
</tr>
@ -465,16 +470,16 @@
</div>
</div>
</div>
</div>
<!-- end $ cur_result ["show_name" ] //-->
<!-- end $ cur_result ['show_name' ] //-->
#end for
#end for
<!-- end non list view //-->
<!-- end non list view //-->
#end if
#end if
#if $ layout == ' calendar ' :
#if ' calendar ' == $ layout :
#set $ today = datetime . date . today ( )
#set $ today = datetime . date . today ( )
#set $ dates = [ $ today + datetime . timedelta ( days = $ i ) for $ i in range ( 7 ) ]
#set $ dates = [ $ today + datetime . timedelta ( days = $ i ) for $ i in range ( 7 ) ]
#set $ tbl_day = 0
#set $ tbl_day = 0
<br>
<br>
<br>
<br>
@ -482,8 +487,8 @@
<input type="hidden" id="sbRoot" value=" $ sbRoot " />
<input type="hidden" id="sbRoot" value=" $ sbRoot " />
#for $ day in $ dates
#for $ day in $ dates
#set $ tbl_day + = 1
#set $ tbl_day + = 1
<table class="sickbeardTable tablesorter calendarTable <%= 'cal-%s' % ('odd' if 1 == tbl_day % 2 else 'even' ) %>" cellspacing="0" border="0" cellpadding="0">
<table class="sickbeardTable tablesorter calendarTable <%= 'cal-%s' % (('even', 'odd')[1 == tbl_day % 2] ) %>" cellspacing="0" border="0" cellpadding="0">
<thead><tr><th>$ day . strftime ("%A" ).decode( $ sickbeard . SYS_ENCODING ).capitalize()</th></tr></thead>
<thead><tr><th>$ day . strftime ('%A' ).decode( $ sickbeard . SYS_ENCODING ).capitalize()</th></tr></thead>
<tbody>
<tbody>
#set $ day_has_show = False
#set $ day_has_show = False
#for $ cur_result in $ sql_results :
#for $ cur_result in $ sql_results :
@ -491,31 +496,31 @@
#continue
#continue
#end if
#end if
#set $ cur_indexer = int ( $ cur_result [ " indexer " ] )
#set $ cur_indexer = int ( $ cur_result [ ' indexer ' ] )
#set $ runtime = $ cur_result [ " runtime " ]
#set $ runtime = $ cur_result [ ' runtime ' ]
#set $ airday = $ cur_result [ " localtime " ] . date ( )
#set $ airday = $ cur_result [ ' localtime ' ] . date ( )
#if $ airday == $ day :
#if $ airday == $ day :
#set $ day_has_show = True
#set $ day_has_show = True
#set $ airtime = $ sbdatetime . sbdatetime . fromtimestamp ( $ time . mktime ( $ cur_result [ " localtime " ] . timetuple ( ) ) ) . sbftime ( ) . decode ( $ sickbeard . SYS_ENCODING )
#set $ airtime = $ sbdatetime . sbdatetime . fromtimestamp ( $ time . mktime ( $ cur_result [ ' localtime ' ] . timetuple ( ) ) ) . sbftime ( ) . decode ( $ sickbeard . SYS_ENCODING )
#if $ sickbeard . TRIM_ZERO :
#if $ sickbeard . TRIM_ZERO :
#set $ airtime = re . sub ( r " 0( \ d: \ d \ d) " , r " \ 1 " , $ airtime , 0 , re . IGNORECASE | re . MULTILINE )
#set $ airtime = re . sub ( r ' 0( \ d: \ d \ d) ' , r ' \ 1 ' , $ airtime , 0 , re . IGNORECASE | re . MULTILINE )
#end if
#end if
<tr>
<tr>
<td class="calendarShow">
<td class="calendarShow">
<div class="poster">
<div class="poster">
<a title="${ cur_result [ " show_name " ] } " href=" $ sbRoot /home/displayShow?show= ${ cur_result [ " showid " ] } "><img alt="" src=" $ sbRoot /showPoster/?show= ${ cur_result [ " showid " ] } &which=poster_thumb" /></a>
<a title="${ cur_result [ ' show_name ' ] } " href=" $ sbRoot /home/displayShow?show= ${ cur_result [ ' showid ' ] } "><img alt="" src=" $ sbRoot /showPoster/?show= ${ cur_result [ ' showid ' ] } &which=poster_thumb" /></a>
</div>
</div>
<div class="text">
<div class="text">
<span class="airtime">
<span class="airtime">
${ airtime } on $ cur_result ["network"]
${ airtime } on $ cur_result ["network"]
</span>
</span>
<span class="episode-title" title="$ cur_result ["name" ]">
<span class="episode-title" title="$ cur_result ['name' ]">
<%= "S%02i" % int(cur_result["season"]) + "E%02i" % int(cur_result["episode"]) %> - $ cur_result ["name" ]
<%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - $ cur_result ['name' ]
</span>
</span>
</div>
</div>
</td> <!-- end $ cur_result ["show_name" ] -->
</td> <!-- end $ cur_result ['show_name' ] -->
</tr>
</tr>
#end if
#end if
@ -535,8 +540,8 @@
<script type="text/javascript" charset="utf-8">
<script type="text/javascript" charset="utf-8">
<!--
<!--
window.setInterval( "location.reload(true)" , 600000); // Refresh every 10 minutes
window.setInterval('location.reload(true)' , 600000); // Refresh every 10 minutes
//-->
//-->
</script>
</script>
#include $ os . path . join ( $ sickbeard . PROG_DIR , " gui/slick/interfaces/default/inc_bottom.tmpl " )
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_bottom.tmpl ' )