@ -7,6 +7,7 @@
#set global $ header = ' Show List '
#set global $ sbPath = ' .. '
#set global $ topmenu = ' home '
#set global $ page_body_attr = ' show-list '
##
#import os . path
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_top.tmpl ' )
@ -44,7 +45,7 @@
});
\$(document).ready(function(){
#slurp
##
#for $ curShowlist in $ showlists
#set $ curListID = $ curShowlist [ 0 ]
#if ' poster ' != $ layout
@ -56,7 +57,7 @@
2: function(node) { return \$(node).find('span').text().toLowerCase(); },
3: function(node) { return \$(node).find('span').text().toLowerCase(); },
4: function(node) { return \$(node).find('span').attr('data-progress'); },
5: function(node) { return \$(node).find('img ').attr('alt'); }
5: function(node) { return \$(node).find('i').attr('alt'); }
},
widgets: ['saveSort', 'zebra', 'stickyHeaders', 'filter'],
headers: {
@ -65,7 +66,7 @@
3: { sorter: 'quality' },
4: { sorter: 'eps' }
},
widgetOptions : {
widgetOptions: {
filter_columnFilters: false,
filter_reset: '.resetshows'
},
@ -73,7 +74,6 @@
});
\$.tablesorter.filter.bindSearch( ' # $ curListID ', \$('.search') );
#else
var \ $ container = [\$(' # $ curListID ')]
@ -81,7 +81,7 @@
jQuery.each(\ $ container , function (j) {
this.isotope({
itemSelector: '.show',
sortBy : ' $ sickbeard . POSTER_SORTBY ',
sortBy: ' $ sickbeard . POSTER_SORTBY ',
sortAscending: $ sickbeard . POSTER_SORTDIR ,
layoutMode: 'masonry',
masonry: {
@ -103,21 +103,19 @@
},
network: '[data-network]',
progress: function( itemElem ) {
var progress = \$( itemElem ).children('.item -data').attr('data-progress');
var progress = \$( itemElem ).children('.sort -data').attr('data-progress');
return progress.length && parseInt( progress, 10 ) || Number.NEGATIVE_INFINITY;
}
}
});
});
\$(' #postersort ' ).on( ' change ' , function() {
var sortValue = this.value;
\$(' # $ curListID ').isotope({ sortBy: sortValue });
\$.get(this.options[this.selectedIndex].getAttribute('data-sort'));
});
\$(' #postersortdirection ' ).on( ' change ' , function() {
var sortDirection = this.value;
sortDirection = sortDirection == 'true';
@ -133,17 +131,16 @@
$(this).remove();
});
#end raw
##
#set $ fuzzydate = ' airdate '
#if $ sickbeard . FUZZY_DATING
fuzzyMoment({
dtInline : #if $ layout == ' poster ' then ' true ' else ' false ' # ,
containerClass : '. ${ fuzzydate } ',
dateHasTime : false ,
dateFormat : ' ${ sickbeard . DATE_PRESET } ',
timeFormat : ' ${ sickbeard . TIME_PRESET } ',
trimZero : #if $ sickbeard . TRIM_ZERO then ' true ' else ' false ' #
dtInline: #echo ( ' !1 ' , ' !0 ' ) [ ' poster ' == $ layout ] # ,
containerClass: '. ${ fuzzydate } ',
dateHasTime: !1 ,
dateFormat: ' ${ sickbeard . DATE_PRESET } ',
timeFormat: ' ${ sickbeard . TIME_PRESET } ',
trimZero: #echo ( ' !1 ' , ' !0 ' ) [ $ sickbeard . TRIM_ZERO ] #
});
#end if
#if $ sickbeard . HOME_SEARCH_FOCUS
@ -155,7 +152,7 @@
//-->
</script>
##
#if $ varExists ( ' header ' )
<h1 class="header" style="margin-bottom:0"> $ showlists [0][1]</h1>
@ -171,6 +168,7 @@
<input id="search_show_name" class="search form-control form-control-inline input-sm input200" type="search" data-column="1" placeholder="Search Show Name" tabindex=" $ tab #set $ tab + = 1 # ">
<button type="button" class="resetshows resetanime btn btn-inline" tabindex=" $ tab #set $ tab + = 1 # ">Reset Search</button>
</div>
<span class="pull-right not-poster">Layout:
#else
@ -185,7 +183,6 @@
<option value=" $ sbRoot /setHomeLayout/?layout=simple" #echo $ selected if ' simple ' == sickbeard . HOME_LAYOUT else ' ' # >Simple</option>
</select>
</span>
#if ' poster ' == $ layout
<span>Sort By:
@ -196,6 +193,7 @@
<option value="progress" data-sort=" $ sbRoot /setPosterSortBy/?sort=progress" #echo $ selected if ' progress ' == sickbeard . POSTER_SORTBY else ' ' # >Progress</option>
</select>
</span>
<span style="margin:0 0 0 5px">Sort Order:
<select id="postersortdirection" class="form-control form-control-inline input-sm" tabindex=" $ tab #set $ tab + = 1 # ">
<option value="true" data-sort=" $ sbRoot /setPosterSortDir/?direction=1" #echo $ selected if 1 == sickbeard . POSTER_SORTDIR else ' ' # >Asc</option>
@ -205,45 +203,45 @@
#end if
</div><!-- /HomeLayout -->
##
#for $ curShowlist in $ showlists
#set $ curListID = $ curShowlist [ 0 ]
#set $ curListName = $ curShowlist [ 1 ]
#set $ myShowList = $ list ( $ curShowlist [ 2 ] )
#if $ curShowlist != $ showlists [ 0 ]
##
<h1 class="header"> $ curListName </h1>
#end if
##
#if ' poster ' == $ layout
##
<div id=" $ curListID " class="clearfix container">
<div class="posterview">
##
#for $ curLoadingShow in $ sickbeard . showQueueScheduler . action . loadingShowList
##
#if $ curLoadingShow . show != None and $ curLoadingShow . show in $ sickbeard . showList
#continue
#end if
##
#if None is $ curLoadingShow . show
##
<div class="show" data-name="0" data-date="010101" data-network="0">
<span class="item-data" data-progress="101" style="display:none"></span>
<img alt="" title=" $ curLoadingShow . show_name " class="show-image" style="border-bottom:1px solid #111" src=" $ sbRoot /images/poster.png" />
<div class="show-details">
<div class="show-add">Loading... ( $ curLoadingShow . show_name )</div>
</div>
<span class="sort-data" data-progress="101"></span>
</div>
##
#end if
##
#end for
##
$ myShowList . sort (lambda x, y: cmp(x.name, y.name))
#for $ curShow in $ myShowList
##
#set $ cur_airs_next = ' '
#set $ cur_snatched = 0
#set $ cur_downloaded = 0
@ -257,26 +255,26 @@
#set $ display_status = ' Ended '
#end if
#end if
##
#if $ curShow . indexerid in $ show_stat
#set $ cur_airs_next = $ show_stat [ $ curShow . indexerid ] [ ' ep_airs_next ' ]
##
#set $ cur_snatched = $ show_stat [ $ curShow . indexerid ] [ ' ep_snatched ' ]
#if not $ cur_snatched
#set $ cur_snatched = 0
#end if
##
#set $ cur_downloaded = $ show_stat [ $ curShow . indexerid ] [ ' ep_downloaded ' ]
#if not $ cur_downloaded
#set $ cur_downloaded = 0
#end if
##
#set $ cur_total = $ show_stat [ $ curShow . indexerid ] [ ' ep_total ' ]
#if not $ cur_total
#set $ cur_total = 0
#end if
#end if
##
#if $ cur_total != 0
#set $ download_stat = str ( $ cur_downloaded )
#set $ download_stat_tip = ' Downloaded: ' + str ( $ cur_downloaded )
@ -290,15 +288,15 @@
#set $ download_stat = ' ? '
#set $ download_stat_tip = ' no data '
#end if
##
#set $ nom = $ cur_downloaded
#set $ den = $ cur_total
#if $ den == 0
#set $ den = 1
#end if
##
#set $ progressbar_percent = $ nom * 100 / $ den
##
#set $ data_date = ' 600000000000 '
#if $ cur_airs_next
#set $ data_date = $ sbdatetime . sbdatetime . convert_to_setting ( $ network_timezones . parse_date_time ( $ cur_airs_next , $ curShow . airs , $ curShow . network ) ) . strftime ( ' % Y % m %d % H % M ' )
@ -311,9 +309,8 @@
#set $ data_date = ' 500000000100 '
#end if
#end if
##
<div id="show $ curShow . indexerid " class="show" data-name=" $ curShow . name " data-date=" $ data_date " data-network=" $ curShow . network ">
<span class="item-data" data-progress=" $ progressbar_percent " style="display:none"></span>
<div class="show-image">
<a href=" $ sbRoot /home/displayShow?show= $ curShow . indexerid "><img alt="" class="show-image" src=" $ sbRoot /showPoster/?show= $ curShow . indexerid &which=poster_thumb" /></a>
</div>
@ -341,7 +338,7 @@
#end if
</div><!-- /show-date -->
<table width="100%" cellspacing="1" border="0" cellpadding ="0">
<table width="100%" border="0">
<tr>
<td class="show-table">
<span class="show-dlstats" title=" $ download_stat_tip "> $ download_stat </span>
@ -365,7 +362,7 @@
</td>
</tr>
</table>
<span class="sort-data" data-progress=" $ progressbar_percent "></span>
</div><!-- /show $ curShow . indexerid -->
#end for
@ -377,8 +374,7 @@
########################
#else
<table id=" $ curListID " class="tablesorter" cellspacing="1" border="0" cellpadding="0">
<table id=" $ curListID " class="tablesorter">
<thead>
<tr>
<th>Next Ep</th>
@ -393,8 +389,8 @@
<tfoot>
<tr>
<th rowspan="1" colspan="1" align="center" ><a href=" $ sbRoot /home/addShows/">Add Show</a></th>
<th rowspan="1" colspan="6"></th>
<th><a href=" $ sbRoot /home/addShows/">Add Show</a></th>
<th colspan="6"></th>
</tr>
</tfoot>
@ -403,10 +399,10 @@
#if $ curLoadingShow . show != None and $ curLoadingShow . show in $ sickbeard . showList
#continue
#end if
##
<tr>
<td align="center" >(loading)</td>
<td>
<td>(loading)</td>
<td class="text-left" >
#if None is $ curLoadingShow . show
Loading... ( $ curLoadingShow . show_name )
#else
@ -420,35 +416,36 @@
<td></td>
</tr>
#end for
$ myShowList . sort (lambda x, y: cmp(x.name, y.name))
##
#set void = $ myShowList . sort ( lambda x , y : cmp ( x . name , y . name ) )
##
#for $ curShow in $ myShowList
#slurp
##
#set $ cur_airs_next = ' '
#set $ cur_snatched = 0
#set $ cur_downloaded = 0
#set $ cur_total = 0
#set $ download_stat_tip = ' '
#slurp
##
#if $ curShow . indexerid in $ show_stat
#set $ cur_airs_next = $ show_stat [ $ curShow . indexerid ] [ ' ep_airs_next ' ]
#slurp
##
#set $ cur_snatched = $ show_stat [ $ curShow . indexerid ] [ ' ep_snatched ' ]
#if not $ cur_snatched
#set $ cur_snatched = 0
#end if
#slurp
##
#set $ cur_downloaded = $ show_stat [ $ curShow . indexerid ] [ ' ep_downloaded ' ]
#if not $ cur_downloaded
#set $ cur_downloaded = 0
#end if
#slurp
##
#set $ cur_total = $ show_stat [ $ curShow . indexerid ] [ ' ep_total ' ]
#if not $ cur_total
#set $ cur_total = 0
#end if
#end if
#slurp
##
#if $ cur_total != 0
#set $ download_stat = str ( $ cur_downloaded )
#set $ download_stat_tip = ' Downloaded: ' + str ( $ cur_downloaded )
@ -462,27 +459,25 @@
#set $ download_stat = ' ? '
#set $ download_stat_tip = ' no data '
#end if
#slurp
##
#set $ nom = $ cur_downloaded
#set $ den = $ cur_total
#if $ den == 0
#set $ den = 1
#end if
#slurp
##
#set $ progressbar_percent = $ nom * 100 / $ den
##
<tr>
#if $ cur_airs_next
#set $ ldatetime = $ sbdatetime . sbdatetime . convert_to_setting ( $ network_timezones . parse_date_time ( $ cur_airs_next , $ curShow . airs , $ curShow . network ) )
<td align="center" class="nowrap"><div class=" ${ fuzzydate } "> $ sbdatetime . sbdatetime . sbfdate ( $ ldatetime )</div><span class="sort_data"> $ ldatetime . strftime ('%Y%m%d%H%M')</span></td>
<td class="text-nowrap"><div class=" ${ fuzzydate } "> $ sbdatetime . sbdatetime . sbfdate ( $ ldatetime )</div><span class="sort-data"> $ ldatetime . strftime ('%Y%m%d%H%M')</span></td>
#else
<td align="center" class="nowrap"></td>
<td></td>
#end if
#if ' small ' == $ layout
<td class="tvShow">
<td class="tvShow text-left ">
<div class="imgsmallposter $ layout ">
<a href=" $ sbRoot /showPoster/?show= $ curShow . indexerid &which=poster" rel="dialog" title=" $ curShow . name ">
<img src=" $ sbRoot /showPoster/?show= $ curShow . indexerid &which=poster_thumb" class=" $ layout " alt=" $ curShow . indexerid "/>
@ -492,52 +487,51 @@
</td>
#else if ' banner ' == $ layout
<td>
<span style="display:none"> $ curShow . name </span>
<td class="text-left">
<div class="imgbanner $ layout ">
<a href=" $ sbRoot /home/displayShow?show= $ curShow . indexerid ">
<img src=" $ sbRoot /showPoster/?show= $ curShow . indexerid &which=banner" class=" $ layout " alt=" $ curShow . indexerid " title=" $ curShow . name "/>
<img src=" $ sbRoot /showPoster/?show= $ curShow . indexerid &which=banner" class=" $ layout " alt=" $ curShow . indexerid " title=" $ curShow . name " />
</a>
</div>
<span class="sort-data"> $ curShow . name </span>
</td>
#else if ' simple ' == $ layout
<td class="tvShow"><a href=" $ sbRoot /home/displayShow?show= $ curShow . indexerid "> $ curShow . name </a></td>
<td class="tvShow text-left "><a href=" $ sbRoot /home/displayShow?show= $ curShow . indexerid "> $ curShow . name </a></td>
#end if
#if ' simple ' != $ layout
#set $ img_text = ( $ curShow . network , ' No Network ' ) [ None is $ curShow . network ]
<td align="center">
<span style="display:none"> $ curShow . network </span>
<td>
<img width="54" height="27" src=" $ sbRoot /images/network/ $ network_images [ $ curShow . indexerid ]" alt=" #echo ' %s " title= " %s ' % ( $ img_text , $ img_text ) # " />
<span class="sort-data"> $ curShow . network </span>
</td>
#else
<td>
<td class="text-left" >
<span> $ curShow . network </span>
</td>
#end if
#if $ curShow . quality in $ qualityPresets
<td align="center" ><span class="quality $ qualityPresetStrings [ $ curShow . quality ]"> $ qualityPresetStrings [ $ curShow . quality ]</span></td>
<td><span class="quality $ qualityPresetStrings [ $ curShow . quality ]"> $ qualityPresetStrings [ $ curShow . quality ]</span></td>
#else
<td align="center" ><span class="quality Custom">Custom</span></td>
<td><span class="quality Custom">Custom</span></td>
#end if
<td align="center">
<span class="item-data" data-progress=" $ progressbar_percent " style="display:none"></span>
<td>
<div id="progressbar $ curShow . indexerid " style="position:relative">
<div class="progressbarText" title=" $ download_stat_tip "> $ download_stat </div>
</div>
<span class="sort-data" data-progress=" $ progressbar_percent "></span>
</td>
<td align="center" >
<img src=" $ sbRoot /images/ #if int ( $ curShow . paused ) == 0 and $ curShow . status != ' Ended ' then ' yes16.png " alt= " Y " ' else ' no16.png " alt= " N " ' # width="16" height="16" / >
<td>
<i class= #echo ' " %s " alt= " %s " ' % ( ( ' no ' , ' N ' ) , ( ' yes ' , ' Y ' ) ) [ 0 == int ( $ curShow . paused ) and ' Ended ' != $ curShow . status ] # ></i >
</td>
<td align="center" >
<td>
#set $ display_status = $ curShow . status
#if None is not $ display_status
#if re . search ( r ' (?i)(?:new|returning) \ s*series ' , $ curShow . status )
@ -548,7 +542,6 @@
#end if
$ display_status
</td>
</tr>
#end for
</tbody>
@ -556,13 +549,13 @@
#end if
#end for
##
<script type="text/javascript">
<!--
#raw
$(document).ready(function(){
$('div[id^="progressbar"]').each(function(k, v){
var progress = parseInt($(this).siblings('span[class="item -data"]').attr('data-progress'), 10) , elId = ' #' + $(this).attr('id'), v = 80;
var progress = parseInt($(this).siblings('span[class="sort -data"]').attr('data-progress'), 10) , elId = ' #' + $(this).attr('id'), v = 80;
$(elId).progressbar({value:progress});
if (progress < 80) {
v = progress >= 40 ? 60 : (progress >= 20 ? 40 : 20);
@ -573,4 +566,5 @@ $(document).ready(function(){
#end raw
//-->
</script>
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_bottom.tmpl ' )