mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
ccb9bb329c
Change Coming Episodes to "Episodes" page (API endpoint is not renamed). Add coming episodes to episode view renaming to config migration code. Change Layout term "Calender" to "Day by Day" on Episodes page. Fix saving of sort modes to config file on Episodes page. Add qTip episode plots to "Day by Day" on Episodes page. Add article sorting to networks on Episodes page. Add toggle sort direction and multidimensional sort to isotope on Episodes page. Add text "[paused]" where appropriate to shows on layout Day by Day. Simplified sort code in webserver and in template. Change page auto refresh from 10 to 30 mins. Add other UI tweaks.
695 lines
26 KiB
Cheetah
695 lines
26 KiB
Cheetah
#import sickbeard
|
|
#import datetime
|
|
#from sickbeard.common import *
|
|
#from sickbeard import sbdatetime
|
|
#from sickbeard.helpers import anon_url
|
|
|
|
#set global $title = 'Episode View'
|
|
#set global $header = 'Episode View'
|
|
|
|
#set global $sbPath = '..'
|
|
|
|
#set global $topmenu = 'episodeView'
|
|
#import os.path
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
|
|
|
|
#set $sort = $sickbeard.EPISODE_VIEW_SORT
|
|
#set $table_sort_header_codes = {'time': 0, 'show': 1, 'network': 4}
|
|
#if $sort not in $table_sort_header_codes:
|
|
#set $sort = 'time'
|
|
#end if
|
|
|
|
#if 'daybyday' != $layout:
|
|
<script type="text/javascript" src="$sbRoot/js/ajaxEpSearch.js?$sbPID"></script>
|
|
#end if
|
|
|
|
#if $varExists('header')
|
|
<h1 class="header">$header</h1>
|
|
#else
|
|
<h1 class="title">$title</h1>
|
|
#end if
|
|
|
|
#if 'daybyday' == $layout:
|
|
<script type="text/javascript" src="$sbRoot/js/plotTooltip.js?$sbPID"></script>
|
|
<script type="text/javascript" charset="utf-8">
|
|
<!--
|
|
\$(document).ready(function(){
|
|
|
|
var \$container = [];
|
|
\$.each(\$('[id^=day]'), function(){\$container.push(\$('#' + \$(this).attr('id')))});
|
|
|
|
jQuery.each(\$container, function(j) {
|
|
this.isotope({
|
|
itemSelector: '.daybyday-show',
|
|
sortBy : '$sort',
|
|
layoutMode: 'vertical',
|
|
transitionDuration: 0,
|
|
getSortData: {
|
|
network: function(itemElem) {
|
|
return \$(itemElem).attr('data-network') || '';
|
|
},
|
|
showname: function(itemElem) {
|
|
return \$(itemElem).attr('data-name') || '';
|
|
},
|
|
season: function(itemElem) {
|
|
var season = \$(itemElem).attr('data-season') || '0';
|
|
return season.length && parseInt(season, 10);
|
|
},
|
|
episode: function(itemElem) {
|
|
var episode = \$(itemElem).attr('data-episode') || '0';
|
|
return episode.length && parseInt(episode, 10);
|
|
},
|
|
time: function(itemElem) {
|
|
var time = \$(itemElem).attr('data-time') || '0';
|
|
return time.length && parseInt(time, 10);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
imagesLoaded('.daybyday-show', function() {
|
|
jQuery.each(\$container, function(j) {
|
|
this.isotope('layout');
|
|
});
|
|
});
|
|
|
|
var uiSortBy = (function(sortBy) {
|
|
var sortCriteria;
|
|
switch (sortBy) {
|
|
case 'network':
|
|
sortCriteria = ['network', 'time', 'showname', 'season', 'episode'];
|
|
break;
|
|
case 'show':
|
|
sortCriteria = ['showname', 'time', 'season', 'episode'];
|
|
break;
|
|
case 'time':
|
|
default:
|
|
sortCriteria = ['time', 'showname', 'season', 'episode'];
|
|
break;
|
|
}
|
|
jQuery.each(\$container, function(j) {
|
|
this.isotope({
|
|
sortBy: sortCriteria,
|
|
sortAscending: 'asc' == \$('#sort-dir').attr('data-sort-dir')
|
|
});
|
|
});
|
|
});
|
|
|
|
\$('#sort').on('change', function() {
|
|
uiSortBy(this.value);
|
|
\$.get(this.options[this.selectedIndex].getAttribute('data-sort'));
|
|
});
|
|
|
|
\$('#sort-dir').on('click', function() {
|
|
var sortdir = \$(this).attr('data-sort-dir'),
|
|
newdir = ('asc' == sortdir ? 'desc' : 'asc');
|
|
\$(this).attr('data-sort-dir', newdir);
|
|
\$(this).attr('title', 'Click to sort ' + sortdir + 'ending');
|
|
\$(this).removeClass(sortdir).addClass(newdir);
|
|
uiSortBy(\$('#sort').val());
|
|
});
|
|
});
|
|
//-->
|
|
</script>
|
|
#end if
|
|
|
|
<style type="text/css">
|
|
#SubMenu {display:none}
|
|
#if 'daybyday' == $layout:
|
|
.caret {
|
|
cursor: pointer;
|
|
vertical-align: middle;
|
|
margin-right: 2px;
|
|
}
|
|
.asc {
|
|
border-top: 0;
|
|
border-bottom: 8px solid;
|
|
}
|
|
.desc {
|
|
border-top: 8px solid;
|
|
border-bottom: 0;
|
|
}
|
|
#end if
|
|
</style>
|
|
|
|
<div class="h2footer pull-right">
|
|
<span>Layout:
|
|
<select name="layout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
|
|
<option value="$sbRoot/setEpisodeViewLayout/?layout=banner" #if 'banner' == $sickbeard.EPISODE_VIEW_LAYOUT then 'selected="selected"' else ''#>Banner</option>
|
|
<option value="$sbRoot/setEpisodeViewLayout/?layout=daybyday" #if 'daybyday' == $sickbeard.EPISODE_VIEW_LAYOUT then 'selected="selected"' else ''#>Day by Day</option>
|
|
<option value="$sbRoot/setEpisodeViewLayout/?layout=list" #if 'list' == $sickbeard.EPISODE_VIEW_LAYOUT then 'selected="selected"' else ''#>List</option>
|
|
<option value="$sbRoot/setEpisodeViewLayout/?layout=poster" #if 'poster' == $sickbeard.EPISODE_VIEW_LAYOUT then 'selected="selected"' else ''#>Poster</option>
|
|
</select>
|
|
</span>
|
|
|
|
<span>Sort
|
|
#if 'daybyday' == $layout:
|
|
<span id="sort-dir" data-sort-dir="asc" class="caret asc" title="Click to sort descending"> </span>
|
|
#end if
|
|
By
|
|
#if 'daybyday' == $layout:
|
|
<select name="sort" id="sort" class="form-control form-control-inline input-sm">
|
|
<option value="network" data-sort="$sbRoot/setEpisodeViewSort/?sort=network&redir=0" #if 'network' == $sort then 'selected="selected"' else ''#>Network</option>
|
|
<option value="show" data-sort="$sbRoot/setEpisodeViewSort/?sort=show&redir=0" #if 'show' == $sort then 'selected="selected"' else ''#>Show</option>
|
|
<option value="time" data-sort="$sbRoot/setEpisodeViewSort/?sort=time&redir=0" #if 'time' == $sort then 'selected="selected"' else ''#>Time</option>
|
|
#else
|
|
<select name="sort" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
|
|
<option value="$sbRoot/setEpisodeViewSort/?sort=time" #if 'time' == $sort then 'selected="selected"' else ''#>Date/Time</option>
|
|
<option value="$sbRoot/setEpisodeViewSort/?sort=network" #if 'network' == $sort then 'selected="selected"' else ''#>Network</option>
|
|
<option value="$sbRoot/setEpisodeViewSort/?sort=show" #if 'show' == $sort then 'selected="selected"' else ''#>Show</option>
|
|
#end if
|
|
</select>
|
|
</span>
|
|
|
|
<span>View Paused:
|
|
<select name="viewpaused" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
|
|
<option value="$sbRoot/toggleEpisodeViewDisplayPaused"<%= (' selected="selected"', '')[True == sickbeard.EPISODE_VIEW_DISPLAY_PAUSED] %>>Hidden</option>
|
|
<option value="$sbRoot/toggleEpisodeViewDisplayPaused"<%= ('', ' selected="selected"')[True == sickbeard.EPISODE_VIEW_DISPLAY_PAUSED] %>>Shown</option>
|
|
</select>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="key pull-right">
|
|
#if 'daybyday' != $layout:
|
|
<b>Key:</b>
|
|
<span class="listing-key listing-overdue">Missed</span>
|
|
<span class="listing-key listing-current">Current</span>
|
|
<span class="listing-key listing-default">Future</span>
|
|
<span class="listing-key listing-toofar">Distant</span>
|
|
#end if
|
|
<a class="btn btn-inline forceBacklog" href="webcal://$sbHost:$sbHttpPort/calendar">
|
|
<i class="icon-calendar icon-white"></i>Subscribe</a>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
#if 'list' == $layout:
|
|
<!-- start list view //-->
|
|
|
|
<script type="text/javascript" src="$sbRoot/js/plotTooltip.js?$sbPID"></script>
|
|
<script type="text/javascript" charset="utf-8">
|
|
<!--
|
|
\$.tablesorter.addParser({
|
|
id: 'loadingNames',
|
|
is: function(s) {
|
|
return false
|
|
},
|
|
format: function(s) {
|
|
if(0 == s.indexOf('Loading...'))
|
|
return s.replace('Loading...', '000')
|
|
return (s || '')
|
|
},
|
|
type: 'text'
|
|
});
|
|
\$.tablesorter.addParser({
|
|
id: 'quality',
|
|
is: function(s) {
|
|
return false
|
|
},
|
|
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)
|
|
},
|
|
type: 'numeric'
|
|
});
|
|
\$.tablesorter.addParser({
|
|
id: 'cDate',
|
|
is: function(s) {
|
|
return false
|
|
},
|
|
format: function(s) {
|
|
return s
|
|
},
|
|
type: 'numeric'
|
|
});
|
|
|
|
\$(document).ready(function(){
|
|
|
|
sortList = [[$table_sort_header_codes[$sort], 0]];
|
|
|
|
\$('#showListTable:has(tbody tr)').tablesorter({
|
|
widgets: ['stickyHeaders'],
|
|
sortList: sortList,
|
|
textExtraction: {
|
|
0: function(node) {return \$(node).find('span').text().toLowerCase() || ''},
|
|
1: function(node) {return \$(node).find('a').attr('data-name') || ''},
|
|
4: function(node) {return \$(node).find('span').attr('data-network') || ''},
|
|
5: function(node) {return \$(node).find('span').text().toLowerCase() || ''}
|
|
},
|
|
headers: {
|
|
0: {sorter: 'cDate'},
|
|
1: {sorter: 'loadingNames'},
|
|
2: {sorter: false},
|
|
3: {sorter: false},
|
|
4: {sorter: 'loadingNames'},
|
|
5: {sorter: 'quality'},
|
|
6: {sorter: false},
|
|
7: {sorter: false},
|
|
8: {sorter: false}
|
|
}
|
|
});
|
|
|
|
\$('#sbRoot').ajaxEpSearch();
|
|
|
|
#set $fuzzydate = 'airdate'
|
|
#if $sickbeard.FUZZY_DATING:
|
|
fuzzyMoment({
|
|
containerClass : '.${fuzzydate}',
|
|
dateHasTime : true,
|
|
dateFormat : '${sickbeard.DATE_PRESET}',
|
|
timeFormat : '${sickbeard.TIME_PRESET}',
|
|
trimZero : #if $sickbeard.TRIM_ZERO then 'true' else 'false'#
|
|
});
|
|
#end if
|
|
|
|
});
|
|
//-->
|
|
</script>
|
|
|
|
#set $show_div = 'listing-default'
|
|
|
|
<input type="hidden" id="sbRoot" value="$sbRoot" />
|
|
|
|
<table id="showListTable" class="sickbeardTable tablesorter seasonstyle" cellspacing="1" border="0" cellpadding="0">
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>Airdate</th>
|
|
<th>Show</th>
|
|
<th class="nowrap">Next Ep</th>
|
|
<th>Next Ep Name</th>
|
|
<th>Network</th>
|
|
<th>Quality</th>
|
|
<th>Indexers</th>
|
|
<th>Search</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody style="text-shadow:none;">
|
|
|
|
#for $cur_result in $sql_results:
|
|
#set $cur_indexer = int($cur_result['indexer'])
|
|
#set $runtime = $cur_result['runtime']
|
|
|
|
#if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED:
|
|
#continue
|
|
#end if
|
|
|
|
#set $cur_ep_airdate = $cur_result['localtime'].date()
|
|
|
|
#if $runtime:
|
|
#set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime)
|
|
#if $cur_ep_enddate < $today:
|
|
#set $show_div = 'listing-overdue'
|
|
#elif $cur_ep_airdate >= $next_week.date():
|
|
#set $show_div = 'listing-toofar'
|
|
#elif $cur_ep_airdate >= $today.date() and $cur_ep_airdate < $next_week.date():
|
|
#if $cur_ep_airdate == $today.date():
|
|
#set $show_div = 'listing-current'
|
|
#else:
|
|
#set $show_div = 'listing-default'
|
|
#end if
|
|
#end if
|
|
#end if
|
|
|
|
<!-- start $cur_result['show_name'] //-->
|
|
<tr class="$show_div">
|
|
## forced to use a div to wrap airdate, the column sort went crazy with a span
|
|
<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>
|
|
</td>
|
|
|
|
<td class="tvShow"><a href="$sbRoot/home/displayShow?show=${cur_result['showid']}" data-name="$cur_result['data_show_name']">$cur_result['show_name']</a>
|
|
#if int($cur_result['paused']):
|
|
<span class="pause">[paused]</span>
|
|
#end if
|
|
</td>
|
|
|
|
<td class="nowrap" align="center">
|
|
<%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %>
|
|
</td>
|
|
|
|
<td>
|
|
#if $cur_result['description']:
|
|
<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:
|
|
<img alt="" src="$sbRoot/images/info32.png" width="16" height="16" class="plotInfoNone" />
|
|
#end if
|
|
$cur_result['name']
|
|
</td>
|
|
|
|
<td align="center">
|
|
<span data-network="$cur_result['data_network']">$cur_result['network']</span>
|
|
</td>
|
|
|
|
<td align="center">
|
|
#if int($cur_result['quality']) in $qualityPresets:
|
|
<span class="quality $qualityPresetStrings[int($cur_result['quality'])]">$qualityPresetStrings[int($cur_result['quality'])]</span>
|
|
#else:
|
|
<span class="quality Custom">Custom</span>
|
|
#end if
|
|
</td>
|
|
|
|
<td align="center" style="vertical-align: middle;">
|
|
#if $cur_result['imdb_id']:
|
|
<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
|
|
<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 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>
|
|
</td>
|
|
</tr>
|
|
<!-- end $cur_result['show_name'] //-->
|
|
|
|
#end for
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<th rowspan="1" colspan="10" align="center"> </th>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
</table>
|
|
<!-- end list view //-->
|
|
|
|
|
|
|
|
#else if $layout in ['banner', 'poster']:
|
|
<!-- start non list view //-->
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<!--
|
|
\$(document).ready(function(){
|
|
\$('#sbRoot').ajaxEpSearch({'size': 16, 'loadingImage': 'loading16' + themeSpinner + '.gif'});
|
|
\$('.ep_summary').hide();
|
|
\$('.ep_summaryTrigger').click(function() {
|
|
\$(this).next('.ep_summary').slideToggle('normal', function() {
|
|
\$(this).prev('.ep_summaryTrigger').attr('src', function(i, src) {
|
|
return \$(this).next('.ep_summary').is(':visible') ? src.replace('plus','minus') : src.replace('minus','plus')
|
|
});
|
|
});
|
|
});
|
|
|
|
#set $fuzzydate = 'airdate'
|
|
#if $sickbeard.FUZZY_DATING:
|
|
fuzzyMoment({
|
|
dtInline : true,
|
|
dtGlue : ' at ',
|
|
containerClass : '.${fuzzydate}',
|
|
dateHasTime : true,
|
|
dateFormat : '${sickbeard.DATE_PRESET}',
|
|
timeFormat : '${sickbeard.TIME_PRESET}',
|
|
trimZero : #if $sickbeard.TRIM_ZERO then 'true' else 'false'#
|
|
});
|
|
#end if
|
|
});
|
|
//-->
|
|
</script>
|
|
|
|
#set $cur_segment = None
|
|
#set $too_late_header = False
|
|
#set $missed_header = False
|
|
#set $today_header = False
|
|
#set $show_div = 'ep_listing listing-default'
|
|
|
|
#if 'show' == $sort:
|
|
<br /><br />
|
|
#end if
|
|
|
|
#for $cur_result in $sql_results:
|
|
#set $cur_indexer = int($cur_result['indexer'])
|
|
|
|
#if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED:
|
|
#continue
|
|
#end if
|
|
|
|
#set $runtime = $cur_result['runtime']
|
|
|
|
#if 'network' == $sort:
|
|
|
|
#set $show_network = $cur_result['network'] if $cur_result['network'] else 'no network'
|
|
#if $cur_segment != $show_network:
|
|
<div class="episode-view-header">
|
|
<br><h2 class="network">$show_network</h2>
|
|
#set $cur_segment = $cur_result['network']
|
|
#end if
|
|
#set $cur_ep_airdate = $cur_result['localtime'].date()
|
|
|
|
#if $runtime:
|
|
#set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime)
|
|
#if $cur_ep_enddate < $today:
|
|
#set $show_div = 'ep_listing listing-overdue'
|
|
#elif $cur_ep_airdate >= $next_week.date():
|
|
#set $show_div = 'ep_listing listing-toofar'
|
|
#elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date():
|
|
#if $cur_ep_airdate == $today.date():
|
|
#set $show_div = 'ep_listing listing-current'
|
|
#else:
|
|
#set $show_div = 'ep_listing listing-default'
|
|
#end if
|
|
#end if
|
|
#end if
|
|
|
|
#elif 'time' == $sort:
|
|
|
|
#set $cur_ep_airdate = $cur_result['localtime'].date()
|
|
|
|
#if $cur_segment != $cur_ep_airdate:
|
|
#if $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:
|
|
<br /><h2 class="day">Missed</h2>
|
|
#set $missed_header = True
|
|
#elif $cur_ep_airdate >= $next_week.date() and not $too_late_header:
|
|
<br /><h2 class="day">Later</h2>
|
|
#set $too_late_header = True
|
|
#elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date():
|
|
#if $cur_ep_airdate == $today.date():
|
|
<br /><h2 class="day">$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize() <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
|
|
#set $today_header = True
|
|
#else:
|
|
<br /><h2 class="day">$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize()</h2>
|
|
#end if
|
|
#end if
|
|
#end if
|
|
#set $cur_segment = $cur_ep_airdate
|
|
#end if
|
|
|
|
#if $cur_ep_airdate == $today.date() and not $today_header:
|
|
<div class="episode-view-header">
|
|
<br /><h2 class="day">$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize() <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
|
|
#set $today_header = True
|
|
#end if
|
|
|
|
#if $runtime:
|
|
#set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime)
|
|
#if $cur_ep_enddate < $today:
|
|
#set $show_div = 'ep_listing listing-overdue'
|
|
#elif $cur_ep_airdate >= $next_week.date():
|
|
#set $show_div = 'ep_listing listing-toofar'
|
|
#elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date():
|
|
#if $cur_ep_airdate == $today.date():
|
|
#set $show_div = 'ep_listing listing-current'
|
|
#else:
|
|
#set $show_div = 'ep_listing listing-default'
|
|
#end if
|
|
#end if
|
|
#end if
|
|
|
|
#elif 'show' == $sort:
|
|
#set $cur_ep_airdate = $cur_result['localtime'].date()
|
|
|
|
#if $runtime:
|
|
#set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime)
|
|
#if $cur_ep_enddate < $today:
|
|
#set $show_div = 'ep_listing listing-overdue listingradius'
|
|
#elif $cur_ep_airdate >= $next_week.date():
|
|
#set $show_div = 'ep_listing listing-toofar listingradius'
|
|
#elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date():
|
|
#if $cur_ep_airdate == $today.date():
|
|
#set $show_div = 'ep_listing listing-current listingradius'
|
|
#else:
|
|
#set $show_div = 'ep_listing listing-default listingradius'
|
|
#end if
|
|
#end if
|
|
#end if
|
|
#end if
|
|
|
|
<!-- start $cur_result['show_name'] //-->
|
|
<div class="$show_div" id="listing-${cur_result['showid']}">
|
|
<div class="tvshowDiv">
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<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 'banner' == $layout then 'bannerThumb' else 'posterThumb'#" src="$sbRoot/showPoster/?show=${cur_result['showid']}&which=#if 'poster' == $layout then 'poster_thumb' else $layout#" /></a>
|
|
</th>
|
|
|
|
#if 'banner' == $layout:
|
|
</tr>
|
|
<tr>
|
|
#end if
|
|
|
|
<td class="next_episode">
|
|
<div class="clearfix">
|
|
<span class="tvshowTitle">
|
|
<a href="$sbRoot/home/displayShow?show=${cur_result['showid']}" data-name="$cur_result['data_show_name']">$cur_result['show_name']
|
|
#if int($cur_result['paused']):
|
|
<span class="pause">[paused]</span>
|
|
#end if
|
|
</a></span>
|
|
|
|
<span class="tvshowTitleIcons">
|
|
#if $cur_result['imdb_id']:
|
|
<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
|
|
<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>
|
|
</div>
|
|
|
|
<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">
|
|
|
|
<span class="title">Airdate: </span><span class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)</span><%= ('', '<span> on %s</span>' % str(cur_result['network']))[None is not cur_result['network']] %>
|
|
</div>
|
|
|
|
<div class="clearfix">
|
|
<span class="title">Quality:</span>
|
|
#if int($cur_result['quality']) in $qualityPresets:
|
|
<span class="quality $qualityPresetStrings[int($cur_result['quality'])]">$qualityPresetStrings[int($cur_result['quality'])]</span>
|
|
#else:
|
|
<span class="quality Custom">Custom</span>
|
|
#end if
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align: top;">
|
|
<div>
|
|
#if $cur_result['description']:
|
|
<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>
|
|
#else:
|
|
<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="" />
|
|
#end if
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- end $cur_result['show_name'] //-->
|
|
#end for
|
|
<!-- end non list view //-->
|
|
#end if
|
|
|
|
|
|
|
|
#if 'daybyday' == $layout:
|
|
|
|
#set $today = datetime.date.today()
|
|
#set $dates = [$today + datetime.timedelta(days = $i) for $i in range(7)]
|
|
#set $tbl_day = 0
|
|
|
|
<input type="hidden" id="sbRoot" value="$sbRoot" />
|
|
|
|
<br>
|
|
<br>
|
|
<div class="daybydayWrapper"> <!-- style="width:1600px" -->
|
|
#for $day in $dates
|
|
#set $tbl_day += 1
|
|
|
|
#set $col_class = ''
|
|
#if 1 == $tbl_day
|
|
#set $col_class = 'today'
|
|
#end if
|
|
#set $col_class = '%s %s' % ($col_class, ('even', 'odd')[1 == tbl_day % 2])
|
|
|
|
<div class="day-of-week $col_class">
|
|
<div class="day-number">
|
|
<div class="number">$sbdatetime.sbdatetime.sbfdate($day, ' %d').decode($sickbeard.SYS_ENCODING).replace(' 0', ' ')</div>
|
|
<div class="day">
|
|
<span class="visible-lg">$sbdatetime.sbdatetime.sbfdate($day, '%A').decode($sickbeard.SYS_ENCODING).capitalize()</span>
|
|
<span class="hidden-lg">$sbdatetime.sbdatetime.sbfdate($day, '%a').decode($sickbeard.SYS_ENCODING).capitalize()</span>
|
|
</div>
|
|
<div class="month">
|
|
<span class="visible-lg">$sbdatetime.sbdatetime.sbfdate($day, '%B').decode($sickbeard.SYS_ENCODING).capitalize()</span>
|
|
<span class="hidden-lg">$sbdatetime.sbdatetime.sbfdate($day, '%b').decode($sickbeard.SYS_ENCODING).capitalize()</span>
|
|
</div>
|
|
</div>
|
|
<div id="$sbdatetime.sbdatetime.sbfdate($day, 'day%w')">
|
|
|
|
#set $day_has_show = False
|
|
#for $cur_result in $sql_results:
|
|
#if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED:
|
|
#continue
|
|
#end if
|
|
|
|
#set $cur_indexer = int($cur_result['indexer'])
|
|
#set $runtime = $cur_result['runtime']
|
|
#set $airday = $cur_result['localtime'].date()
|
|
|
|
#if $airday == $day:
|
|
#set $day_has_show = True
|
|
#set $airtime = $sbdatetime.sbdatetime.sbftime($cur_result['localtime'], markup=True).decode($sickbeard.SYS_ENCODING)
|
|
#set $img_tag = '<img'
|
|
#set $plot_class = 'class="img-responsive'
|
|
#set $title_text = ''
|
|
#if $cur_result['description']:
|
|
#set $img_tag += ' id="plot_info_%s_%s_%s"' % (str($cur_result['showid']), str($cur_result['season']), str($cur_result['episode']))
|
|
#set $plot_class += ' plot-daybyday'
|
|
#else
|
|
#set $title_text = $cur_result['show_name']
|
|
#end if
|
|
|
|
<div id="show-$cur_result['showid']" class="daybyday-show" data-name="$cur_result['data_show_name']" data-season="$cur_result['season']" data-episode="$cur_result['episode']" data-network="$cur_result['data_network']" data-time="$time.mktime($cur_result['localtime'].timetuple())">
|
|
<div class="poster">
|
|
<a title="${title_text}" href="$sbRoot/home/displayShow?show=${cur_result['showid']}">
|
|
${img_tag} ${plot_class}" alt="" src="$sbRoot/showPoster/?show=${cur_result['showid']}&which=poster_thumb" /></a>
|
|
</div>
|
|
<div class="text">
|
|
<div class="airtime">
|
|
<span class="time">${airtime}</span> <span class="network pull-right grey-text">$cur_result['network']</span>
|
|
</div>
|
|
<div class="episode" title="$cur_result['name']">
|
|
<span class="season"><%= '%i' % int(cur_result['season']) %></span>x<span class="number"><%= '%02i' % int(cur_result['episode']) %></span>
|
|
<span class="name">$cur_result['name']</span>
|
|
#if int($cur_result['paused']):
|
|
<span class="pause">[paused]</span>
|
|
#end if
|
|
</div>
|
|
</div>
|
|
</div><!-- end show-$cur_result['showid'] //-->
|
|
|
|
#end if
|
|
|
|
#end for
|
|
#if not $day_has_show:
|
|
<div class="daybyday-show">
|
|
<span class="episode-blank">No shows for this day</span>
|
|
</div>
|
|
#end if
|
|
</div>
|
|
</div>
|
|
#end for
|
|
</div>
|
|
|
|
<!-- end calender view //-->
|
|
#end if
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<!--
|
|
window.setInterval('location.reload(true)', 30*60000); // Refresh every xx minutes
|
|
//-->
|
|
</script>
|
|
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
|