diff --git a/gui/slick/interfaces/default/apiBuilder.tmpl b/gui/slick/interfaces/default/apiBuilder.tmpl index 42397e4567361f7287e285d658bdf7f20558db65..fedc9053a7a5a40c8375050bef7cea5dcfa32f49 100644 --- a/gui/slick/interfaces/default/apiBuilder.tmpl +++ b/gui/slick/interfaces/default/apiBuilder.tmpl @@ -25,7 +25,7 @@ </style> <script type="text/javascript"> -var hide_empty_list=true; +var hide_empty_list=true; var disable_empty_list=true; addListGroup("api", "Command"); diff --git a/gui/slick/interfaces/default/comingEpisodes.tmpl b/gui/slick/interfaces/default/comingEpisodes.tmpl index 5ce1f51290469f878e1ef87774e22bcb7edd669a..099c4740d5e3035b40cf7ccdc6365efd34d88eb4 100644 --- a/gui/slick/interfaces/default/comingEpisodes.tmpl +++ b/gui/slick/interfaces/default/comingEpisodes.tmpl @@ -15,9 +15,9 @@ #set $sort = $sickbeard.COMING_EPS_SORT <script type="text/javascript" src="$sbRoot/js/ajaxEpSearch.js?$sbPID"></script> #if $varExists('header') - <h1 class="header">$header</h1> + <h1 class="header">$header</h1> #else - <h1 class="title">$title</h1> + <h1 class="title">$title</h1> #end if <style type="text/css"> @@ -26,43 +26,43 @@ </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/setComingEpsLayout/?layout=poster" #if 'poster' == $sickbeard.COMING_EPS_LAYOUT then 'selected="selected"' else ''#>Poster</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 'banner' == $sickbeard.COMING_EPS_LAYOUT then 'selected="selected"' else ''#>Banner</option> - <option value="$sbRoot/setComingEpsLayout/?layout=list" #if 'list' == $sickbeard.COMING_EPS_LAYOUT then 'selected="selected"' else ''#>List</option> - </select> - </span> - - - <span>Sort By: - <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 'date' == $sickbeard.COMING_EPS_SORT then 'selected="selected"' else ''#>Date</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 'show' == $sickbeard.COMING_EPS_SORT then 'selected="selected"' else ''#>Show</option> - </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/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> - </select> - </span> + <span>Layout: + <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 'poster' == $sickbeard.COMING_EPS_LAYOUT then 'selected="selected"' else ''#>Poster</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 'banner' == $sickbeard.COMING_EPS_LAYOUT then 'selected="selected"' else ''#>Banner</option> + <option value="$sbRoot/setComingEpsLayout/?layout=list" #if 'list' == $sickbeard.COMING_EPS_LAYOUT then 'selected="selected"' else ''#>List</option> + </select> + </span> + + + <span>Sort By: + <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 'date' == $sickbeard.COMING_EPS_SORT then 'selected="selected"' else ''#>Date</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 'show' == $sickbeard.COMING_EPS_SORT then 'selected="selected"' else ''#>Show</option> + </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/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> + </select> + </span> </div> <div class="key pull-right"> #if 'calendar' != $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> + <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> + <a class="btn btn-inline forceBacklog" href="webcal://$sbHost:$sbHttpPort/calendar"> + <i class="icon-calendar icon-white"></i>Subscribe</a> </div> <br> @@ -162,20 +162,20 @@ <table id="showListTable" class="sickbeardTable tablesorter seasonstyle" cellspacing="1" border="0" cellpadding="0"> - <thead> - <tr> - <th>Airdate</th> - <th>Show</th> - <th nowrap="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;"> + <thead> + <tr> + <th>Airdate</th> + <th>Show</th> + <th nowrap="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']) @@ -202,64 +202,64 @@ #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" nowrap="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> + <!-- 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" nowrap="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" nowrap="nowrap"><a href="$sbRoot/home/displayShow?show=${cur_result['showid']}">$cur_result['show_name']</a> + <td class="tvShow" nowrap="nowrap"><a href="$sbRoot/home/displayShow?show=${cur_result['showid']}">$cur_result['show_name']</a> #if int($cur_result['paused']): - <span class="pause">[paused]</span> + <span class="pause">[paused]</span> #end if - </td> + </td> - <td nowrap="nowrap" align="center"> - <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - </td> + <td nowrap="nowrap" align="center"> + <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> + </td> - <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'])) %>" /> + <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" /> + <img alt="" src="$sbRoot/images/info32.png" width="16" height="16" class="plotInfoNone" /> #end if - $cur_result['name'] - </td> + $cur_result['name'] + </td> - <td align="center"> - $cur_result['network'] - </td> + <td align="center"> + $cur_result['network'] + </td> - <td align="center"> + <td align="center"> #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: - <span class="quality Custom">Custom</span> + <span class="quality Custom">Custom</span> #end if - </td> + </td> - <td align="center" style="vertical-align: middle;"> + <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" /> + <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']}x${cur_result['season']}x${cur_result['episode']}" 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'] //--> + <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']}x${cur_result['season']}x${cur_result['episode']}" 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> + </tbody> - <tfoot> - <tr> - <th rowspan="1" colspan="10" align="center"> </th> - </tr> - </tfoot> + <tfoot> + <tr> + <th rowspan="1" colspan="10" align="center"> </th> + </tr> + </tfoot> </table> <!-- end list view //--> @@ -272,15 +272,15 @@ <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') - }); - }); - }); + \$('#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: @@ -306,7 +306,7 @@ #set $show_div = 'ep_listing listing-default' #if 'show' == $sort: - <br /><br /> + <br /><br /> #end if #for $cur_result in $sql_results: @@ -323,8 +323,8 @@ #if 'network' == $sort: #set $show_network = $cur_result['network'] if $cur_result['network'] else 'no network' #if $cur_segment != $show_network: - <div class="comingepheader"> - <br><h2 class="network">$show_network</h2> + <div class="comingepheader"> + <br><h2 class="network">$show_network</h2> #set $cur_segment = $cur_result['network'] #end if #set $cur_ep_airdate = $cur_result['localtime'].date() @@ -351,17 +351,17 @@ #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> + <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> + <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">$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 + <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 #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 @@ -369,8 +369,8 @@ #end if #if $cur_ep_airdate == $today.date() and not $today_header: - <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> + <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> #set $today_header = True #end if #if $runtime: @@ -407,67 +407,67 @@ #end if <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> + <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> + </tr> + <tr> #end if - <td class="next_episode"> - <div class="clearfix"> - <span class="tvshowTitle"> - <a href="$sbRoot/home/displayShow?show=${cur_result['showid']}">$cur_result['show_name'] - #if int($cur_result['paused']): - <span class="pause">[paused]</span> - #end if - </a></span> + <td class="next_episode"> + <div class="clearfix"> + <span class="tvshowTitle"> + <a href="$sbRoot/home/displayShow?show=${cur_result['showid']}">$cur_result['show_name'] + #if int($cur_result['paused']): + <span class="pause">[paused]</span> + #end if + </a></span> - <span class="tvshowTitleIcons"> + <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" /> + <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">Airs: </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> + <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">Airs: </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> + <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="" /> + <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> + </td> + </tr> + </table> + </div> </div> <!-- end $cur_result['show_name'] //--> @@ -487,9 +487,9 @@ <input type="hidden" id="sbRoot" value="$sbRoot" /> #for $day in $dates #set $tbl_day += 1 - <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> - <tbody> + <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> + <tbody> #set $day_has_show = False #for $cur_result in $sql_results: #if int($cur_result['paused']) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: @@ -511,22 +511,22 @@ #set $airtime = "Invalid" #end try - <tr> - <td class="calendarShow"> - <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> - </div> - <div class="text"> - <span class="airtime"> - ${airtime} on $cur_result["network"] - </span> - <span class="episode-title" title="$cur_result['name']"> - <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - $cur_result['name'] - </span> - </div> - </td> <!-- end $cur_result['show_name'] --> - </tr> - #end if + <tr> + <td class="calendarShow"> + <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> + </div> + <div class="text"> + <span class="airtime"> + ${airtime} on $cur_result["network"] + </span> + <span class="episode-title" title="$cur_result['name']"> + <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - $cur_result['name'] + </span> + </div> + </td> <!-- end $cur_result['show_name'] --> + </tr> + #end if #end for #if not $day_has_show: diff --git a/gui/slick/interfaces/default/config.tmpl b/gui/slick/interfaces/default/config.tmpl index a697993590ce67f4dd8347b71b4741a71da39c15..fecddf2dbb4bff73509f8d49c6ad63e690c3a82f 100644 --- a/gui/slick/interfaces/default/config.tmpl +++ b/gui/slick/interfaces/default/config.tmpl @@ -15,10 +15,10 @@ useLegacyImportMode = False #set global $topmenu="config"# #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if ##set cpu_usage = $psutil.cpu_percent() @@ -41,7 +41,7 @@ useLegacyImportMode = False #else You don't have version checking turned on. Please turn on "Check for Update" in Config > General.<br /> #end if - </td></tr> + </td></tr> #set $sr_user = None #try diff --git a/gui/slick/interfaces/default/config_anime.tmpl b/gui/slick/interfaces/default/config_anime.tmpl index 6d377c0bd91575ec4693b11d4480d78b249dad24..f670bb182d0058b88eb0bea5e4a05a96ae4d6a8a 100644 --- a/gui/slick/interfaces/default/config_anime.tmpl +++ b/gui/slick/interfaces/default/config_anime.tmpl @@ -13,25 +13,25 @@ <script type="text/javascript" src="$sbRoot/js/config.js?$sbPID"></script> <div id="content960"> #if $varExists('header') - <h1 class="header">$header</h1> + <h1 class="header">$header</h1> #else - <h1 class="title">$title</h1> + <h1 class="title">$title</h1> #end if <div id="config"> - <div id="config-content"> + <div id="config-content"> - <form id="configForm" action="saveAnime" method="post"> + <form id="configForm" action="saveAnime" method="post"> <div id="config-components"> - <ul> - <li><a href="#core-component-group1">AnimeDB Settings</a></li> - <li><a href="#core-component-group2">Look & Feel</a></li> + <ul> + <li><a href="#core-component-group1">AnimeDB Settings</a></li> + <li><a href="#core-component-group2">Look & Feel</a></li> </ul> - + <div id="core-component-group1" class="tab-pane active component-group"> <div class="component-group-desc"> - <img class="notifier-icon" src="$sbRoot/images/anidb24.png" alt="AniDB" title="AniDB" width="24" height="24" /> + <img class="notifier-icon" src="$sbRoot/images/anidb24.png" alt="AniDB" title="AniDB" width="24" height="24" /> <h3><a href="<%= anon_url('http://anidb.info') %>" onclick="window.open(this.href, '_blank'); return false;">AniDB</a></h3> <p>AniDB is non-profit database of anime information that is freely open to the public</p> </div> @@ -44,42 +44,42 @@ <span class="component-desc">Should Sick Beard use data from AniDB?</span> </label> </div> - - <div id="content_use_anidb"> - <div class="field-pair"> - <label class="nocheck"> - <span class="component-title">AniDB Username</span> - <input type="text" name="anidb_username" id="anidb_username" value="$sickbeard.ANIDB_USERNAME" class="form-control input-sm input350" /> - </label> - <label class="nocheck"> - <span class="component-title"> </span> - <span class="component-desc">Username of your AniDB account</span> - </label> - </div> - - <div class="field-pair"> - <label class="nocheck"> - <span class="component-title">AniDB Password</span> - <input type="password" name="anidb_password" id="anidb_password" value="$sickbeard.ANIDB_PASSWORD" class="form-control input-sm input350" /> - </label> - <label class="nocheck"> - <span class="component-title"> </span> - <span class="component-desc">Password of your AniDB account</span> - </label> - </div> - <div class="field-pair"> - <input type="checkbox" name="anidb_use_mylist" id="anidb_use_mylist" #if $sickbeard.ANIDB_USE_MYLIST then "checked=\"checked\"" else ""# /> - <label> - <span class="component-title">AniDB MyList</span> - <span class="component-desc">Do you want to add the PostProcessed Episodes to the MyList ?</span> - </label> - </div> - </div> + + <div id="content_use_anidb"> + <div class="field-pair"> + <label class="nocheck"> + <span class="component-title">AniDB Username</span> + <input type="text" name="anidb_username" id="anidb_username" value="$sickbeard.ANIDB_USERNAME" class="form-control input-sm input350" /> + </label> + <label class="nocheck"> + <span class="component-title"> </span> + <span class="component-desc">Username of your AniDB account</span> + </label> + </div> + + <div class="field-pair"> + <label class="nocheck"> + <span class="component-title">AniDB Password</span> + <input type="password" name="anidb_password" id="anidb_password" value="$sickbeard.ANIDB_PASSWORD" class="form-control input-sm input350" /> + </label> + <label class="nocheck"> + <span class="component-title"> </span> + <span class="component-desc">Password of your AniDB account</span> + </label> + </div> + <div class="field-pair"> + <input type="checkbox" name="anidb_use_mylist" id="anidb_use_mylist" #if $sickbeard.ANIDB_USE_MYLIST then "checked=\"checked\"" else ""# /> + <label> + <span class="component-title">AniDB MyList</span> + <span class="component-desc">Do you want to add the PostProcessed Episodes to the MyList ?</span> + </label> + </div> + </div> <input type="submit" class="btn config_submitter" value="Save Changes" /> </fieldset> </div><!-- /component-group //--> - + <div id="core-component-group2" class="tab-pane component-group"> <div class="component-group-desc"> @@ -96,13 +96,13 @@ <input type="submit" class="btn config_submitter" value="Save Changes" /> </fieldset> </div><!-- /component-group //--> - - <br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/> - </div><!-- /config-components //--> + <br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/> + + </div><!-- /config-components //--> - </form> - </div> + </form> + </div> </div> diff --git a/gui/slick/interfaces/default/config_backuprestore.tmpl b/gui/slick/interfaces/default/config_backuprestore.tmpl index 0ce945ab28a88d7d9c14504d46d5ce59445f70a0..b798ca5392207638797c86d173435ccdb2e92bd7 100644 --- a/gui/slick/interfaces/default/config_backuprestore.tmpl +++ b/gui/slick/interfaces/default/config_backuprestore.tmpl @@ -18,9 +18,9 @@ <script type="text/javascript" src="$sbRoot/js/configBackupRestore.js?$sbPID"></script> #if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if #set $indexer = 0 @@ -31,14 +31,14 @@ <script type="text/javascript" src="$sbRoot/js/config.js?$sbPID"></script> <div id="config"> - <div id="config-content"> + <div id="config-content"> - <form name="configForm" method="post" action="backuprestore"> + <form name="configForm" method="post" action="backuprestore"> <div id="config-components"> - <ul> - <li><a href="#core-component-group1">Backup</a></li> - <li><a href="#core-component-group2">Restore</a></li> - </ul> + <ul> + <li><a href="#core-component-group1">Backup</a></li> + <li><a href="#core-component-group2">Restore</a></li> + </ul> <div id="core-component-group1" class="component-group clearfix"> <div class="component-group-desc"> @@ -46,21 +46,21 @@ <p><b>Backup your main database file and config.</b></p> </div> - <fieldset class="component-group-list"> - <div class="field-pair"> - Select the folder you wish to save your backup file to: - - <br/><br/> - - <input type="text" name="backupDir" id="backupDir" class="form-control input-sm input350" /> - <input class="btn btn-inline" type="button" value="Backup" id="Backup" /> - - <br/> - - </div> - <div class="Backup" id="Backup-result"></div> - </fieldset> - + <fieldset class="component-group-list"> + <div class="field-pair"> + Select the folder you wish to save your backup file to: + + <br/><br/> + + <input type="text" name="backupDir" id="backupDir" class="form-control input-sm input350" /> + <input class="btn btn-inline" type="button" value="Backup" id="Backup" /> + + <br/> + + </div> + <div class="Backup" id="Backup-result"></div> + </fieldset> + </div><!-- /component-group1 //--> <div id="core-component-group2" class="component-group clearfix"> @@ -69,24 +69,24 @@ <p><b>Restore your main database file and config.</b></p> </div> - <fieldset class="component-group-list"> - <div class="field-pair"> - Select the backup file you wish to restore: - - <br/><br/> - - <input type="text" name="backupFile" id="backupFile" class="form-control input-sm input350" /> - <input class="btn btn-inline" type="button" value="Restore" id="Restore" /> - - <br/> - - </div> - <div class="Restore" id="Restore-result"></div> - </fieldset> + <fieldset class="component-group-list"> + <div class="field-pair"> + Select the backup file you wish to restore: + + <br/><br/> + + <input type="text" name="backupFile" id="backupFile" class="form-control input-sm input350" /> + <input class="btn btn-inline" type="button" value="Restore" id="Restore" /> + + <br/> + + </div> + <div class="Restore" id="Restore-result"></div> + </fieldset> </div><!-- /component-group2 //--> </div><!-- /config-components --> - </form> - </div> + </form> + </div> </div> <div class="clearfix"></div> diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index aff6a9b2e5d01713a31173b8c3162c429a0bc9c6..b9b7f874462d8b5a76e7bdc1680a20b82a586e7f 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -18,9 +18,9 @@ #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') #if $varExists('header') - <h1 class="header">$header</h1> + <h1 class="header">$header</h1> #else - <h1 class="title">$title</h1> + <h1 class="title">$title</h1> #end if #set $indexer = 0 @@ -33,557 +33,557 @@ <script type="text/javascript" src="$sbRoot/js/lib/bootstrap-formhelpers.min-2.3.0.js?$sbPID"></script> <script type="text/javascript" charset="utf-8"> - <!-- - \$(document).ready(function(){ - if (\$("input[name='proxy_setting']").val().length == 0) { - \$("input[id='proxy_indexers']").prop('checked', false); - \$("label[for='proxy_indexers']").hide(); - } - - \$("input[name='proxy_setting']").on('input', function() { - if( \$(this).val().length === 0 ) { - \$("input[id='proxy_indexers']").prop('checked', false); - \$("label[for='proxy_indexers']").hide(); - } else { - \$("label[for='proxy_indexers']").show(); - } - }); - }); - //--> + <!-- + \$(document).ready(function(){ + if (\$("input[name='proxy_setting']").val().length == 0) { + \$("input[id='proxy_indexers']").prop('checked', false); + \$("label[for='proxy_indexers']").hide(); + } + + \$("input[name='proxy_setting']").on('input', function() { + if( \$(this).val().length === 0 ) { + \$("input[id='proxy_indexers']").prop('checked', false); + \$("label[for='proxy_indexers']").hide(); + } else { + \$("label[for='proxy_indexers']").show(); + } + }); + }); + //--> </script> <div id="config"> - <div id="config-content"> - - <form id="configForm" action="saveGeneral" method="post"> - <div id="config-components"> - - <ul> - <li><a href="#core-component-group1">Misc</a></li> - <li><a href="#core-component-group2">Interface</a></li> - <li><a href="#core-component-group3">Advanced Settings</a></li> - </ul> - - <div id="core-component-group1"> - <div class="component-group"> - - <div class="component-group-desc"> - <h3>Misc</h3> - <p>Startup options. Indexer options. Log and show file locations.</p> - <p><b>Some options may require a manual restart to take effect.</b></p> - </div> - - <fieldset class="component-group-list"> - - <div class="field-pair"> - <label for="indexerDefaultLang"> - <span class="component-title">Default Indexer Language</span> - <span class="component-desc"> - <select name="indexerDefaultLang" id="indexerDefaultLang" class="form-control form-control-inline input-sm bfh-languages" data-language=$sickbeard.INDEXER_DEFAULT_LANGUAGE data-available="#echo ','.join($sickbeard.indexerApi().config['valid_languages'])#"></select> - <span>for adding shows and metadata providers</span> - </span> - </label> - </div> - <div class="field-pair"> - <label for="launch_browser"> - <span class="component-title">Launch browser</span> - <span class="component-desc"> - <input type="checkbox" name="launch_browser" id="launch_browser" #if $sickbeard.LAUNCH_BROWSER then 'checked="checked"' else ''#/> - <p>open the SickRage home page on startup</p> - </span> - </label> - </div> - <div class="field-pair"> - <label for="default_page"> - <span class="component-title">Initial page</span> - <span class="component-desc"> - <select id="default_page" name="default_page" class="form-control input-sm"> - <option value="news" #if $sickbeard.DEFAULT_PAGE == 'news' then 'selected="selected"' else ''#>News</option> - <option value="home" #if $sickbeard.DEFAULT_PAGE == 'home' then 'selected="selected"' else ''#>Home</option> - <option value="comingEpisodes" #if $sickbeard.DEFAULT_PAGE == 'comingEpisodes' then 'selected="selected"' else ''#>Coming Episodes</option> - <option value="history" #if $sickbeard.DEFAULT_PAGE == 'history' then 'selected="selected"' else ''#>History</option> - <option value="IRC" #if $sickbeard.DEFAULT_PAGE == 'IRC' then 'selected="selected"' else ''#>IRC</option> - </select> - <span>when launching SickRage interface</span> - </span> - </label> - </div> - <div class="field-pair"> - <label for="showupdate_hour"> - <span class="component-title">When to update shows</span> - <span class="component-desc"> - <input type="text" name="showupdate_hour" id="showupdate_hour" value="$sickbeard.SHOWUPDATE_HOUR" class="form-control input-sm input75" /> - <p>with information such as next air dates, show ended, etc. Use 15 for 3pm, 4 for 4am etc. Anything over 23 or under 0 will be set to 0 (12am)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="update_shows_on_start"> - <span class="component-title">Update shows on startup</span> - <span class="component-desc"> - <input type="checkbox" name="update_shows_on_start" id="update_shows_on_start" #if $sickbeard.UPDATE_SHOWS_ON_START then 'checked="checked"' else ''#/> - <p>with information such as next air dates, show ended, etc. Disable for a faster startup as show info is sheduled to update in the background anyway</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="update_shows_on_snatch"> - <span class="component-title">Update shows on snatch</span> - <span class="component-desc"> - <input type="checkbox" name="update_shows_on_snatch" id="update_shows_on_snatch" #if $sickbeard.UPDATE_SHOWS_ON_SNATCH then 'checked="checked"' else ''#/> - <p>with information such as next air dates, show ended, etc.</p> - </span> - </label> - </div> - - <div class="field-pair"> - <span class="component-title">Send to trash for actions</span> - <span class="component-desc"> - <label for="trash_remove_show" class="nextline-block"> - <input type="checkbox" name="trash_remove_show" id="trash_remove_show" #if $sickbeard.TRASH_REMOVE_SHOW then 'checked="checked"' else ''#/> - <p>when using show "Remove" and delete files</p> - </label> - <label for="trash_rotate_logs" class="nextline-block"> - <input type="checkbox" name="trash_rotate_logs" id="trash_rotate_logs" #if $sickbeard.TRASH_ROTATE_LOGS then 'checked="checked"' else ''#/> - <p>on scheduled deletes of the oldest log files</p> - </label> - <div class="clear-left"><p>selected actions use trash (recycle bin) instead of the default permanent delete</p></div> - </span> - </div> - - <div class="field-pair"> - <label for="log_dir"> - <span class="component-title">Log file folder location</span> - <span class="component-desc"> - <input type="text" name="log_dir" id="log_dir" value="$sickbeard.ACTUAL_LOG_DIR" class="form-control input-sm input350" /> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="log_nr"> - <span class="component-title">Number of Log files saved</span> - <span class="component-desc"> - <input type="text" name="log_nr" id="log_nr" value="$sickbeard.LOG_NR" class="form-control input-sm input75" /> - <p>number of log files saved when rotating logs (default: 5) (REQUIRES RESTART)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="log_size"> - <span class="component-title">Size of Log files saved</span> - <span class="component-desc"> - <input type="text" name="log_size" id="log_size" value="$sickbeard.LOG_SIZE" class="form-control input-sm input75" /> - <p>maximum size of a log file saved (default: 1048576 (1MB)) (REQUIRES RESTART)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="indexer_default"> - <span class="component-title">Use initial indexer set to</span> - <span class="component-desc"> - <select id="indexer_default" name="indexer_default" class="form-control input-sm"> - <option value="0" #if $indexer == 0 then 'selected="selected"' else ''#>All Indexers</option> - #for $indexer in $sickbeard.indexerApi().indexers - <option value="$indexer" #if $indexer == $sickbeard.INDEXER_DEFAULT then 'selected="selected"' else ''#>$sickbeard.indexerApi().indexers[$indexer]</option> - #end for - </select> - <span>as the default selection when adding new shows</span> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="indexer_timeout"> - <span class="component-title">Timeout show indexer at</span> - <span class="component-desc"> - <input type="text" name="indexer_timeout" id="indexer_timeout" value="$sickbeard.INDEXER_TIMEOUT" class="form-control input-sm input75" /> - <p>seconds of inactivity when finding new shows (default:10)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Show root directories</span> - <span class="component-desc"> - <p>where the files of shows are located</p> - #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_rootDirs.tmpl') - </span> - </label> - </div> - - <input type="submit" class="btn config_submitter" value="Save Changes" /> - </fieldset> - </div> - <div class="component-group"> - - <div class="component-group-desc"> - <h3>Updates</h3> - <p>Options for software updates.</p> - </div> - <fieldset class="component-group-list"> - - <div class="field-pair"> - <label for="version_notify"> - <span class="component-title">Check software updates</span> - <span class="component-desc"> - <input type="checkbox" name="version_notify" id="version_notify" #if $sickbeard.VERSION_NOTIFY then 'checked="checked"' else ''#/> - <p>and display notifications when updates are available. - Checks are run on startup and at the frequency set below*</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="auto_update"> - <span class="component-title">Automatically update</span> - <span class="component-desc"> - <input type="checkbox" name="auto_update" id="auto_update" #if $sickbeard.AUTO_UPDATE then 'checked="checked"' else ''#/> - <p>fetch and install software updates. - Updates are run on startup and in the background at the frequency set below*</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Check the server every*</span> - <span class="component-desc"> - <input type="text" name="update_frequency" id="update_frequency" value="$sickbeard.UPDATE_FREQUENCY" class="form-control input-sm input75" /> - <p>hours for software updates (default:12)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="notify_on_update"> - <span class="component-title">Notify on software update</span> - <span class="component-desc"> - <input type="checkbox" name="notify_on_update" id="notify_on_update" #if $sickbeard.NOTIFY_ON_UPDATE then 'checked="checked"' else ''#/> - <p>send a message to all enabled notifiers when SickRage has been updated</p> - </span> - </label> - </div> - - <input type="submit" class="btn config_submitter" value="Save Changes" /> - </fieldset> - - </div> - </div><!-- /component-group1 //--> - - - <div id="core-component-group2"> - <div class="component-group"> - - <div class="component-group-desc"> - <h3>User Interface</h3> - <p>Options for visual appearance.</p> - </div> - - <fieldset class="component-group-list"> - - <div class="field-pair"> - <label for="theme_name"> - <span class="component-title">Display theme:</span> - <span class="component-desc"> - <select id="theme_name" name="theme_name" class="form-control input-sm"> - <option value="dark" #if $sickbeard.THEME_NAME == 'dark' then 'selected="selected"' else ''#>Dark</option> - <option value="light" #if $sickbeard.THEME_NAME == 'light' then 'selected="selected"' else ''#>Light</option> - </select> - <span class="red-text">for appearance to take effect, save then refresh your browser</span> - </span> - </label> - </div> - <div class="field-pair"> - <label for="display_all_seasons"> - <span class="component-title">Show all seasons</span> - <span class="component-desc"> - <input type="checkbox" name="display_all_seasons" id="display_all_seasons" #if $sickbeard.DISPLAY_ALL_SEASONS then 'checked="checked"' else ''#> - <p>on the show summary page</p> - </span> - </label> - </div> - <div class="field-pair"> - <label for="sort_article"> - <span class="component-title">Sort with "The", "A", "An"</span> - <span class="component-desc"> - <input type="checkbox" name="sort_article" id="sort_article" #if $sickbeard.SORT_ARTICLE then 'checked="checked"' else ''#/> - <p>include articles ("The", "A", "An") when sorting show lists</p> - </span> - </label> - </div> - <div class="field-pair"> - <label for="filter_row"> - <span class="component-title">Filter Row</span> - <span class="component-desc"> - <input type="checkbox" name="filter_row" id="filter_row" #if $sickbeard.FILTER_ROW == True then 'checked="checked"' else ''#/> - <p>Add a filter row to the show display on the home page</p> - <p>Supports =, >, >=, <=, <, xx to yy , xx - yy</p> - <p><b>Note:</b> =, >, >=, <=, < should be first, followed by a space, then the value.</p> - <p>Examples: '> 90', '= 100', '0 to 99'</p> - </span> - </label> - </div> - <div class="field-pair"> - <label for="coming_eps_missed_range"> - <span class="component-title">Missed episodes range</span> - <span class="component-desc"> - <input type="number" step="1" min="7" name="coming_eps_missed_range" id="coming_eps_missed_range" value="$sickbeard.COMING_EPS_MISSED_RANGE" class="form-control input-sm input75" /> - <p>Set the range in days of the missed episodes in the Coming Episode page</p> - </span> - </label> - </div> - <div class="field-pair"> - <label for="fuzzy_dating"> - <span class="component-title">Display fuzzy dates</span> - <span class="component-desc"> - <input type="checkbox" name="fuzzy_dating" id="fuzzy_dating" class="viewIf datePresets" #if $sickbeard.FUZZY_DATING == True then 'checked="checked"' else ''#/> - <p>move absolute dates into tooltips and display e.g. "Last Thu", "On Tue"</p> - </span> - </label> - </div> - <div class="field-pair show_if_fuzzy_dating#if True == $sickbeard.FUZZY_DATING then '' else ' metadataDiv'#"> - <label for="trim_zero"> - <span class="component-title">Trim zero padding</span> - <span class="component-desc"> - <input type="checkbox" name="trim_zero" id="trim_zero" #if True == $sickbeard.TRIM_ZERO then 'checked="checked"' else ''#/> - <p>remove the leading number "0" shown on hour of day, and date of month</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="date_presets"> - <span class="component-title">Date style:</span> - <span class="component-desc"> - <select class="form-control input-sm #if True == $sickbeard.FUZZY_DATING then '' else ' metadataDiv'#" id="date_presets#if True == $sickbeard.FUZZY_DATING then '' else '_na'#" name="date_preset#if True == $sickbeard.FUZZY_DATING then '' else '_na'#"> - #for $cur_preset in $date_presets: - <option value="$cur_preset" #if $cur_preset == $sickbeard.DATE_PRESET or ("%x" == $sickbeard.DATE_PRESET and "$cur_preset" == '%a, %b %d, %Y') then 'selected="selected"' else ''#>$datetime.datetime($datetime.datetime.now().year, 12, 31, 14, 30, 47).strftime($cur_preset)</option> - #end for - </select> - - <select class="form-control input-sm #if True != $sickbeard.FUZZY_DATING then '' else ' metadataDiv'#" id="date_presets#if True != $sickbeard.FUZZY_DATING then '' else '_na'#" name="date_preset#if True != $sickbeard.FUZZY_DATING then '' else '_na'#"> - <option value="%x" #if "%x" == $sickbeard.DATE_PRESET then 'selected="selected"' else ''#>Use System Default</option> - #for $cur_preset in $date_presets: - <option value="$cur_preset" #if $cur_preset == $sickbeard.DATE_PRESET then 'selected="selected"' else ''#>$datetime.datetime($datetime.datetime.now().year, 12, 31, 14, 30, 47).strftime($cur_preset)</option> - #end for - </select> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="time_presets"> - <span class="component-title">Time style:</span> - <span class="component-desc"> - <select id="time_presets" name="time_preset" class="form-control input-sm"> - #for $cur_preset in $time_presets: - <option value="$cur_preset" #if $cur_preset == $sickbeard.TIME_PRESET_W_SECONDS then 'selected="selected"' else ''#>$sbdatetime.now().sbftime(show_seconds=True,t_preset=$cur_preset)</option> - #end for - </select> - <span><b>note:</b> seconds are only shown on the History page</span> - </span> - </label> - </div> - - <div class="field-pair"> - <span class="component-title">Timezone:</span> - <span class="component-desc"> - <label for="local" class="space-right"> - <input type="radio" name="timezone_display" id="local" value="local" #if "local" == $sickbeard.TIMEZONE_DISPLAY then 'checked="checked"' else ''# />Local - </label> - <label for="network"> - <input type="radio" name="timezone_display" id="network" value="network" #if "network" == $sickbeard.TIMEZONE_DISPLAY then 'checked="checked"' else ''# />Network - </label> - <div class="clear-left"><p>display dates and times in either your timezone or the shows network timezone</p></div> - </span> - </div> - - <div class="field-pair"> - <label for="download_url"> - <span class="component-title">Download url</span> - <input type="text" name="download_url" id="download_url" value="$sickbeard.DOWNLOAD_URL" size="35" /> - </label> - <label> - <span class="component-title"> </span> - <span class="component-desc">URL where the shows can be downloaded.</span> - </label> - </div> - - - <input type="submit" class="btn config_submitter" value="Save Changes" /> - - </fieldset> - - </div><!-- /User interface component-group --> - - <div class="component-group"> - - <div class="component-group-desc"> - <h3>Web Interface</h3> - <p>It is recommended that you enable a username and password to secure SickRage from being tampered with remotely.</p> - <p><b>These options require a manual restart to take effect.</b></p> - </div> - - <fieldset class="component-group-list"> - - <div class="field-pair"> - <label for="api_key"> - <span class="component-title">API key</span> - <span class="component-desc"> - <input type="text" name="api_key" id="api_key" value="$sickbeard.API_KEY" class="form-control input-sm input300" readonly="readonly" /> - <input class="btn btn-inline" type="button" id="generate_new_apikey" value="Generate"> - <div class="clear-left"><p>used to give 3rd party programs limited access to SickRage</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="web_log"> - <span class="component-title">HTTP logs</span> - <span class="component-desc"> - <input type="checkbox" name="web_log" id="web_log" #if $sickbeard.WEB_LOG then 'checked="checked"' else ''#/> - <p>enable logs from the internal Tornado web server</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="web_username"> - <span class="component-title">HTTP username</span> - <span class="component-desc"> - <input type="text" name="web_username" id="web_username" value="$sickbeard.WEB_USERNAME" class="form-control input-sm input300" /> - <p>set blank for no login</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="web_password"> - <span class="component-title">HTTP password</span> - <span class="component-desc"> - <input type="password" name="web_password" id="web_password" value="$sickbeard.WEB_PASSWORD" class="form-control input-sm input300" /> - <p>blank = no authentication</span> - </label> - </div> - - <div class="field-pair"> - <label for="web_port"> - <span class="component-title">HTTP port</span> - <span class="component-desc"> - <input type="text" name="web_port" id="web_port" value="$sickbeard.WEB_PORT" class="form-control input-sm input100" /> - <p>web port to browse and access SickRage (default:8081)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="web_ipv6"> - <span class="component-title">Listen on IPv6</span> - <span class="component-desc"> - <input type="checkbox" name="web_ipv6" id="web_ipv6" #if $sickbeard.WEB_IPV6 then 'checked="checked"' else ''#/> - <p>attempt binding to any available IPv6 address</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="enable_https"> - <span class="component-title">Enable HTTPS</span> - <span class="component-desc"> - <input type="checkbox" name="enable_https" class="enabler" id="enable_https" #if $sickbeard.ENABLE_HTTPS then 'checked="checked"' else ''#/> - <p>enable access to the web interface using a HTTPS address</p> - </span> - </label> - </div> - <div id="content_enable_https"> - <div class="field-pair"> - <label for="https_cert"> - <span class="component-title">HTTPS certificate</span> - <span class="component-desc"> - <input type="text" name="https_cert" id="https_cert" value="$sickbeard.HTTPS_CERT" class="form-control input-sm input300" /> - <div class="clear-left"><p>file name or path to HTTPS certificate</p></div> - </span> - </label> - </div> - <div class="field-pair"> - <label for="https_key"> - <span class="component-title">HTTPS key</span> - <span class="component-desc"> - <input type="text" name="https_key" id="https_key" value="$sickbeard.HTTPS_KEY" class="form-control input-sm input300" /> - <div class="clear-left"><p>file name or path to HTTPS key</p></div> - </span> - </label> - </div> - </div> - - <div class="field-pair"> - <label for="handle_reverse_proxy"> - <span class="component-title">Reverse proxy headers</span> - <span class="component-desc"> - <input type="checkbox" name="handle_reverse_proxy" id="handle_reverse_proxy" #if $sickbeard.HANDLE_REVERSE_PROXY then 'checked="checked"' else ''#/> - <p>accept the following reverse proxy headers (advanced)...<br />(X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto)</p> - </span> - </label> - </div> - - <input type="submit" class="btn config_submitter" value="Save Changes" /> - - </fieldset> - - </div><!-- /component-group2 //--> - </div> - - - <div id="core-component-group3" class="component-group"> - - <div class="component-group"> - - <div class="component-group-desc"> - <h3>Advanced Settings</h3> - </div> - - <fieldset class="component-group-list"> - - <div class="field-pair"> - <label> - <span class="component-title">CPU throttling:</span> - <span class="component-desc"> - <select id="cpu_presets" name="cpu_preset" class="form-control input-sm"> - #for $cur_preset in $cpu_presets: - <option value="$cur_preset" #if $cur_preset == $sickbeard.CPU_PRESET then 'selected="selected"' else ''#>$cur_preset.capitalize()</option> - #end for - </select> - <span>Normal (default). High is lower and Low is higher CPU use</span> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Anonymous redirect</span> - <span class="component-desc"> - <input type="text" name="anon_redirect" value="$sickbeard.ANON_REDIRECT" class="form-control input-sm input300" /> - <div class="clear-left"><p>backlink protection via anonymizer service, must end in "?"</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="debug"> - <span class="component-title">Enable debug</span> - <span class="component-desc"> - <input type="checkbox" name="debug" id="debug" #if $sickbeard.DEBUG then 'checked="checked"' else ''#/> - <p>Enable debug logs<p> - </span> - </label> - </div> - <div class="field-pair"> + <div id="config-content"> + + <form id="configForm" action="saveGeneral" method="post"> + <div id="config-components"> + + <ul> + <li><a href="#core-component-group1">Misc</a></li> + <li><a href="#core-component-group2">Interface</a></li> + <li><a href="#core-component-group3">Advanced Settings</a></li> + </ul> + + <div id="core-component-group1"> + <div class="component-group"> + + <div class="component-group-desc"> + <h3>Misc</h3> + <p>Startup options. Indexer options. Log and show file locations.</p> + <p><b>Some options may require a manual restart to take effect.</b></p> + </div> + + <fieldset class="component-group-list"> + + <div class="field-pair"> + <label for="indexerDefaultLang"> + <span class="component-title">Default Indexer Language</span> + <span class="component-desc"> + <select name="indexerDefaultLang" id="indexerDefaultLang" class="form-control form-control-inline input-sm bfh-languages" data-language=$sickbeard.INDEXER_DEFAULT_LANGUAGE data-available="#echo ','.join($sickbeard.indexerApi().config['valid_languages'])#"></select> + <span>for adding shows and metadata providers</span> + </span> + </label> + </div> + <div class="field-pair"> + <label for="launch_browser"> + <span class="component-title">Launch browser</span> + <span class="component-desc"> + <input type="checkbox" name="launch_browser" id="launch_browser" #if $sickbeard.LAUNCH_BROWSER then 'checked="checked"' else ''#/> + <p>open the SickRage home page on startup</p> + </span> + </label> + </div> + <div class="field-pair"> + <label for="default_page"> + <span class="component-title">Initial page</span> + <span class="component-desc"> + <select id="default_page" name="default_page" class="form-control input-sm"> + <option value="news" #if $sickbeard.DEFAULT_PAGE == 'news' then 'selected="selected"' else ''#>News</option> + <option value="home" #if $sickbeard.DEFAULT_PAGE == 'home' then 'selected="selected"' else ''#>Home</option> + <option value="comingEpisodes" #if $sickbeard.DEFAULT_PAGE == 'comingEpisodes' then 'selected="selected"' else ''#>Coming Episodes</option> + <option value="history" #if $sickbeard.DEFAULT_PAGE == 'history' then 'selected="selected"' else ''#>History</option> + <option value="IRC" #if $sickbeard.DEFAULT_PAGE == 'IRC' then 'selected="selected"' else ''#>IRC</option> + </select> + <span>when launching SickRage interface</span> + </span> + </label> + </div> + <div class="field-pair"> + <label for="showupdate_hour"> + <span class="component-title">When to update shows</span> + <span class="component-desc"> + <input type="text" name="showupdate_hour" id="showupdate_hour" value="$sickbeard.SHOWUPDATE_HOUR" class="form-control input-sm input75" /> + <p>with information such as next air dates, show ended, etc. Use 15 for 3pm, 4 for 4am etc. Anything over 23 or under 0 will be set to 0 (12am)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="update_shows_on_start"> + <span class="component-title">Update shows on startup</span> + <span class="component-desc"> + <input type="checkbox" name="update_shows_on_start" id="update_shows_on_start" #if $sickbeard.UPDATE_SHOWS_ON_START then 'checked="checked"' else ''#/> + <p>with information such as next air dates, show ended, etc. Disable for a faster startup as show info is sheduled to update in the background anyway</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="update_shows_on_snatch"> + <span class="component-title">Update shows on snatch</span> + <span class="component-desc"> + <input type="checkbox" name="update_shows_on_snatch" id="update_shows_on_snatch" #if $sickbeard.UPDATE_SHOWS_ON_SNATCH then 'checked="checked"' else ''#/> + <p>with information such as next air dates, show ended, etc.</p> + </span> + </label> + </div> + + <div class="field-pair"> + <span class="component-title">Send to trash for actions</span> + <span class="component-desc"> + <label for="trash_remove_show" class="nextline-block"> + <input type="checkbox" name="trash_remove_show" id="trash_remove_show" #if $sickbeard.TRASH_REMOVE_SHOW then 'checked="checked"' else ''#/> + <p>when using show "Remove" and delete files</p> + </label> + <label for="trash_rotate_logs" class="nextline-block"> + <input type="checkbox" name="trash_rotate_logs" id="trash_rotate_logs" #if $sickbeard.TRASH_ROTATE_LOGS then 'checked="checked"' else ''#/> + <p>on scheduled deletes of the oldest log files</p> + </label> + <div class="clear-left"><p>selected actions use trash (recycle bin) instead of the default permanent delete</p></div> + </span> + </div> + + <div class="field-pair"> + <label for="log_dir"> + <span class="component-title">Log file folder location</span> + <span class="component-desc"> + <input type="text" name="log_dir" id="log_dir" value="$sickbeard.ACTUAL_LOG_DIR" class="form-control input-sm input350" /> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="log_nr"> + <span class="component-title">Number of Log files saved</span> + <span class="component-desc"> + <input type="text" name="log_nr" id="log_nr" value="$sickbeard.LOG_NR" class="form-control input-sm input75" /> + <p>number of log files saved when rotating logs (default: 5) (REQUIRES RESTART)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="log_size"> + <span class="component-title">Size of Log files saved</span> + <span class="component-desc"> + <input type="text" name="log_size" id="log_size" value="$sickbeard.LOG_SIZE" class="form-control input-sm input75" /> + <p>maximum size of a log file saved (default: 1048576 (1MB)) (REQUIRES RESTART)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="indexer_default"> + <span class="component-title">Use initial indexer set to</span> + <span class="component-desc"> + <select id="indexer_default" name="indexer_default" class="form-control input-sm"> + <option value="0" #if $indexer == 0 then 'selected="selected"' else ''#>All Indexers</option> + #for $indexer in $sickbeard.indexerApi().indexers + <option value="$indexer" #if $indexer == $sickbeard.INDEXER_DEFAULT then 'selected="selected"' else ''#>$sickbeard.indexerApi().indexers[$indexer]</option> + #end for + </select> + <span>as the default selection when adding new shows</span> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="indexer_timeout"> + <span class="component-title">Timeout show indexer at</span> + <span class="component-desc"> + <input type="text" name="indexer_timeout" id="indexer_timeout" value="$sickbeard.INDEXER_TIMEOUT" class="form-control input-sm input75" /> + <p>seconds of inactivity when finding new shows (default:10)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Show root directories</span> + <span class="component-desc"> + <p>where the files of shows are located</p> + #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_rootDirs.tmpl') + </span> + </label> + </div> + + <input type="submit" class="btn config_submitter" value="Save Changes" /> + </fieldset> + </div> + <div class="component-group"> + + <div class="component-group-desc"> + <h3>Updates</h3> + <p>Options for software updates.</p> + </div> + <fieldset class="component-group-list"> + + <div class="field-pair"> + <label for="version_notify"> + <span class="component-title">Check software updates</span> + <span class="component-desc"> + <input type="checkbox" name="version_notify" id="version_notify" #if $sickbeard.VERSION_NOTIFY then 'checked="checked"' else ''#/> + <p>and display notifications when updates are available. + Checks are run on startup and at the frequency set below*</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="auto_update"> + <span class="component-title">Automatically update</span> + <span class="component-desc"> + <input type="checkbox" name="auto_update" id="auto_update" #if $sickbeard.AUTO_UPDATE then 'checked="checked"' else ''#/> + <p>fetch and install software updates. + Updates are run on startup and in the background at the frequency set below*</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Check the server every*</span> + <span class="component-desc"> + <input type="text" name="update_frequency" id="update_frequency" value="$sickbeard.UPDATE_FREQUENCY" class="form-control input-sm input75" /> + <p>hours for software updates (default:12)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="notify_on_update"> + <span class="component-title">Notify on software update</span> + <span class="component-desc"> + <input type="checkbox" name="notify_on_update" id="notify_on_update" #if $sickbeard.NOTIFY_ON_UPDATE then 'checked="checked"' else ''#/> + <p>send a message to all enabled notifiers when SickRage has been updated</p> + </span> + </label> + </div> + + <input type="submit" class="btn config_submitter" value="Save Changes" /> + </fieldset> + + </div> + </div><!-- /component-group1 //--> + + + <div id="core-component-group2"> + <div class="component-group"> + + <div class="component-group-desc"> + <h3>User Interface</h3> + <p>Options for visual appearance.</p> + </div> + + <fieldset class="component-group-list"> + + <div class="field-pair"> + <label for="theme_name"> + <span class="component-title">Display theme:</span> + <span class="component-desc"> + <select id="theme_name" name="theme_name" class="form-control input-sm"> + <option value="dark" #if $sickbeard.THEME_NAME == 'dark' then 'selected="selected"' else ''#>Dark</option> + <option value="light" #if $sickbeard.THEME_NAME == 'light' then 'selected="selected"' else ''#>Light</option> + </select> + <span class="red-text">for appearance to take effect, save then refresh your browser</span> + </span> + </label> + </div> + <div class="field-pair"> + <label for="display_all_seasons"> + <span class="component-title">Show all seasons</span> + <span class="component-desc"> + <input type="checkbox" name="display_all_seasons" id="display_all_seasons" #if $sickbeard.DISPLAY_ALL_SEASONS then 'checked="checked"' else ''#> + <p>on the show summary page</p> + </span> + </label> + </div> + <div class="field-pair"> + <label for="sort_article"> + <span class="component-title">Sort with "The", "A", "An"</span> + <span class="component-desc"> + <input type="checkbox" name="sort_article" id="sort_article" #if $sickbeard.SORT_ARTICLE then 'checked="checked"' else ''#/> + <p>include articles ("The", "A", "An") when sorting show lists</p> + </span> + </label> + </div> + <div class="field-pair"> + <label for="filter_row"> + <span class="component-title">Filter Row</span> + <span class="component-desc"> + <input type="checkbox" name="filter_row" id="filter_row" #if $sickbeard.FILTER_ROW == True then 'checked="checked"' else ''#/> + <p>Add a filter row to the show display on the home page</p> + <p>Supports =, >, >=, <=, <, xx to yy , xx - yy</p> + <p><b>Note:</b> =, >, >=, <=, < should be first, followed by a space, then the value.</p> + <p>Examples: '> 90', '= 100', '0 to 99'</p> + </span> + </label> + </div> + <div class="field-pair"> + <label for="coming_eps_missed_range"> + <span class="component-title">Missed episodes range</span> + <span class="component-desc"> + <input type="number" step="1" min="7" name="coming_eps_missed_range" id="coming_eps_missed_range" value="$sickbeard.COMING_EPS_MISSED_RANGE" class="form-control input-sm input75" /> + <p>Set the range in days of the missed episodes in the Coming Episode page</p> + </span> + </label> + </div> + <div class="field-pair"> + <label for="fuzzy_dating"> + <span class="component-title">Display fuzzy dates</span> + <span class="component-desc"> + <input type="checkbox" name="fuzzy_dating" id="fuzzy_dating" class="viewIf datePresets" #if $sickbeard.FUZZY_DATING == True then 'checked="checked"' else ''#/> + <p>move absolute dates into tooltips and display e.g. "Last Thu", "On Tue"</p> + </span> + </label> + </div> + <div class="field-pair show_if_fuzzy_dating#if True == $sickbeard.FUZZY_DATING then '' else ' metadataDiv'#"> + <label for="trim_zero"> + <span class="component-title">Trim zero padding</span> + <span class="component-desc"> + <input type="checkbox" name="trim_zero" id="trim_zero" #if True == $sickbeard.TRIM_ZERO then 'checked="checked"' else ''#/> + <p>remove the leading number "0" shown on hour of day, and date of month</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="date_presets"> + <span class="component-title">Date style:</span> + <span class="component-desc"> + <select class="form-control input-sm #if True == $sickbeard.FUZZY_DATING then '' else ' metadataDiv'#" id="date_presets#if True == $sickbeard.FUZZY_DATING then '' else '_na'#" name="date_preset#if True == $sickbeard.FUZZY_DATING then '' else '_na'#"> + #for $cur_preset in $date_presets: + <option value="$cur_preset" #if $cur_preset == $sickbeard.DATE_PRESET or ("%x" == $sickbeard.DATE_PRESET and "$cur_preset" == '%a, %b %d, %Y') then 'selected="selected"' else ''#>$datetime.datetime($datetime.datetime.now().year, 12, 31, 14, 30, 47).strftime($cur_preset)</option> + #end for + </select> + + <select class="form-control input-sm #if True != $sickbeard.FUZZY_DATING then '' else ' metadataDiv'#" id="date_presets#if True != $sickbeard.FUZZY_DATING then '' else '_na'#" name="date_preset#if True != $sickbeard.FUZZY_DATING then '' else '_na'#"> + <option value="%x" #if "%x" == $sickbeard.DATE_PRESET then 'selected="selected"' else ''#>Use System Default</option> + #for $cur_preset in $date_presets: + <option value="$cur_preset" #if $cur_preset == $sickbeard.DATE_PRESET then 'selected="selected"' else ''#>$datetime.datetime($datetime.datetime.now().year, 12, 31, 14, 30, 47).strftime($cur_preset)</option> + #end for + </select> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="time_presets"> + <span class="component-title">Time style:</span> + <span class="component-desc"> + <select id="time_presets" name="time_preset" class="form-control input-sm"> + #for $cur_preset in $time_presets: + <option value="$cur_preset" #if $cur_preset == $sickbeard.TIME_PRESET_W_SECONDS then 'selected="selected"' else ''#>$sbdatetime.now().sbftime(show_seconds=True,t_preset=$cur_preset)</option> + #end for + </select> + <span><b>note:</b> seconds are only shown on the History page</span> + </span> + </label> + </div> + + <div class="field-pair"> + <span class="component-title">Timezone:</span> + <span class="component-desc"> + <label for="local" class="space-right"> + <input type="radio" name="timezone_display" id="local" value="local" #if "local" == $sickbeard.TIMEZONE_DISPLAY then 'checked="checked"' else ''# />Local + </label> + <label for="network"> + <input type="radio" name="timezone_display" id="network" value="network" #if "network" == $sickbeard.TIMEZONE_DISPLAY then 'checked="checked"' else ''# />Network + </label> + <div class="clear-left"><p>display dates and times in either your timezone or the shows network timezone</p></div> + </span> + </div> + + <div class="field-pair"> + <label for="download_url"> + <span class="component-title">Download url</span> + <input type="text" name="download_url" id="download_url" value="$sickbeard.DOWNLOAD_URL" size="35" /> + </label> + <label> + <span class="component-title"> </span> + <span class="component-desc">URL where the shows can be downloaded.</span> + </label> + </div> + + + <input type="submit" class="btn config_submitter" value="Save Changes" /> + + </fieldset> + + </div><!-- /User interface component-group --> + + <div class="component-group"> + + <div class="component-group-desc"> + <h3>Web Interface</h3> + <p>It is recommended that you enable a username and password to secure SickRage from being tampered with remotely.</p> + <p><b>These options require a manual restart to take effect.</b></p> + </div> + + <fieldset class="component-group-list"> + + <div class="field-pair"> + <label for="api_key"> + <span class="component-title">API key</span> + <span class="component-desc"> + <input type="text" name="api_key" id="api_key" value="$sickbeard.API_KEY" class="form-control input-sm input300" readonly="readonly" /> + <input class="btn btn-inline" type="button" id="generate_new_apikey" value="Generate"> + <div class="clear-left"><p>used to give 3rd party programs limited access to SickRage</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="web_log"> + <span class="component-title">HTTP logs</span> + <span class="component-desc"> + <input type="checkbox" name="web_log" id="web_log" #if $sickbeard.WEB_LOG then 'checked="checked"' else ''#/> + <p>enable logs from the internal Tornado web server</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="web_username"> + <span class="component-title">HTTP username</span> + <span class="component-desc"> + <input type="text" name="web_username" id="web_username" value="$sickbeard.WEB_USERNAME" class="form-control input-sm input300" /> + <p>set blank for no login</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="web_password"> + <span class="component-title">HTTP password</span> + <span class="component-desc"> + <input type="password" name="web_password" id="web_password" value="$sickbeard.WEB_PASSWORD" class="form-control input-sm input300" /> + <p>blank = no authentication</span> + </label> + </div> + + <div class="field-pair"> + <label for="web_port"> + <span class="component-title">HTTP port</span> + <span class="component-desc"> + <input type="text" name="web_port" id="web_port" value="$sickbeard.WEB_PORT" class="form-control input-sm input100" /> + <p>web port to browse and access SickRage (default:8081)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="web_ipv6"> + <span class="component-title">Listen on IPv6</span> + <span class="component-desc"> + <input type="checkbox" name="web_ipv6" id="web_ipv6" #if $sickbeard.WEB_IPV6 then 'checked="checked"' else ''#/> + <p>attempt binding to any available IPv6 address</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="enable_https"> + <span class="component-title">Enable HTTPS</span> + <span class="component-desc"> + <input type="checkbox" name="enable_https" class="enabler" id="enable_https" #if $sickbeard.ENABLE_HTTPS then 'checked="checked"' else ''#/> + <p>enable access to the web interface using a HTTPS address</p> + </span> + </label> + </div> + <div id="content_enable_https"> + <div class="field-pair"> + <label for="https_cert"> + <span class="component-title">HTTPS certificate</span> + <span class="component-desc"> + <input type="text" name="https_cert" id="https_cert" value="$sickbeard.HTTPS_CERT" class="form-control input-sm input300" /> + <div class="clear-left"><p>file name or path to HTTPS certificate</p></div> + </span> + </label> + </div> + <div class="field-pair"> + <label for="https_key"> + <span class="component-title">HTTPS key</span> + <span class="component-desc"> + <input type="text" name="https_key" id="https_key" value="$sickbeard.HTTPS_KEY" class="form-control input-sm input300" /> + <div class="clear-left"><p>file name or path to HTTPS key</p></div> + </span> + </label> + </div> + </div> + + <div class="field-pair"> + <label for="handle_reverse_proxy"> + <span class="component-title">Reverse proxy headers</span> + <span class="component-desc"> + <input type="checkbox" name="handle_reverse_proxy" id="handle_reverse_proxy" #if $sickbeard.HANDLE_REVERSE_PROXY then 'checked="checked"' else ''#/> + <p>accept the following reverse proxy headers (advanced)...<br />(X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto)</p> + </span> + </label> + </div> + + <input type="submit" class="btn config_submitter" value="Save Changes" /> + + </fieldset> + + </div><!-- /component-group2 //--> + </div> + + + <div id="core-component-group3" class="component-group"> + + <div class="component-group"> + + <div class="component-group-desc"> + <h3>Advanced Settings</h3> + </div> + + <fieldset class="component-group-list"> + + <div class="field-pair"> + <label> + <span class="component-title">CPU throttling:</span> + <span class="component-desc"> + <select id="cpu_presets" name="cpu_preset" class="form-control input-sm"> + #for $cur_preset in $cpu_presets: + <option value="$cur_preset" #if $cur_preset == $sickbeard.CPU_PRESET then 'selected="selected"' else ''#>$cur_preset.capitalize()</option> + #end for + </select> + <span>Normal (default). High is lower and Low is higher CPU use</span> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Anonymous redirect</span> + <span class="component-desc"> + <input type="text" name="anon_redirect" value="$sickbeard.ANON_REDIRECT" class="form-control input-sm input300" /> + <div class="clear-left"><p>backlink protection via anonymizer service, must end in "?"</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="debug"> + <span class="component-title">Enable debug</span> + <span class="component-desc"> + <input type="checkbox" name="debug" id="debug" #if $sickbeard.DEBUG then 'checked="checked"' else ''#/> + <p>Enable debug logs<p> + </span> + </label> + </div> + <div class="field-pair"> <label for="ssl_verify"> <span class="component-title">Verify SSL Certs</span> <span class="component-desc"> @@ -592,201 +592,201 @@ </span> </label> </div> - <div class="field-pair"> - <label for="no_restart"> - <span class="component-title">No Restart</span> - <span class="component-desc"> - <input type="checkbox" name="no_restart" id="no_restart" #if $sickbeard.NO_RESTART then 'checked="checked"' else ''#/> - <p>Only shutdown when restarting SR. - Only select this when you have external software restarting SR automatically when it stops (like FireDaemon)</p> - </span> - - </label> - </div> - - <div class="field-pair"> - <label for="encryption_version"> - <span class="component-title">Encrypt passwords</span> - <span class="component-desc"> - <input type="checkbox" name="encryption_version" id="encryption_version" #if $sickbeard.ENCRYPTION_VERSION then 'checked="checked"' else ''#/> - <p>in the <code>config.ini</code> file. - <b>Warning:</b> Passwords must only contain <a target="_blank" href="<%= anon_url('http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters') %>">ASCII characters</a></p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="calendar_unprotected"> - <span class="component-title">Unprotected calendar</span> - <span class="component-desc"> - <input type="checkbox" name="calendar_unprotected" id="calendar_unprotected" #if $sickbeard.CALENDAR_UNPROTECTED then 'checked="checked"' else ''#/> - <p>allow subscribing to the calendar without user and password. - Some services like Google Calendar only work this way</p> - </span> - - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Proxy host</span> - <span class="component-desc"> - <input type="text" name="proxy_setting" value="$sickbeard.PROXY_SETTING" class="form-control input-sm input300" /> - <div class="clear-left"><p>blank to disable or proxy to use when connecting to providers</p></div> - </label> - </div> - - <div class="field-pair"> - <label for="proxy_indexers"> - <span class="component-title">Use proxy for indexers</span> - <span class="component-desc"> - <input type="checkbox" name="proxy_indexers" id="proxy_indexers" #if True == $sickbeard.PROXY_INDEXERS then 'checked="checked"' else ''#/> - <p>use proxy host for connecting to indexers (thetvdb, tvrage)</p> - </span> - </label> - </div> - <div class="field-pair"> - <label for="ep_default_deleted_status"> - <span class="component-title">Default deleted episode status:</span> - <span class="component-desc"> + <div class="field-pair"> + <label for="no_restart"> + <span class="component-title">No Restart</span> + <span class="component-desc"> + <input type="checkbox" name="no_restart" id="no_restart" #if $sickbeard.NO_RESTART then 'checked="checked"' else ''#/> + <p>Only shutdown when restarting SR. + Only select this when you have external software restarting SR automatically when it stops (like FireDaemon)</p> + </span> + + </label> + </div> + + <div class="field-pair"> + <label for="encryption_version"> + <span class="component-title">Encrypt passwords</span> + <span class="component-desc"> + <input type="checkbox" name="encryption_version" id="encryption_version" #if $sickbeard.ENCRYPTION_VERSION then 'checked="checked"' else ''#/> + <p>in the <code>config.ini</code> file. + <b>Warning:</b> Passwords must only contain <a target="_blank" href="<%= anon_url('http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters') %>">ASCII characters</a></p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="calendar_unprotected"> + <span class="component-title">Unprotected calendar</span> + <span class="component-desc"> + <input type="checkbox" name="calendar_unprotected" id="calendar_unprotected" #if $sickbeard.CALENDAR_UNPROTECTED then 'checked="checked"' else ''#/> + <p>allow subscribing to the calendar without user and password. + Some services like Google Calendar only work this way</p> + </span> + + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Proxy host</span> + <span class="component-desc"> + <input type="text" name="proxy_setting" value="$sickbeard.PROXY_SETTING" class="form-control input-sm input300" /> + <div class="clear-left"><p>blank to disable or proxy to use when connecting to providers</p></div> + </label> + </div> + + <div class="field-pair"> + <label for="proxy_indexers"> + <span class="component-title">Use proxy for indexers</span> + <span class="component-desc"> + <input type="checkbox" name="proxy_indexers" id="proxy_indexers" #if True == $sickbeard.PROXY_INDEXERS then 'checked="checked"' else ''#/> + <p>use proxy host for connecting to indexers (thetvdb, tvrage)</p> + </span> + </label> + </div> + <div class="field-pair"> + <label for="ep_default_deleted_status"> + <span class="component-title">Default deleted episode status:</span> + <span class="component-desc"> #if not $sickbeard.SKIP_REMOVED_FILES or ($sickbeard.USE_TRAKT and $sickbeard.TRAKT_USE_ROLLING_DOWNLOAD) - <select name="ep_default_deleted_status" id="ep_default_deleted_status" class="form-control input-sm"> - #for $defStatus in [$ARCHIVED, $IGNORED]: - <option value="$defStatus" #if $defStatus == $sickbeard.EP_DEFAULT_DELETED_STATUS then 'selected="selected"' else ''#>$statusStrings[$defStatus]</option> - #end for - </select> + <select name="ep_default_deleted_status" id="ep_default_deleted_status" class="form-control input-sm"> + #for $defStatus in [$ARCHIVED, $IGNORED]: + <option value="$defStatus" #if $defStatus == $sickbeard.EP_DEFAULT_DELETED_STATUS then 'selected="selected"' else ''#>$statusStrings[$defStatus]</option> + #end for + </select> #else - <select name="ep_default_deleted_status" id="ep_default_deleted_status" class="form-control input-sm" disabled="disabled"> - #for $defStatus in [$ARCHIVED, $IGNORED]: - <option value="$defStatus" #if $defStatus == $sickbeard.EP_DEFAULT_DELETED_STATUS then 'selected="selected"' else ''#>$statusStrings[$defStatus]</option> - #end for - </select> - <input type="hidden" name="ep_default_deleted_status" value="$sickbeard.EP_DEFAULT_DELETED_STATUS" /> + <select name="ep_default_deleted_status" id="ep_default_deleted_status" class="form-control input-sm" disabled="disabled"> + #for $defStatus in [$ARCHIVED, $IGNORED]: + <option value="$defStatus" #if $defStatus == $sickbeard.EP_DEFAULT_DELETED_STATUS then 'selected="selected"' else ''#>$statusStrings[$defStatus]</option> + #end for + </select> + <input type="hidden" name="ep_default_deleted_status" value="$sickbeard.EP_DEFAULT_DELETED_STATUS" /> #end if - <span>Define the status to be set for media file that has been deleted.</span> - </span> - </label> - </div> - - <input type="submit" class="btn config_submitter" value="Save Changes" /> - </fieldset> - </div> - - <div class="component-group"> - - <div class="component-group-desc"> - <h3>GitHub</h3> - <p>Options for github related features.</p> - </div> - <fieldset class="component-group-list"> - - <div class="field-pair"> - <label> - <span class="component-title">Branch version:</span> - <span class="component-desc"> - <select id="branchVersion" class="form-control form-control-inline input-sm pull-left"> - #set $gh_branch = $sickbeard.versionCheckScheduler.action.list_remote_branches() - #if $gh_branch: - #for $cur_branch in $gh_branch: - #if $sickbeard.GIT_USERNAME and $sickbeard.GIT_PASSWORD and $sickbeard.DEVELOPER == 1 - <option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option> - #else if $sickbeard.GIT_USERNAME and $sickbeard.GIT_PASSWORD and $cur_branch in ['master', 'develop'] - <option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option> - #else if $cur_branch == 'master' - <option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option> - #end if - #end for - #end if - </select> - #if not $gh_branch - <input class="btn btn-inline" style="margin-left: 6px;" type="button" id="branchCheckout" value="Checkout Branch" disabled> - #else - <input class="btn btn-inline" style="margin-left: 6px;" type="button" id="branchCheckout" value="Checkout Branch"> - #end if - #if not $gh_branch - <div class="clear-left" style="color:#FF0000"><p>Error: No branches found.</p></div> - #else - <div class="clear-left"><p>select branch to use (restart required)</p></div> - #end if - </span> - </label> - </div> - - <div class="field-pair"> - <label for="git_username"> - <span class="component-title">GitHub username</span> - <span class="component-desc"> - <input type="text" name="git_username" id="git_username" value="$sickbeard.GIT_USERNAME" class="form-control input-sm input300" /> - <div class="clear-left"><p>*** (REQUIRED FOR SUBMITTING ISSUES) ***</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="git_password"> - <span class="component-title">GitHub password</span> - <span class="component-desc"> - <input type="password" name="git_password" id="git_password" value="$sickbeard.GIT_PASSWORD" class="form-control input-sm input300" /> - <div class="clear-left"><p>*** (REQUIRED FOR SUBMITTING ISSUES) ***</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="git_remote"> - <span class="component-title">GitHub remote for branch</span> - <span class="component-desc"> - <input type="text" name="git_remote" id="git_remote" value="$sickbeard.GIT_REMOTE" class="form-control input-sm input300" /> - <div class="clear-left"><p>default:origin. Access repo configured remotes (save then refresh browser)</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Git executable path</span> - <span class="component-desc"> - <input type="text" name="git_path" value="$sickbeard.GIT_PATH" class="form-control input-sm input300" /> - <div class="clear-left"><p>only needed if OS is unable to locate git from env</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="git_reset"> - <span class="component-title">Git reset</span> - <span class="component-desc"> - <input type="checkbox" name="git_reset" id="git_reset" #if True == $sickbeard.GIT_RESET then 'checked="checked"' else ''#/> - <p>removes untracked files and performs a hard reset on git branch automatically to help resolve update issues</p> - </span> - </label> - </div> - - <div class="field-pair" hidden> - <label for="git_autoissues"> - <span class="component-title">Git auto-issues submit</span> - <span class="component-desc"> - <input type="checkbox" name="git_autoissues" id="git_autoissues" #if True == $sickbeard.GIT_AUTOISSUES then 'checked="checked"' else ''# disable/> - <p>automatically submit bug/issue reports to our issue tracker when errors are logged</p> - </span> - </label> - </div> - - <input type="submit" class="btn config_submitter" value="Save Changes" /> - </fieldset> - - </div> - - </div><!-- /component-group3 //--> - - <br/> - <h6 class="pull-right"><b>All non-absolute folder locations are relative to <span class="path">$sickbeard.DATA_DIR</span></b> </h6> - <input type="submit" class="btn pull-left config_submitter button" value="Save Changes" /> - - </div><!-- /config-components --> - - </form> - </div> + <span>Define the status to be set for media file that has been deleted.</span> + </span> + </label> + </div> + + <input type="submit" class="btn config_submitter" value="Save Changes" /> + </fieldset> + </div> + + <div class="component-group"> + + <div class="component-group-desc"> + <h3>GitHub</h3> + <p>Options for github related features.</p> + </div> + <fieldset class="component-group-list"> + + <div class="field-pair"> + <label> + <span class="component-title">Branch version:</span> + <span class="component-desc"> + <select id="branchVersion" class="form-control form-control-inline input-sm pull-left"> + #set $gh_branch = $sickbeard.versionCheckScheduler.action.list_remote_branches() + #if $gh_branch: + #for $cur_branch in $gh_branch: + #if $sickbeard.GIT_USERNAME and $sickbeard.GIT_PASSWORD and $sickbeard.DEVELOPER == 1 + <option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option> + #else if $sickbeard.GIT_USERNAME and $sickbeard.GIT_PASSWORD and $cur_branch in ['master', 'develop'] + <option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option> + #else if $cur_branch == 'master' + <option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option> + #end if + #end for + #end if + </select> + #if not $gh_branch + <input class="btn btn-inline" style="margin-left: 6px;" type="button" id="branchCheckout" value="Checkout Branch" disabled> + #else + <input class="btn btn-inline" style="margin-left: 6px;" type="button" id="branchCheckout" value="Checkout Branch"> + #end if + #if not $gh_branch + <div class="clear-left" style="color:#FF0000"><p>Error: No branches found.</p></div> + #else + <div class="clear-left"><p>select branch to use (restart required)</p></div> + #end if + </span> + </label> + </div> + + <div class="field-pair"> + <label for="git_username"> + <span class="component-title">GitHub username</span> + <span class="component-desc"> + <input type="text" name="git_username" id="git_username" value="$sickbeard.GIT_USERNAME" class="form-control input-sm input300" /> + <div class="clear-left"><p>*** (REQUIRED FOR SUBMITTING ISSUES) ***</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="git_password"> + <span class="component-title">GitHub password</span> + <span class="component-desc"> + <input type="password" name="git_password" id="git_password" value="$sickbeard.GIT_PASSWORD" class="form-control input-sm input300" /> + <div class="clear-left"><p>*** (REQUIRED FOR SUBMITTING ISSUES) ***</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="git_remote"> + <span class="component-title">GitHub remote for branch</span> + <span class="component-desc"> + <input type="text" name="git_remote" id="git_remote" value="$sickbeard.GIT_REMOTE" class="form-control input-sm input300" /> + <div class="clear-left"><p>default:origin. Access repo configured remotes (save then refresh browser)</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Git executable path</span> + <span class="component-desc"> + <input type="text" name="git_path" value="$sickbeard.GIT_PATH" class="form-control input-sm input300" /> + <div class="clear-left"><p>only needed if OS is unable to locate git from env</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="git_reset"> + <span class="component-title">Git reset</span> + <span class="component-desc"> + <input type="checkbox" name="git_reset" id="git_reset" #if True == $sickbeard.GIT_RESET then 'checked="checked"' else ''#/> + <p>removes untracked files and performs a hard reset on git branch automatically to help resolve update issues</p> + </span> + </label> + </div> + + <div class="field-pair" hidden> + <label for="git_autoissues"> + <span class="component-title">Git auto-issues submit</span> + <span class="component-desc"> + <input type="checkbox" name="git_autoissues" id="git_autoissues" #if True == $sickbeard.GIT_AUTOISSUES then 'checked="checked"' else ''# disable/> + <p>automatically submit bug/issue reports to our issue tracker when errors are logged</p> + </span> + </label> + </div> + + <input type="submit" class="btn config_submitter" value="Save Changes" /> + </fieldset> + + </div> + + </div><!-- /component-group3 //--> + + <br/> + <h6 class="pull-right"><b>All non-absolute folder locations are relative to <span class="path">$sickbeard.DATA_DIR</span></b> </h6> + <input type="submit" class="btn pull-left config_submitter button" value="Save Changes" /> + + </div><!-- /config-components --> + + </form> + </div> </div> <div></div> diff --git a/gui/slick/interfaces/default/config_notifications.tmpl b/gui/slick/interfaces/default/config_notifications.tmpl index ddb12a1b64b31c868ec06880bd630958c98673c5..1afaa4322342472ecd8329ce66f5b561b1492dcf 100644 --- a/gui/slick/interfaces/default/config_notifications.tmpl +++ b/gui/slick/interfaces/default/config_notifications.tmpl @@ -188,7 +188,7 @@ <span class="component-title"> </span> <span class="component-desc">(<a href="<%= anon_url('https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token') %>" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;"><u>Finding your account token</u></a>)</span> </label> - </div> + </div> <div class="component-group" style="padding: 0; min-height: 130px"> <div class="field-pair"> <label for="plex_username"> @@ -209,7 +209,7 @@ </label> </div> </div> - + <div class="component-group" style="padding: 0; min-height: 50px"> <div class="field-pair"> <label for="plex_update_library"> @@ -244,7 +244,7 @@ </div><!-- /content_use_plex --> </fieldset> </div><!-- /plex media server component-group --> - + <div class="component-group"> <div class="component-group-desc"> <img class="notifier-icon" src="$sbRoot/images/notifiers/plex.png" alt="" title="Plex Media Client" /> @@ -260,7 +260,7 @@ </span> </label> </div> - + <div id="content_use_plex_client"> <div class="field-pair"> <label for="plex_notify_onsnatch"> @@ -320,7 +320,7 @@ </label> </div> </div> - + <div class="field-pair"> <div class="testNotification" id="testPMC-result">Click below to test Plex client(s)</div> <input class="btn" type="button" value="Test Plex Client" id="testPMC" /> @@ -1511,7 +1511,7 @@ <p>Remove an Episode from your Trakt Collection if it is not in your SickRage Library.</p> </span> </label> - </div> + </div> </div> <div class="field-pair"> <label for="trakt_sync_watchlist"> @@ -1611,7 +1611,7 @@ <label> <span class="component-title"> </span> <span class="component-desc">Episodes that Sickrage will download based on the last watched episode</span> - </label> + </label> </div> <div class="field-pair"> <label for="trakt_rolling_frequency"> @@ -1631,7 +1631,7 @@ <label> <span class="component-title"> </span> <span class="component-desc">Stop rolling download to start to download episode.</span> - </label> + </label> </div> </div> <div class="testNotification" id="testTrakt-result">Click below to test.</div> diff --git a/gui/slick/interfaces/default/config_postProcessing.tmpl b/gui/slick/interfaces/default/config_postProcessing.tmpl index 4f6853389642d9def9fbb4761e51cb9d7e05dba5..878861a81cea9e06d0c454a85d4d3a144468d843 100644 --- a/gui/slick/interfaces/default/config_postProcessing.tmpl +++ b/gui/slick/interfaces/default/config_postProcessing.tmpl @@ -17,10 +17,10 @@ <script type="text/javascript" src="$sbRoot/js/configPostProcessing.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/config.js?$sbPID"></script> <div id="content960"> -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <div id="config"> <div id="config-content"> @@ -29,11 +29,11 @@ <div id="config-components"> <ul> - <li><a href="#core-component-group1">Post-Processing</a></li> - <li><a href="#core-component-group2">Episode Naming</a></li> - <li><a href="#core-component-group3">Metadata</a></li> + <li><a href="#core-component-group1">Post-Processing</a></li> + <li><a href="#core-component-group2">Episode Naming</a></li> + <li><a href="#core-component-group3">Metadata</a></li> </ul> - + <div id="core-component-group1" class="component-group"> <div class="component-group-desc"> @@ -64,7 +64,7 @@ <span class="component-desc">Or if SABnzbd+ and SickRage are on different PCs.</span> </label> </div> - + <div class="field-pair"> <label class="nocheck" for="process_method"> <span class="component-title">Process Episode Method:</span> @@ -79,7 +79,7 @@ #end if <option value="$curAction" $process_method>$process_method_text[$curAction]</option> #end for - </select> + </select> </span> </label> <label class="nocheck"> @@ -92,7 +92,7 @@ <label for="del_rar_contents"> <span class="component-title">Delete RAR contents</span> <span class="component-desc">Delete content of RAR files, even if Process Method not set to move?</span> - </label> + </label> </div> <div class="field-pair"> <input type="checkbox" name="skip_removed_files" id="skip_removed_files" #if $sickbeard.SKIP_REMOVED_FILES == True then "checked=\"checked\"" else ""# /> @@ -100,36 +100,36 @@ <span class="component-title">Skip Remove Detection</span> <span class="component-desc">Skip detection of removed files, so they don't get set to ignored/archived?</span> </label> - <label class="nocheck"> - <span class="component-title"> </span> - <span class="component-desc"><b>NOTE:</b> This may mean SickRage misses renames as well</span> - </label> + <label class="nocheck"> + <span class="component-title"> </span> + <span class="component-desc"><b>NOTE:</b> This may mean SickRage misses renames as well</span> + </label> + </div> + <div class="field-pair"> + <label class="nocheck"> + <span class="component-title">Extra Scripts</span> + <input type="text" name="extra_scripts" value="<%='|'.join(sickbeard.EXTRA_SCRIPTS)%>" class="form-control input-sm input350" /> + </label> + <label class="nocheck"> + <span class="component-title"> </span> + <span class="component-desc"><b>NOTE:</b></span> + </label> + <label class="nocheck"> + <span class="component-title"> </span> + <span class="component-desc"> + <ul> + <li>See <a href="https://github.com/SiCKRAGETV/SickRage/wiki/Post%20Processing"><font color='red'><b>Wiki</b></font></a> for a script arguments description.</li> + <li>Additional scripts separated by <b>|</b>.</li> + <li>Scripts are called after SickRage's own post-processing.</li> + <li>For any scripted languages, include the interpreter executable before the script. See the following example:</li> + <ul> + <li>For Windows: <pre>C:\Python27\pythonw.exe C:\Script\test.py</pre></li> + <li>For Linux: <pre>python /Script/test.py</pre></li> + </ul> + </ul> + </span> + </label> </div> - <div class="field-pair"> - <label class="nocheck"> - <span class="component-title">Extra Scripts</span> - <input type="text" name="extra_scripts" value="<%='|'.join(sickbeard.EXTRA_SCRIPTS)%>" class="form-control input-sm input350" /> - </label> - <label class="nocheck"> - <span class="component-title"> </span> - <span class="component-desc"><b>NOTE:</b></span> - </label> - <label class="nocheck"> - <span class="component-title"> </span> - <span class="component-desc"> - <ul> - <li>See <a href="https://github.com/SiCKRAGETV/SickRage/wiki/Post%20Processing"><font color='red'><b>Wiki</b></font></a> for a script arguments description.</li> - <li>Additional scripts separated by <b>|</b>.</li> - <li>Scripts are called after SickRage's own post-processing.</li> - <li>For any scripted languages, include the interpreter executable before the script. See the following example:</li> - <ul> - <li>For Windows: <pre>C:\Python27\pythonw.exe C:\Script\test.py</pre></li> - <li>For Linux: <pre>python /Script/test.py</pre></li> - </ul> - </ul> - </span> - </label> - </div> <div class="field-pair"> <input type="checkbox" name="move_associated_files" id="move_associated_files" #if $sickbeard.MOVE_ASSOCIATED_FILES == True then "checked=\"checked\"" else ""# /> @@ -138,7 +138,7 @@ <span class="component-desc">Move srr/srt/sfv/etc files with the episode when processed?</span> </label> </div> - <div class="field-pair"> + <div class="field-pair"> <label class="nocheck"> <span class="component-title">Sync File Extensions</span> <input type="text" name="sync_files" id="sync_files" value="$sickbeard.SYNC_FILES" class="form-control input-sm input350" /> @@ -197,9 +197,9 @@ <label class="nocheck"> <span class="component-title"> </span> <span class="component-desc">eg. NZBMedia w/ NZBGET, sabToSickbeard w/ SABnzbd+!</span> - </label> + </label> </div> - + <div class="field-pair"> <input type="checkbox" name="no_delete" id="no_delete" #if $sickbeard.NO_DELETE == True then "checked=\"checked\"" else ""# /> <label for="no_delete"> @@ -234,7 +234,7 @@ <span class="component-desc"><b>NOTE:</b> Only working with RAR archive</span> </label> </div> - + <div class="field-pair"> <input id="use_failed_downloads" type="checkbox" class="enabler" name="use_failed_downloads" #if $sickbeard.USE_FAILED_DOWNLOADS == True then "checked=\"checked\"" else ""# /> <label for="use_failed_downloads"> @@ -245,7 +245,7 @@ <span class="component-title"> </span> </label> </div> - + <div id="content_use_failed_downloads"> <div class="field-pair"> <input id="delete_failed" type="checkbox" name="delete_failed" #if $sickbeard.DELETE_FAILED == True then "checked=\"checked\"" else ""# /> @@ -431,7 +431,7 @@ <br/> </div> </div> - + <div class="field-pair"> <label class="nocheck" for="naming_multi_ep"> <span class="component-title">Multi-Episode Style:</span> @@ -461,16 +461,16 @@ <br/> </div> - <div class="field-pair"> - <input type="checkbox" id="naming_strip_year" name="naming_strip_year" #if $sickbeard.NAMING_STRIP_YEAR then "checked=\"checked\"" else ""#/> - <label for="naming_strip_year"> - <span class="component-title">Strip Show Year</span> - <span class="component-desc">Remove the TV show's year when renaming the file?</span> - </label> - <label class="nocheck"> - <span class="component-title"> </span> - <span class="component-desc">Only applies to shows that have year inside parentheses</span> - </label> + <div class="field-pair"> + <input type="checkbox" id="naming_strip_year" name="naming_strip_year" #if $sickbeard.NAMING_STRIP_YEAR then "checked=\"checked\"" else ""#/> + <label for="naming_strip_year"> + <span class="component-title">Strip Show Year</span> + <span class="component-desc">Remove the TV show's year when renaming the file?</span> + </label> + <label class="nocheck"> + <span class="component-title"> </span> + <span class="component-desc">Only applies to shows that have year inside parentheses</span> + </label> </div> <div class="field-pair"> @@ -639,7 +639,7 @@ <br/> </div> </div><!-- /naming_abd_custom --> - + <div id="naming_abd_example_div"> <h3>Sample:</h3> <div class="example"> @@ -816,7 +816,7 @@ <br/> </div> </div><!-- /naming_sports_custom --> - + <div id="naming_sports_example_div"> <h3>Sample:</h3> <div class="example"> @@ -1063,7 +1063,7 @@ </fieldset> </div><!-- /component-group2 //--> - <div id="core-component-group3" class="component-group"> + <div id="core-component-group3" class="component-group"> <div class="component-group-desc"> <h3>Metadata</h3> @@ -1078,7 +1078,7 @@ #set $m_dict = $metadata.get_metadata_generator_dict() <select id="metadataType" class="form-control input-sm"> #for ($cur_name, $cur_generator) in sorted($m_dict.items()): - <option value="$cur_generator.get_id()">$cur_name</option> + <option value="$cur_generator.get_id()">$cur_name</option> #end for </select> </span> @@ -1086,56 +1086,56 @@ <span>Toggle the metadata options that you wish to be created. <b>Multiple targets may be used.</b></span> </div> - #for ($cur_name, $cur_generator) in $m_dict.items(): - #set $cur_metadata_inst = $sickbeard.metadata_provider_dict[$cur_generator.name] - #set $cur_id = $cur_generator.get_id() - <div class="metadataDiv" id="$cur_id"> - <div class="metadata_options_wrapper"> - <h4>Create:</h4> - <div class="metadata_options"> - <label for="${cur_id}_show_metadata"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_show_metadata" #if $cur_metadata_inst.show_metadata then "checked=\"checked\"" else ""#/> Show Metadata</label> - <label for="${cur_id}_episode_metadata"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_episode_metadata" #if $cur_metadata_inst.episode_metadata then "checked=\"checked\"" else ""#/> Episode Metadata</label> - <label for="${cur_id}_fanart"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_fanart" #if $cur_metadata_inst.fanart then "checked=\"checked\"" else ""#/> Show Fanart</label> - <label for="${cur_id}_poster"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_poster" #if $cur_metadata_inst.poster then "checked=\"checked\"" else ""#/> Show Poster</label> - <label for="${cur_id}_banner"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_banner" #if $cur_metadata_inst.banner then "checked=\"checked\"" else ""#/> Show Banner</label> - <label for="${cur_id}_episode_thumbnails"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_episode_thumbnails" #if $cur_metadata_inst.episode_thumbnails then "checked=\"checked\"" else ""#/> Episode Thumbnails</label> - <label for="${cur_id}_season_posters"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_posters" #if $cur_metadata_inst.season_posters then "checked=\"checked\"" else ""#/> Season Posters</label> - <label for="${cur_id}_season_banners"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_banners" #if $cur_metadata_inst.season_banners then "checked=\"checked\"" else ""#/> Season Banners</label> - <label for="${cur_id}_season_all_poster"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_all_poster" #if $cur_metadata_inst.season_all_poster then "checked=\"checked\"" else ""#/> Season All Poster</label> - <label for="${cur_id}_season_all_banner"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_all_banner" #if $cur_metadata_inst.season_all_banner then "checked=\"checked\"" else ""#/> Season All Banner</label> - </div> - </div> - <div class="metadata_example_wrapper"> - <h4>Results:</h4> - <div class="metadata_example"> - <label for="${cur_id}_show_metadata"><span id="${cur_id}_eg_show_metadata">$cur_metadata_inst.eg_show_metadata</span></label> - <label for="${cur_id}_episode_metadata"><span id="${cur_id}_eg_episode_metadata">$cur_metadata_inst.eg_episode_metadata</span></label> - <label for="${cur_id}_fanart"><span id="${cur_id}_eg_fanart">$cur_metadata_inst.eg_fanart</span></label> - <label for="${cur_id}_poster"><span id="${cur_id}_eg_poster">$cur_metadata_inst.eg_poster</span></label> - <label for="${cur_id}_banner"><span id="${cur_id}_eg_banner">$cur_metadata_inst.eg_banner</span></label> - <label for="${cur_id}_episode_thumbnails"><span id="${cur_id}_eg_episode_thumbnails">$cur_metadata_inst.eg_episode_thumbnails</span></label> - <label for="${cur_id}_season_posters"><span id="${cur_id}_eg_season_posters">$cur_metadata_inst.eg_season_posters</span></label> - <label for="${cur_id}_season_banners"><span id="${cur_id}_eg_season_banners">$cur_metadata_inst.eg_season_banners</span></label> - <label for="${cur_id}_season_all_poster"><span id="${cur_id}_eg_season_all_poster">$cur_metadata_inst.eg_season_all_poster</span></label> - <label for="${cur_id}_season_all_banner"><span id="${cur_id}_eg_season_all_banner">$cur_metadata_inst.eg_season_all_banner</span></label> - </div> - </div> - <input type="hidden" name="${cur_id}_data" id="${cur_id}_data" value="$cur_metadata_inst.get_config()" /> - </div> - #end for - - <div class="clearfix"></div><br/> - - <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> + #for ($cur_name, $cur_generator) in $m_dict.items(): + #set $cur_metadata_inst = $sickbeard.metadata_provider_dict[$cur_generator.name] + #set $cur_id = $cur_generator.get_id() + <div class="metadataDiv" id="$cur_id"> + <div class="metadata_options_wrapper"> + <h4>Create:</h4> + <div class="metadata_options"> + <label for="${cur_id}_show_metadata"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_show_metadata" #if $cur_metadata_inst.show_metadata then "checked=\"checked\"" else ""#/> Show Metadata</label> + <label for="${cur_id}_episode_metadata"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_episode_metadata" #if $cur_metadata_inst.episode_metadata then "checked=\"checked\"" else ""#/> Episode Metadata</label> + <label for="${cur_id}_fanart"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_fanart" #if $cur_metadata_inst.fanart then "checked=\"checked\"" else ""#/> Show Fanart</label> + <label for="${cur_id}_poster"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_poster" #if $cur_metadata_inst.poster then "checked=\"checked\"" else ""#/> Show Poster</label> + <label for="${cur_id}_banner"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_banner" #if $cur_metadata_inst.banner then "checked=\"checked\"" else ""#/> Show Banner</label> + <label for="${cur_id}_episode_thumbnails"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_episode_thumbnails" #if $cur_metadata_inst.episode_thumbnails then "checked=\"checked\"" else ""#/> Episode Thumbnails</label> + <label for="${cur_id}_season_posters"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_posters" #if $cur_metadata_inst.season_posters then "checked=\"checked\"" else ""#/> Season Posters</label> + <label for="${cur_id}_season_banners"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_banners" #if $cur_metadata_inst.season_banners then "checked=\"checked\"" else ""#/> Season Banners</label> + <label for="${cur_id}_season_all_poster"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_all_poster" #if $cur_metadata_inst.season_all_poster then "checked=\"checked\"" else ""#/> Season All Poster</label> + <label for="${cur_id}_season_all_banner"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_all_banner" #if $cur_metadata_inst.season_all_banner then "checked=\"checked\"" else ""#/> Season All Banner</label> + </div> + </div> + <div class="metadata_example_wrapper"> + <h4>Results:</h4> + <div class="metadata_example"> + <label for="${cur_id}_show_metadata"><span id="${cur_id}_eg_show_metadata">$cur_metadata_inst.eg_show_metadata</span></label> + <label for="${cur_id}_episode_metadata"><span id="${cur_id}_eg_episode_metadata">$cur_metadata_inst.eg_episode_metadata</span></label> + <label for="${cur_id}_fanart"><span id="${cur_id}_eg_fanart">$cur_metadata_inst.eg_fanart</span></label> + <label for="${cur_id}_poster"><span id="${cur_id}_eg_poster">$cur_metadata_inst.eg_poster</span></label> + <label for="${cur_id}_banner"><span id="${cur_id}_eg_banner">$cur_metadata_inst.eg_banner</span></label> + <label for="${cur_id}_episode_thumbnails"><span id="${cur_id}_eg_episode_thumbnails">$cur_metadata_inst.eg_episode_thumbnails</span></label> + <label for="${cur_id}_season_posters"><span id="${cur_id}_eg_season_posters">$cur_metadata_inst.eg_season_posters</span></label> + <label for="${cur_id}_season_banners"><span id="${cur_id}_eg_season_banners">$cur_metadata_inst.eg_season_banners</span></label> + <label for="${cur_id}_season_all_poster"><span id="${cur_id}_eg_season_all_poster">$cur_metadata_inst.eg_season_all_poster</span></label> + <label for="${cur_id}_season_all_banner"><span id="${cur_id}_eg_season_all_banner">$cur_metadata_inst.eg_season_all_banner</span></label> + </div> + </div> + <input type="hidden" name="${cur_id}_data" id="${cur_id}_data" value="$cur_metadata_inst.get_config()" /> + </div> + #end for + + <div class="clearfix"></div><br/> + + <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> </fieldset> </div><!-- /component-group3 //--> - - <br/> - <h6 class="pull-right"><b>All non-absolute folder locations are relative to <span class="path">$sickbeard.DATA_DIR</span></b> </h6> - <input type="submit" class="btn pull-left config_submitter button" value="Save Changes" /> - </form> - </div> + <br/> + <h6 class="pull-right"><b>All non-absolute folder locations are relative to <span class="path">$sickbeard.DATA_DIR</span></b> </h6> + <input type="submit" class="btn pull-left config_submitter button" value="Save Changes" /> + + </form> + </div> </div> <div class="clearfix"></div> diff --git a/gui/slick/interfaces/default/config_providers.tmpl b/gui/slick/interfaces/default/config_providers.tmpl index 72b5b27b0d4f9e7e11562fd97230ec91a8c5e013..b2cc1f464b91d857ae7e8e1387fc2762f9081b57 100644 --- a/gui/slick/interfaces/default/config_providers.tmpl +++ b/gui/slick/interfaces/default/config_providers.tmpl @@ -12,9 +12,9 @@ #import os.path #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") -#if $varExists('header') +#if $varExists('header') <h1 class="header">$header</h1> -#else +#else <h1 class="title">$title</h1> #end if <script type="text/javascript" src="$sbRoot/js/configProviders.js?$sbPID"></script> @@ -58,9 +58,9 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; #end if #if $sickbeard.USE_TORRENTS <li><a href="#core-component-group4">Configure Custom Torrent Providers</a></li> - #end if + #end if </ul> - + <div id="core-component-group1" class="component-group" style='min-height: 550px;'> <div class="component-group-desc"> @@ -112,7 +112,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; <p>Configure individual provider settings here.</p> <p>Check with provider's website on how to obtain an API key if needed.</p> </div> - + <fieldset class="component-group-list"> <div class="field-pair"> <label for="editAProvider" id="provider-list"> @@ -128,7 +128,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; $provider_config_list.append($curProvider) #end for - #if $provider_config_list: + #if $provider_config_list: <select id="editAProvider" class="form-control input-sm"> #for $cur_provider in $provider_config_list: <option value="$cur_provider.getID()">$cur_provider.name</option> @@ -175,7 +175,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; </label> </div> #end if - + #if $hasattr($curNewznabProvider, 'enable_backlog'): <div class="field-pair"> <label for="${curNewznabProvider.getID()}_enable_backlog"> @@ -208,7 +208,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; <p>when searching for complete seasons you can choose to have it look for season packs only, or choose to have it build a complete season from just single episodes.</p> </span> </label> - <label> + <label> <span class="component-title"></span> <span class="component-desc"> <input type="radio" name="${curNewznabProvider.getID()}_search_mode" id="${curNewznabProvider.getID()}_search_mode_sponly" value="sponly" #if $curNewznabProvider.search_mode=="sponly" then "checked=\"checked\"" else ""# />season packs only. @@ -262,7 +262,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; </label> </div> #end if - + #if $hasattr($curNzbProvider, 'enable_backlog'): <div class="field-pair"> <label for="${curNzbProvider.getID()}_enable_backlog"> @@ -295,13 +295,13 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; <p>when searching for complete seasons you can choose to have it look for season packs only, or choose to have it build a complete season from just single episodes.</p> </span> </label> - <label> + <label> <span class="component-title"></span> <span class="component-desc"> <input type="radio" name="${curNzbProvider.getID()}_search_mode" id="${curNzbProvider.getID()}_search_mode_sponly" value="sponly" #if $curNzbProvider.search_mode=="sponly" then "checked=\"checked\"" else ""# />season packs only. </span> </label> - <label> + <label> <span class="component-title"></span> <span class="component-desc"> <input type="radio" name="${curNzbProvider.getID()}_search_mode" id="${curNzbProvider.getID()}_search_mode_eponly" value="eponly" #if $curNzbProvider.search_mode=="eponly" then "checked=\"checked\"" else ""# />episodes only. @@ -443,7 +443,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; </label> </div> #end if - + #if $hasattr($curTorrentProvider, 'sorting'): <div class="field-pair"> <label for="${curTorrentProvider.getID()}_sorting"> @@ -509,7 +509,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; </label> </div> #end if - + #if $hasattr($curTorrentProvider, 'enable_backlog'): <div class="field-pair"> <label for="${curTorrentProvider.getID()}_enable_backlog"> @@ -542,13 +542,13 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; <p>when searching for complete seasons you can choose to have it look for season packs only, or choose to have it build a complete season from just single episodes.</p> </span> </label> - <label> + <label> <span class="component-title"></span> <span class="component-desc"> <input type="radio" name="${curTorrentProvider.getID()}_search_mode" id="${curTorrentProvider.getID()}_search_mode_sponly" value="sponly" #if $curTorrentProvider.search_mode=="sponly" then "checked=\"checked\"" else ""# />season packs only. </span> </label> - <label> + <label> <span class="component-title"></span> <span class="component-desc"> <input type="radio" name="${curTorrentProvider.getID()}_search_mode" id="${curTorrentProvider.getID()}_search_mode_eponly" value="eponly" #if $curTorrentProvider.search_mode=="eponly" then "checked=\"checked\"" else ""# />episodes only. @@ -591,7 +591,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; <!-- end div for editing providers --> <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> - + </fieldset> </div><!-- /component-group2 //--> @@ -639,7 +639,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; <span class="component-desc">(if not required, type 0)</span> </label> </div> - + <div class="field-pair" id="newznabcapdiv"> <label> <span class="component-title">Newznab search categories:</span> @@ -648,7 +648,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; </label> <label> <span class="component-title"> </span> - <span class="component-desc">(select your Newznab categories on the left, and click the "update categories" button to use them for searching.) <b>don't forget to to save the form!</b></span> + <span class="component-desc">(select your Newznab categories on the left, and click the "update categories" button to use them for searching.) <b>don't forget to to save the form!</b></span> </label> <label> <span class="component-title"> </span> @@ -657,13 +657,13 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; </span> </label> </div> - + <div id="newznab_add_div"> <input class="btn" type="button" class="newznab_save" id="newznab_add" value="Add" /> </div> <div id="newznab_update_div" style="display: none;"> <input class="btn btn-danger newznab_delete" type="button" class="newznab_delete" id="newznab_delete" value="Delete" /> - </div> + </div> </div> </fieldset> @@ -737,7 +737,7 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; #end if <br/><input type="submit" class="btn config_submitter_refresh" value="Save Changes" /><br/> - + </div><!-- /config-components //--> </form> diff --git a/gui/slick/interfaces/default/config_search.tmpl b/gui/slick/interfaces/default/config_search.tmpl index 1d09fac86fbe7605b5bbafa829e85e6b45a2730c..3e0d97712478a2b6b1c3cae7f98c33fe74c4e4f8 100644 --- a/gui/slick/interfaces/default/config_search.tmpl +++ b/gui/slick/interfaces/default/config_search.tmpl @@ -13,154 +13,154 @@ <script type="text/javascript" src="$sbRoot/js/config.js?$sbPID"></script> #if $varExists('header') - <h1 class="header">$header</h1> + <h1 class="header">$header</h1> #else - <h1 class="title">$title</h1> + <h1 class="title">$title</h1> #end if #set $html_selected = ' selected="selected"' #set $html_checked = 'checked="checked" ' <div id="config"> - <div id="config-content"> - - <form id="configForm" action="saveSearch" method="post"> - - <div id="config-components"> - <ul> - <li><a href="#core-component-group1">Episode Search</a></li> - <li><a href="#core-component-group2">NZB Search</a></li> - <li><a href="#core-component-group3">Torrent Search</a></li> - </ul> - - - <div id="core-component-group1" class="component-group"> - - <div class="component-group-desc"> - <h3>Episode Search</h3> - <p>How to manage searching with <a href="$sbRoot/config/providers">providers</a>.</p> - </div> - - <fieldset class="component-group-list"> - <div class="field-pair"> - <label for="randomize_providers"> - <span class="component-title">Randomize Providers</span> - <span class="component-desc"> - <input type="checkbox" name="randomize_providers" id="randomize_providers" class="enabler" <%= html_checked if sickbeard.RANDOMIZE_PROVIDERS == True else '' %>/> - <p>randomize the provider search order instead of going in order of placement</p> - </span> - </label> - </div> - <div class="field-pair"> - <label for="download_propers"> - <span class="component-title">Download propers</span> - <span class="component-desc"> - <input type="checkbox" name="download_propers" id="download_propers" class="enabler" <%= html_checked if sickbeard.DOWNLOAD_PROPERS == True else '' %>/> - <p>replace original download with "Proper" or "Repack" if nuked</p> - </span> - </label> - </div> - <div id="content_download_propers"> - <div class="field-pair"> - <label for="check_propers_interval"> - <span class="component-title">Check propers every:</span> - <span class="component-desc"> - <select id="check_propers_interval" name="check_propers_interval" class="form-control input-sm"> + <div id="config-content"> + + <form id="configForm" action="saveSearch" method="post"> + + <div id="config-components"> + <ul> + <li><a href="#core-component-group1">Episode Search</a></li> + <li><a href="#core-component-group2">NZB Search</a></li> + <li><a href="#core-component-group3">Torrent Search</a></li> + </ul> + + + <div id="core-component-group1" class="component-group"> + + <div class="component-group-desc"> + <h3>Episode Search</h3> + <p>How to manage searching with <a href="$sbRoot/config/providers">providers</a>.</p> + </div> + + <fieldset class="component-group-list"> + <div class="field-pair"> + <label for="randomize_providers"> + <span class="component-title">Randomize Providers</span> + <span class="component-desc"> + <input type="checkbox" name="randomize_providers" id="randomize_providers" class="enabler" <%= html_checked if sickbeard.RANDOMIZE_PROVIDERS == True else '' %>/> + <p>randomize the provider search order instead of going in order of placement</p> + </span> + </label> + </div> + <div class="field-pair"> + <label for="download_propers"> + <span class="component-title">Download propers</span> + <span class="component-desc"> + <input type="checkbox" name="download_propers" id="download_propers" class="enabler" <%= html_checked if sickbeard.DOWNLOAD_PROPERS == True else '' %>/> + <p>replace original download with "Proper" or "Repack" if nuked</p> + </span> + </label> + </div> + <div id="content_download_propers"> + <div class="field-pair"> + <label for="check_propers_interval"> + <span class="component-title">Check propers every:</span> + <span class="component-desc"> + <select id="check_propers_interval" name="check_propers_interval" class="form-control input-sm"> #set $check_propers_interval_text = {'daily': "24 hours", '4h': "4 hours", '90m': "90 mins", '45m': "45 mins", '15m': "15 mins"} #for $curInterval in ('daily', '4h', '90m', '45m', '15m'): #set $selected = $html_selected if $sickbeard.CHECK_PROPERS_INTERVAL == $curInterval else '' - <option value="$curInterval"$selected>$check_propers_interval_text[$curInterval]</option> + <option value="$curInterval"$selected>$check_propers_interval_text[$curInterval]</option> #end for - </select> - </span> - </label> - </div> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Backlog search frequency</span> - <span class="component-desc"> - <input type="text" name="backlog_frequency" value="$sickbeard.BACKLOG_FREQUENCY" class="form-control input-sm input75" /> - <p>time in minutes between searches (min. $sickbeard.MIN_BACKLOG_FREQUENCY)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Daily search frequency</span> - <span class="component-desc"> - <input type="text" name="dailysearch_frequency" value="$sickbeard.DAILYSEARCH_FREQUENCY" class="form-control input-sm input75" /> - <p>time in minutes between searches (min. $sickbeard.MIN_DAILYSEARCH_FREQUENCY)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Usenet retention</span> - <span class="component-desc"> - <input type="text" name="usenet_retention" value="$sickbeard.USENET_RETENTION" class="form-control input-sm input75" /> - <p>age limit in days for usenet articles to be used (e.g. 500)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Ignore words</span> - <span class="component-desc"> - <input type="text" name="ignore_words" value="$sickbeard.IGNORE_WORDS" class="form-control input-sm input350" /> - <div class="clear-left">results with one or more word from this list will be ignored<br /> - separate words with a comma, e.g. "word1,word2,word3" - </div> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Require words</span> - <span class="component-desc"> - <input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" class="form-control input-sm input350" /> - <div class="clear-left">results with no word from this list will be ignored<br /> - separate words with a comma, e.g. "word1,word2,word3" - </div> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="allow_high_priority"> - <span class="component-title">Allow high priority</span> - <span class="component-desc"> - <input type="checkbox" name="allow_high_priority" id="allow_high_priority" <%= html_checked if sickbeard.ALLOW_HIGH_PRIORITY == True else '' %>/> - <p>set downloads of recently aired episodes to high priority</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="dailysearch_startup"> - <span class="component-title">Daily search on startup</span> - <span class="component-desc"> - <input type="checkbox" name="dailysearch_startup" id="dailysearch_startup" <%= html_checked if sickbeard.DAILYSEARCH_STARTUP == True else '' %>/> - <p>start daily search on startup of SickRage</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label for="backlog_startup"> - <span class="component-title">Run backlog on startup</span> - <span class="component-desc"> - <input type="checkbox" name="backlog_startup" id="backlog_startup" <%= html_checked if sickbeard.BACKLOG_STARTUP == True else '' %>/> - <p>start processing backlogged episodes on startup of SickRage</p> - </span> - </label> - </div> - + </select> + </span> + </label> + </div> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Backlog search frequency</span> + <span class="component-desc"> + <input type="text" name="backlog_frequency" value="$sickbeard.BACKLOG_FREQUENCY" class="form-control input-sm input75" /> + <p>time in minutes between searches (min. $sickbeard.MIN_BACKLOG_FREQUENCY)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Daily search frequency</span> + <span class="component-desc"> + <input type="text" name="dailysearch_frequency" value="$sickbeard.DAILYSEARCH_FREQUENCY" class="form-control input-sm input75" /> + <p>time in minutes between searches (min. $sickbeard.MIN_DAILYSEARCH_FREQUENCY)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Usenet retention</span> + <span class="component-desc"> + <input type="text" name="usenet_retention" value="$sickbeard.USENET_RETENTION" class="form-control input-sm input75" /> + <p>age limit in days for usenet articles to be used (e.g. 500)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Ignore words</span> + <span class="component-desc"> + <input type="text" name="ignore_words" value="$sickbeard.IGNORE_WORDS" class="form-control input-sm input350" /> + <div class="clear-left">results with one or more word from this list will be ignored<br /> + separate words with a comma, e.g. "word1,word2,word3" + </div> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Require words</span> + <span class="component-desc"> + <input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" class="form-control input-sm input350" /> + <div class="clear-left">results with no word from this list will be ignored<br /> + separate words with a comma, e.g. "word1,word2,word3" + </div> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="allow_high_priority"> + <span class="component-title">Allow high priority</span> + <span class="component-desc"> + <input type="checkbox" name="allow_high_priority" id="allow_high_priority" <%= html_checked if sickbeard.ALLOW_HIGH_PRIORITY == True else '' %>/> + <p>set downloads of recently aired episodes to high priority</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="dailysearch_startup"> + <span class="component-title">Daily search on startup</span> + <span class="component-desc"> + <input type="checkbox" name="dailysearch_startup" id="dailysearch_startup" <%= html_checked if sickbeard.DAILYSEARCH_STARTUP == True else '' %>/> + <p>start daily search on startup of SickRage</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label for="backlog_startup"> + <span class="component-title">Run backlog on startup</span> + <span class="component-desc"> + <input type="checkbox" name="backlog_startup" id="backlog_startup" <%= html_checked if sickbeard.BACKLOG_STARTUP == True else '' %>/> + <p>start processing backlogged episodes on startup of SickRage</p> + </span> + </label> + </div> + <div class="field-pair"> <input id="use_failed_downloads" type="checkbox" class="enabler" name="use_failed_downloads" #if $sickbeard.USE_FAILED_DOWNLOADS == True then "checked=\"checked\"" else ""# /> <label for="use_failed_downloads"> @@ -187,191 +187,191 @@ </div> </div> - <input type="submit" class="btn config_submitter" value="Save Changes" /> + <input type="submit" class="btn config_submitter" value="Save Changes" /> - </fieldset> - </div><!-- /component-group1 //--> + </fieldset> + </div><!-- /component-group1 //--> - <div id="core-component-group2" class="component-group"> + <div id="core-component-group2" class="component-group"> - <div class="component-group-desc"> - <h3>NZB Search</h3> - <p>How to handle NZB search results.</p> - </div> + <div class="component-group-desc"> + <h3>NZB Search</h3> + <p>How to handle NZB search results.</p> + </div> - <fieldset class="component-group-list"> + <fieldset class="component-group-list"> - <div class="field-pair"> - <label for="use_nzbs"> - <span class="component-title">Search NZBs</span> - <span class="component-desc"> - <input type="checkbox" name="use_nzbs" class="enabler" id="use_nzbs" <%= html_checked if sickbeard.USE_NZBS else '' %>/> - <p>enable NZB search providers</p></span> - </label> - </div> + <div class="field-pair"> + <label for="use_nzbs"> + <span class="component-title">Search NZBs</span> + <span class="component-desc"> + <input type="checkbox" name="use_nzbs" class="enabler" id="use_nzbs" <%= html_checked if sickbeard.USE_NZBS else '' %>/> + <p>enable NZB search providers</p></span> + </label> + </div> - <div id="content_use_nzbs"> - <div class="field-pair"> - <label for="nzb_method"> - <span class="component-title">Send .nzb files to:</span> - <span class="component-desc"> - <select name="nzb_method" id="nzb_method" class="form-control input-sm"> + <div id="content_use_nzbs"> + <div class="field-pair"> + <label for="nzb_method"> + <span class="component-title">Send .nzb files to:</span> + <span class="component-desc"> + <select name="nzb_method" id="nzb_method" class="form-control input-sm"> #set $nzb_method_text = {'blackhole': "Black hole", 'sabnzbd': "SABnzbd", 'nzbget': "NZBget"} #for $curAction in ('sabnzbd', 'blackhole', 'nzbget'): #set $selected = $html_selected if $sickbeard.NZB_METHOD == $curAction else '' - <option value="$curAction"$selected>$nzb_method_text[$curAction]</option> + <option value="$curAction"$selected>$nzb_method_text[$curAction]</option> #end for - </select> - </span> - </label> - </div> - - <div id="blackhole_settings"> - <div class="field-pair"> - <label> - <span class="component-title">Black hole folder location</span> - <span class="component-desc"> - <input type="text" name="nzb_dir" id="nzb_dir" value="$sickbeard.NZB_DIR" class="form-control input-sm input350" /> - <div class="clear-left"><p><b>.nzb</b> files are stored at this location for external software to find and use</p></div> - </span> - </label> - </div> - </div> - - <div id="sabnzbd_settings"> - <div class="field-pair"> - <label> - <span class="component-title">SABnzbd server URL</span> - <span class="component-desc"> - <input type="text" id="sab_host" name="sab_host" value="$sickbeard.SAB_HOST" class="form-control input-sm input350" /> - <div class="clear-left"><p>URL to your SABnzbd server (e.g. http://localhost:8080/)</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">SABnzbd username</span> - <span class="component-desc"> - <input type="text" name="sab_username" id="sab_username" value="$sickbeard.SAB_USERNAME" class="form-control input-sm input200" /> - <p>(blank for none)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">SABnzbd password</span> - <span class="component-desc"> - <input type="password" name="sab_password" id="sab_password" value="$sickbeard.SAB_PASSWORD" class="form-control input-sm input200" /> - <p>(blank for none)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">SABnzbd API key</span> - <span class="component-desc"> - <input type="text" name="sab_apikey" id="sab_apikey" value="$sickbeard.SAB_APIKEY" class="form-control input-sm input350" /> - <div class="clear-left"><p>locate at... SABnzbd Config -> General -> API Key</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Use SABnzbd category</span> - <span class="component-desc"> - <input type="text" name="sab_category" id="sab_category" value="$sickbeard.SAB_CATEGORY" class="form-control input-sm input200" /> - <p>add downloads to this category (e.g. TV)</p> - </span> - </label> - </div> + </select> + </span> + </label> + </div> + + <div id="blackhole_settings"> + <div class="field-pair"> + <label> + <span class="component-title">Black hole folder location</span> + <span class="component-desc"> + <input type="text" name="nzb_dir" id="nzb_dir" value="$sickbeard.NZB_DIR" class="form-control input-sm input350" /> + <div class="clear-left"><p><b>.nzb</b> files are stored at this location for external software to find and use</p></div> + </span> + </label> + </div> + </div> + + <div id="sabnzbd_settings"> + <div class="field-pair"> + <label> + <span class="component-title">SABnzbd server URL</span> + <span class="component-desc"> + <input type="text" id="sab_host" name="sab_host" value="$sickbeard.SAB_HOST" class="form-control input-sm input350" /> + <div class="clear-left"><p>URL to your SABnzbd server (e.g. http://localhost:8080/)</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">SABnzbd username</span> + <span class="component-desc"> + <input type="text" name="sab_username" id="sab_username" value="$sickbeard.SAB_USERNAME" class="form-control input-sm input200" /> + <p>(blank for none)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">SABnzbd password</span> + <span class="component-desc"> + <input type="password" name="sab_password" id="sab_password" value="$sickbeard.SAB_PASSWORD" class="form-control input-sm input200" /> + <p>(blank for none)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">SABnzbd API key</span> + <span class="component-desc"> + <input type="text" name="sab_apikey" id="sab_apikey" value="$sickbeard.SAB_APIKEY" class="form-control input-sm input350" /> + <div class="clear-left"><p>locate at... SABnzbd Config -> General -> API Key</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Use SABnzbd category</span> + <span class="component-desc"> + <input type="text" name="sab_category" id="sab_category" value="$sickbeard.SAB_CATEGORY" class="form-control input-sm input200" /> + <p>add downloads to this category (e.g. TV)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">Use SABnzbd category for anime</span> + <span class="component-desc"> + <input type="text" name="sab_category_anime" id="sab_category_anime" value="$sickbeard.SAB_CATEGORY_ANIME" class="form-control input-sm input200" /> + <p>add anime downloads to this category (e.g. anime)</p> + </span> + </label> + </div> + #if sickbeard.ALLOW_HIGH_PRIORITY == True + <div class="field-pair"> + <label for="sab_forced"> + <span class="component-title">Use forced priority</span> + <span class="component-desc"> + <input type="checkbox" name="sab_forced" class="enabler" id="sab_forced" <%= html_checked if sickbeard.SAB_FORCED else '' %>/> + <p>enable to change priority from HIGH to FORCED</p></span> + </label> + </div> + #end if + </div> + + <div id="nzbget_settings"> + <div class="field-pair"> + <label for="nzbget_use_https"> + <span class="component-title">Connect using HTTPS</span> + <span class="component-desc"> + <input id="nzbget_use_https" type="checkbox" class="enabler" name="nzbget_use_https" <%= html_checked if sickbeard.NZBGET_USE_HTTPS == True else '' %>/> + <p><b>note:</b> enable Secure control in NZBGet and set the correct Secure Port here</p> + </span> + </label> + + </div> + + <div class="field-pair"> + <label> + <span class="component-title">NZBget host:port</span> + <span class="component-desc"> + <input type="text" name="nzbget_host" id="nzbget_host" value="$sickbeard.NZBGET_HOST" class="form-control input-sm input350" /> + <p>(e.g. localhost:6789)</p> + <div class="clear-left"><p>NZBget RPC host name and port number (not NZBgetweb!)</p></div> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">NZBget username</span> + <span class="component-desc"> + <input type="text" name="nzbget_username" value="$sickbeard.NZBGET_USERNAME" class="form-control input-sm input200" /> + <p>locate in nzbget.conf (default:nzbget)</p> + </span> + </label> + </div> + + <div class="field-pair"> + <label> + <span class="component-title">NZBget password</span> + <span class="component-desc"> + <input type="password" name="nzbget_password" id="nzbget_password" value="$sickbeard.NZBGET_PASSWORD" class="form-control input-sm input200" /> + <p>locate in nzbget.conf (default:tegbzn6789)</p> + </span> + </label> + </div> <div class="field-pair"> - <label> - <span class="component-title">Use SABnzbd category for anime</span> - <span class="component-desc"> - <input type="text" name="sab_category_anime" id="sab_category_anime" value="$sickbeard.SAB_CATEGORY_ANIME" class="form-control input-sm input200" /> - <p>add anime downloads to this category (e.g. anime)</p> - </span> - </label> - </div> - #if sickbeard.ALLOW_HIGH_PRIORITY == True - <div class="field-pair"> - <label for="sab_forced"> - <span class="component-title">Use forced priority</span> - <span class="component-desc"> - <input type="checkbox" name="sab_forced" class="enabler" id="sab_forced" <%= html_checked if sickbeard.SAB_FORCED else '' %>/> - <p>enable to change priority from HIGH to FORCED</p></span> - </label> - </div> - #end if - </div> - - <div id="nzbget_settings"> - <div class="field-pair"> - <label for="nzbget_use_https"> - <span class="component-title">Connect using HTTPS</span> - <span class="component-desc"> - <input id="nzbget_use_https" type="checkbox" class="enabler" name="nzbget_use_https" <%= html_checked if sickbeard.NZBGET_USE_HTTPS == True else '' %>/> - <p><b>note:</b> enable Secure control in NZBGet and set the correct Secure Port here</p> - </span> - </label> - - </div> - - <div class="field-pair"> - <label> - <span class="component-title">NZBget host:port</span> - <span class="component-desc"> - <input type="text" name="nzbget_host" id="nzbget_host" value="$sickbeard.NZBGET_HOST" class="form-control input-sm input350" /> - <p>(e.g. localhost:6789)</p> - <div class="clear-left"><p>NZBget RPC host name and port number (not NZBgetweb!)</p></div> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">NZBget username</span> - <span class="component-desc"> - <input type="text" name="nzbget_username" value="$sickbeard.NZBGET_USERNAME" class="form-control input-sm input200" /> - <p>locate in nzbget.conf (default:nzbget)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">NZBget password</span> - <span class="component-desc"> - <input type="password" name="nzbget_password" id="nzbget_password" value="$sickbeard.NZBGET_PASSWORD" class="form-control input-sm input200" /> - <p>locate in nzbget.conf (default:tegbzn6789)</p> - </span> - </label> - </div> - - <div class="field-pair"> - <label> - <span class="component-title">Use NZBget category</span> - <span class="component-desc"> - <input type="text" name="nzbget_category" id="nzbget_category" value="$sickbeard.NZBGET_CATEGORY" class="form-control input-sm input200" /> - <p>send downloads marked this category (e.g. TV)</p> - </span> - </label> - </div> + <label> + <span class="component-title">Use NZBget category</span> + <span class="component-desc"> + <input type="text" name="nzbget_category" id="nzbget_category" value="$sickbeard.NZBGET_CATEGORY" class="form-control input-sm input200" /> + <p>send downloads marked this category (e.g. TV)</p> + </span> + </label> + </div> <div class="field-pair"> - <label> - <span class="component-title">Use NZBget category for anime</span> - <span class="component-desc"> - <input type="text" name="nzbget_category_anime" id="nzbget_category_anime" value="$sickbeard.NZBGET_CATEGORY_ANIME" class="form-control input-sm input200" /> - <p>send anime downloads marked this category (e.g. anime)</p> - </span> - </label> - </div> + <label> + <span class="component-title">Use NZBget category for anime</span> + <span class="component-desc"> + <input type="text" name="nzbget_category_anime" id="nzbget_category_anime" value="$sickbeard.NZBGET_CATEGORY_ANIME" class="form-control input-sm input200" /> + <p>send anime downloads marked this category (e.g. anime)</p> + </span> + </label> + </div> #set $prio_verylow = '' #set $prio_low = '' @@ -394,235 +394,235 @@ #else: #set $prio_normal = $html_selected #end if - <div class="field-pair"> - <label> - <span class="component-title">NZBget priority</span> - <span class="component-desc"> - <select name="nzbget_priority" id="nzbget_priority" class="form-control input-sm"> - <option value="-100"${prio_verylow}>Very low</option> - <option value="-50"${prio_low}>Low</option> - <option value="0"${prio_normal}>Normal</option> - <option value="50"${prio_high}>High</option> - <option value="100"${prio_veryhigh}>Very high</option> - <option value="900"${prio_force}>Force</option> - </select> - <span>priority for daily snatches (no backlog)</span> - </span> - </label> - </div> - </div> - - <div class="testNotification" id="testSABnzbd_result">Click below to test</div> - <input class="btn" type="button" value="Test SABnzbd" id="testSABnzbd" class="btn test-button"/> - <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> - - </div><!-- /content_use_nzbs //--> - - </fieldset> - </div><!-- /component-group2 //--> - - <div id="core-component-group3" class="component-group"> - - <div class="component-group-desc"> - <h3>Torrent Search</h3> - <p>How to handle Torrent search results.</p> - </div> - - <fieldset class="component-group-list"> - - <div class="field-pair"> - - <label for="use_torrents"> - <span class="component-title">Search torrents</span> - <span class="component-desc"> - <input type="checkbox" name="use_torrents" class="enabler" id="use_torrents" <%= html_checked if sickbeard.USE_TORRENTS == True else '' %>/> - <p>enable torrent search providers</p> - </span> - </label> - </div> - - <div id="content_use_torrents"> - <div class="field-pair"> - <label for="torrent_method"> - <span class="component-title">Send .torrent files to:</span> - <span class="component-desc"> - <select name="torrent_method" id="torrent_method" class="form-control input-sm"> + <div class="field-pair"> + <label> + <span class="component-title">NZBget priority</span> + <span class="component-desc"> + <select name="nzbget_priority" id="nzbget_priority" class="form-control input-sm"> + <option value="-100"${prio_verylow}>Very low</option> + <option value="-50"${prio_low}>Low</option> + <option value="0"${prio_normal}>Normal</option> + <option value="50"${prio_high}>High</option> + <option value="100"${prio_veryhigh}>Very high</option> + <option value="900"${prio_force}>Force</option> + </select> + <span>priority for daily snatches (no backlog)</span> + </span> + </label> + </div> + </div> + + <div class="testNotification" id="testSABnzbd_result">Click below to test</div> + <input class="btn" type="button" value="Test SABnzbd" id="testSABnzbd" class="btn test-button"/> + <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> + + </div><!-- /content_use_nzbs //--> + + </fieldset> + </div><!-- /component-group2 //--> + + <div id="core-component-group3" class="component-group"> + + <div class="component-group-desc"> + <h3>Torrent Search</h3> + <p>How to handle Torrent search results.</p> + </div> + + <fieldset class="component-group-list"> + + <div class="field-pair"> + + <label for="use_torrents"> + <span class="component-title">Search torrents</span> + <span class="component-desc"> + <input type="checkbox" name="use_torrents" class="enabler" id="use_torrents" <%= html_checked if sickbeard.USE_TORRENTS == True else '' %>/> + <p>enable torrent search providers</p> + </span> + </label> + </div> + + <div id="content_use_torrents"> + <div class="field-pair"> + <label for="torrent_method"> + <span class="component-title">Send .torrent files to:</span> + <span class="component-desc"> + <select name="torrent_method" id="torrent_method" class="form-control input-sm"> #set $torrent_method_text = {'blackhole': "Black hole", 'utorrent': "uTorrent", 'transmission': "Transmission", 'deluge': "Deluge", 'download_station': "Synology DS", 'rtorrent': "rTorrent", 'qbittorrent': "qbittorrent"} #for $curAction in ('blackhole', 'utorrent', 'transmission', 'deluge', 'download_station', 'rtorrent', 'qbittorrent'): #set $selected = $html_selected if $sickbeard.TORRENT_METHOD == $curAction else '' - <option value="$curAction"$selected>$torrent_method_text[$curAction]</option> + <option value="$curAction"$selected>$torrent_method_text[$curAction]</option> #end for - </select> - </label> - - <div id="options_torrent_blackhole"> - <div class="field-pair"> - <label> - <span class="component-title">Black hole folder location</span> - <span class="component-desc"> - <input type="text" name="torrent_dir" id="torrent_dir" value="$sickbeard.TORRENT_DIR" class="form-control input-sm input350" /> - <div class="clear-left"><p><b>.torrent</b> files are stored at this location for external software to find and use</p></div> - </span> - </label> - </div> - - <div></div> - <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> - </div> - </div> - - <div id="options_torrent_clients"> - <div class="field-pair"> - <label> - <span class="component-title" id="host_title">Torrent host:port</span> - <span class="component-desc"> - <input type="text" name="torrent_host" id="torrent_host" value="$sickbeard.TORRENT_HOST" class="form-control input-sm input350" /> - <div class="clear-left"> - <p id="host_desc_torrent">URL to your torrent client (e.g. http://localhost:8000/)</p> - </div> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_rpcurl_option"> - <label> - <span class="component-title" id="rpcurl_title">Torrent RPC URL</span> - <span class="component-desc"> - <input type="text" name="torrent_rpcurl" id="torrent_rpcurl" value="$sickbeard.TORRENT_RPCURL" class="form-control input-sm input350"/> - <div class="clear-left"> - <p id="rpcurl_desc_">The path without leading and trailing slashes (e.g. transmission)</p> - </div> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_auth_type_option"> - <label> - <span class="component-title">Http Authentication</span> - <span class="component-desc"> - <select name="torrent_auth_type" id="torrent_auth_type" class="form-control input-sm"> - #set $http_authtype = {'none': "None", 'basic': "Basic", 'digest': "Digest"} - #for $authvalue,$authname in $http_authtype.items(): - #set $selected = $html_selected if $sickbeard.TORRENT_AUTH_TYPE == $authvalue else '' - <option id="torrent_auth_type_value" value="$authvalue"$selected>$authname</option> - #end for - </select> - <p></p> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_verify_cert_option"> - <label for="torrent_verify_cert"> - <span class="component-title">Verify certificate</span> - <span class="component-desc"> - <input type="checkbox" name="torrent_verify_cert" class="enabler" id="torrent_verify_cert" <%= html_checked if sickbeard.TORRENT_VERIFY_CERT == True else '' %>/> - <p id="torrent_verify_deluge">disable if you get "Deluge: Authentication Error" in your log</p> - <p id="torrent_verify_rtorrent">Verify SSL certificates for HTTPS requests</p> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_username_option"> - <label> - <span class="component-title" id="username_title">Client username</span> - <span class="component-desc"> - <input type="text" name="torrent_username" id="torrent_username" value="$sickbeard.TORRENT_USERNAME" class="form-control input-sm input200" /> - <p>(blank for none)</p> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_password_option"> - <label> - <span class="component-title" id="password_title">Client password</span> - <span class="component-desc"> - <input type="password" name="torrent_password" id="torrent_password" value="$sickbeard.TORRENT_PASSWORD" class="form-control input-sm input200" /> - <p>(blank for none)</p> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_label_option"> - <label> - <span class="component-title">Add label to torrent</span> - <span class="component-desc"> - <input type="text" name="torrent_label" id="torrent_label" value="$sickbeard.TORRENT_LABEL" class="form-control input-sm input200" /> - <span id="label_warning_deluge" style="display:none"><p>(blank spaces are not allowed)</p> - <div class="clear-left"><p>note: label plugin must be enabled in Deluge clients</p></div> - </span> - </span> - </label> - </div> + </select> + </label> + + <div id="options_torrent_blackhole"> + <div class="field-pair"> + <label> + <span class="component-title">Black hole folder location</span> + <span class="component-desc"> + <input type="text" name="torrent_dir" id="torrent_dir" value="$sickbeard.TORRENT_DIR" class="form-control input-sm input350" /> + <div class="clear-left"><p><b>.torrent</b> files are stored at this location for external software to find and use</p></div> + </span> + </label> + </div> + + <div></div> + <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> + </div> + </div> + + <div id="options_torrent_clients"> + <div class="field-pair"> + <label> + <span class="component-title" id="host_title">Torrent host:port</span> + <span class="component-desc"> + <input type="text" name="torrent_host" id="torrent_host" value="$sickbeard.TORRENT_HOST" class="form-control input-sm input350" /> + <div class="clear-left"> + <p id="host_desc_torrent">URL to your torrent client (e.g. http://localhost:8000/)</p> + </div> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_rpcurl_option"> + <label> + <span class="component-title" id="rpcurl_title">Torrent RPC URL</span> + <span class="component-desc"> + <input type="text" name="torrent_rpcurl" id="torrent_rpcurl" value="$sickbeard.TORRENT_RPCURL" class="form-control input-sm input350"/> + <div class="clear-left"> + <p id="rpcurl_desc_">The path without leading and trailing slashes (e.g. transmission)</p> + </div> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_auth_type_option"> + <label> + <span class="component-title">Http Authentication</span> + <span class="component-desc"> + <select name="torrent_auth_type" id="torrent_auth_type" class="form-control input-sm"> + #set $http_authtype = {'none': "None", 'basic': "Basic", 'digest': "Digest"} + #for $authvalue,$authname in $http_authtype.items(): + #set $selected = $html_selected if $sickbeard.TORRENT_AUTH_TYPE == $authvalue else '' + <option id="torrent_auth_type_value" value="$authvalue"$selected>$authname</option> + #end for + </select> + <p></p> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_verify_cert_option"> + <label for="torrent_verify_cert"> + <span class="component-title">Verify certificate</span> + <span class="component-desc"> + <input type="checkbox" name="torrent_verify_cert" class="enabler" id="torrent_verify_cert" <%= html_checked if sickbeard.TORRENT_VERIFY_CERT == True else '' %>/> + <p id="torrent_verify_deluge">disable if you get "Deluge: Authentication Error" in your log</p> + <p id="torrent_verify_rtorrent">Verify SSL certificates for HTTPS requests</p> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_username_option"> + <label> + <span class="component-title" id="username_title">Client username</span> + <span class="component-desc"> + <input type="text" name="torrent_username" id="torrent_username" value="$sickbeard.TORRENT_USERNAME" class="form-control input-sm input200" /> + <p>(blank for none)</p> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_password_option"> + <label> + <span class="component-title" id="password_title">Client password</span> + <span class="component-desc"> + <input type="password" name="torrent_password" id="torrent_password" value="$sickbeard.TORRENT_PASSWORD" class="form-control input-sm input200" /> + <p>(blank for none)</p> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_label_option"> + <label> + <span class="component-title">Add label to torrent</span> + <span class="component-desc"> + <input type="text" name="torrent_label" id="torrent_label" value="$sickbeard.TORRENT_LABEL" class="form-control input-sm input200" /> + <span id="label_warning_deluge" style="display:none"><p>(blank spaces are not allowed)</p> + <div class="clear-left"><p>note: label plugin must be enabled in Deluge clients</p></div> + </span> + </span> + </label> + </div> <div class="field-pair" id="torrent_label_anime_option"> - <label> - <span class="component-title">Add label to torrent for anime</span> - <span class="component-desc"> - <input type="text" name="torrent_label_anime" id="torrent_label_anime" value="$sickbeard.TORRENT_LABEL_ANIME" class="form-control input-sm input200" /> - <span id="label_anime_warning_deluge" style="display:none"><p>(blank spaces are not allowed)</p> - <div class="clear-left"><p>note: label plugin must be enabled in Deluge clients</p></div> - </span> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_path_option"> - <label> - <span class="component-title" id="directory_title">Downloaded files location</span> - <span class="component-desc"> - <input type="text" name="torrent_path" id="torrent_path" value="$sickbeard.TORRENT_PATH" class="form-control input-sm input350" /> - <div class="clear-left"><p>where <span id="torrent_client">the torrent client</span> will save downloaded files (blank for client default) - <span id="path_synology"> <b>note:</b> the destination has to be a shared folder for Synology DS</span></p> - </div> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_seed_time_option"> - <label> - <span class="component-title" id="torrent_seed_time_label">Minimum seeding time is</span> - <span class="component-desc"><input type="number" step="1" name="torrent_seed_time" id="torrent_seed_time" value="$sickbeard.TORRENT_SEED_TIME" class="form-control input-sm input100" /> - <p>hours. (default:'0' passes blank to client and '-1' passes nothing)</p></span> - </label> - </div> - - <div class="field-pair" id="torrent_paused_option"> - <label> - <span class="component-title">Start torrent paused</span> - <span class="component-desc"> - <input type="checkbox" name="torrent_paused" class="enabler" id="torrent_paused" <%= html_checked if sickbeard.TORRENT_PAUSED == True else '' %>/> - <p>add .torrent to client but do <b style="font-weight:900">not</b> start downloading</p> - </span> - </label> - </div> - - <div class="field-pair" id="torrent_high_bandwidth_option"> - <label> - <span class="component-title">Allow high bandwidth</span> - <span class="component-desc"> - <input type="checkbox" name="torrent_high_bandwidth" class="enabler" id="torrent_high_bandwidth" <%= html_checked if sickbeard.TORRENT_HIGH_BANDWIDTH == True else '' %>/> - <p>use high bandwidth allocation if priority is high</p> - </span> - </label> - </div> - - <div class="testNotification" id="test_torrent_result">Click below to test</div> - <input class="btn" type="button" value="Test Connection" id="test_torrent" class="btn test-button"/> - <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> - </div> - </div><!-- /content_use_torrents //--> - </fieldset> - </div><!-- /component-group3 //--> - - <br/> - <h6 class="pull-right"><b>All non-absolute folder locations are relative to <span class="path">$sickbeard.DATA_DIR</span></b> </h6> - <input type="submit" class="btn pull-left config_submitter button" value="Save Changes" /> - - </div><!-- /config-components //--> - - </form> - </div> + <label> + <span class="component-title">Add label to torrent for anime</span> + <span class="component-desc"> + <input type="text" name="torrent_label_anime" id="torrent_label_anime" value="$sickbeard.TORRENT_LABEL_ANIME" class="form-control input-sm input200" /> + <span id="label_anime_warning_deluge" style="display:none"><p>(blank spaces are not allowed)</p> + <div class="clear-left"><p>note: label plugin must be enabled in Deluge clients</p></div> + </span> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_path_option"> + <label> + <span class="component-title" id="directory_title">Downloaded files location</span> + <span class="component-desc"> + <input type="text" name="torrent_path" id="torrent_path" value="$sickbeard.TORRENT_PATH" class="form-control input-sm input350" /> + <div class="clear-left"><p>where <span id="torrent_client">the torrent client</span> will save downloaded files (blank for client default) + <span id="path_synology"> <b>note:</b> the destination has to be a shared folder for Synology DS</span></p> + </div> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_seed_time_option"> + <label> + <span class="component-title" id="torrent_seed_time_label">Minimum seeding time is</span> + <span class="component-desc"><input type="number" step="1" name="torrent_seed_time" id="torrent_seed_time" value="$sickbeard.TORRENT_SEED_TIME" class="form-control input-sm input100" /> + <p>hours. (default:'0' passes blank to client and '-1' passes nothing)</p></span> + </label> + </div> + + <div class="field-pair" id="torrent_paused_option"> + <label> + <span class="component-title">Start torrent paused</span> + <span class="component-desc"> + <input type="checkbox" name="torrent_paused" class="enabler" id="torrent_paused" <%= html_checked if sickbeard.TORRENT_PAUSED == True else '' %>/> + <p>add .torrent to client but do <b style="font-weight:900">not</b> start downloading</p> + </span> + </label> + </div> + + <div class="field-pair" id="torrent_high_bandwidth_option"> + <label> + <span class="component-title">Allow high bandwidth</span> + <span class="component-desc"> + <input type="checkbox" name="torrent_high_bandwidth" class="enabler" id="torrent_high_bandwidth" <%= html_checked if sickbeard.TORRENT_HIGH_BANDWIDTH == True else '' %>/> + <p>use high bandwidth allocation if priority is high</p> + </span> + </label> + </div> + + <div class="testNotification" id="test_torrent_result">Click below to test</div> + <input class="btn" type="button" value="Test Connection" id="test_torrent" class="btn test-button"/> + <input type="submit" class="btn config_submitter" value="Save Changes" /><br/> + </div> + </div><!-- /content_use_torrents //--> + </fieldset> + </div><!-- /component-group3 //--> + + <br/> + <h6 class="pull-right"><b>All non-absolute folder locations are relative to <span class="path">$sickbeard.DATA_DIR</span></b> </h6> + <input type="submit" class="btn pull-left config_submitter button" value="Save Changes" /> + + </div><!-- /config-components //--> + + </form> + </div> </div> <div></div> diff --git a/gui/slick/interfaces/default/config_subtitles.tmpl b/gui/slick/interfaces/default/config_subtitles.tmpl index 7e3cf3e7894663edd1f9eacd491000169efcd655..b04050dc90cf38c8113fc26e846bccd2857eeeaf 100644 --- a/gui/slick/interfaces/default/config_subtitles.tmpl +++ b/gui/slick/interfaces/default/config_subtitles.tmpl @@ -15,31 +15,31 @@ <script type="text/javascript" src="$sbRoot/js/lib/jquery.tokeninput.js"></script> <script type="text/javascript"> - \$(document).ready(function() { - \$("#subtitles_languages").tokenInput( - [ - <%=",\r\n".join("{id: \"" + lang.opensubtitles + "\", name: \"" + lang.name + "\"}" for lang in subtitles.subtitleLanguageFilter())%> - ], - { - method: "POST", - hintText: "Write to search a language and select it", - preventDuplicates: true, - prePopulate: - - [ - <%= - ",\r\n".join("{id: \"" + subtitles.fromietf(lang).opensubtitles + "\", name: \"" + subtitles.fromietf(lang).name + "\"}" for lang in subtitles.wantedLanguages()) if subtitles.wantedLanguages() else '' - %> - ] - } + \$(document).ready(function() { + \$("#subtitles_languages").tokenInput( + [ + <%=",\r\n".join("{id: \"" + lang.opensubtitles + "\", name: \"" + lang.name + "\"}" for lang in subtitles.subtitleLanguageFilter())%> + ], + { + method: "POST", + hintText: "Write to search a language and select it", + preventDuplicates: true, + prePopulate: + + [ + <%= + ",\r\n".join("{id: \"" + subtitles.fromietf(lang).opensubtitles + "\", name: \"" + subtitles.fromietf(lang).name + "\"}" for lang in subtitles.wantedLanguages()) if subtitles.wantedLanguages() else '' + %> + ] + } ); - }); + }); </script> -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <div id="config"> @@ -49,109 +49,109 @@ <div id="config-components"> <ul> - <li><a href="#core-component-group4">Subtitles Search</a></li> - <li><a href="#core-component-group2">Subtitles Plugin</a></li> + <li><a href="#core-component-group4">Subtitles Search</a></li> + <li><a href="#core-component-group2">Subtitles Plugin</a></li> </ul> - + <div id="core-component-group4" class="component-group"> <div class="component-group-desc"> <h3>Subtitles Search</h3> <p>Settings that dictate how SickRage handles subtitles search results.</p> </div> - - <fieldset class="component-group-list"> - <div class="field-pair"> + + <fieldset class="component-group-list"> + <div class="field-pair"> <label for="use_subtitles" class="clearfix"> <span class="component-title">Search Subtitles</span> - <span class="component-desc"> - <input type="checkbox" class="enabler" #if $sickbeard.USE_SUBTITLES then " checked=\"checked\"" else ""# id="use_subtitles" name="use_subtitles"> - </span> + <span class="component-desc"> + <input type="checkbox" class="enabler" #if $sickbeard.USE_SUBTITLES then " checked=\"checked\"" else ""# id="use_subtitles" name="use_subtitles"> + </span> </label> </div> <div id="content_use_subtitles"> - <div class="field-pair"> - <label> - <span class="component-title">Subtitle Languages</span> - <span class="component-desc"><input type="text" id="subtitles_languages" name="subtitles_languages" /></span> - </label> - </div> - <div class="field-pair"> - <label> - <span class="component-title">Subtitle Directory</span> - <input type="text" value="$sickbeard.SUBTITLES_DIR" id="subtitles_dir" name="subtitles_dir" class="form-control input-sm input350"> - </label> - <label> - <span class="component-title"> </span> - <span class="component-desc">The directory where SickRage should store your <i>Subtitles</i> files.</span> - </label> - <label> - <span class="component-title"> </span> - <span class="component-desc"><b>NOTE:</b> Leave empty if you want store subtitle in episode path.</span> - </label> - </div> - <div class="field-pair"> - <label> - <span class="component-title">Subtitle Find Frequency</span> - <input type="number" name="subtitles_finder_frequency" value="$sickbeard.SUBTITLES_FINDER_FREQUENCY" hours="1" class="form-control input-sm input75" /> - <span class="component-desc">time in hours between scans (default: 1)</span> - </label> - </div> - <div class="field-pair"> - <label class="clearfix" for="subtitles_history"> - <span class="component-title">Subtitles History</span> - <span class="component-desc"> - <input type="checkbox" name="subtitles_history" id="subtitles_history" #if $sickbeard.SUBTITLES_HISTORY then " checked=\"checked\"" else ""#/> - <p>Log downloaded Subtitle on History page?</p> - </span> - </label> - </div> - <div class="field-pair"> - <label class="clearfix" for="subtitles_multi"> - <span class="component-title">Subtitles Multi-Language</span> - <span class="component-desc"> - <input type="checkbox" name="subtitles_multi" id="subtitles_multi" #if $sickbeard.SUBTITLES_MULTI then " checked=\"checked\"" else ""#/> - <p>Append language codes to subtitle filenames?</p> - </span> - </label> - </div> - <div class="field-pair"> - <label class="clearfix" for="embedded_subtitles_all"> - <span class="component-title">Embedded Subtitles</span> - <span class="component-desc"> - <input type="checkbox" name="embedded_subtitles_all" id="embedded_subtitles_all" #if $sickbeard.EMBEDDED_SUBTITLES_ALL then " checked=\"checked\"" else ""#/> - <p>Ignore subtitles embedded inside video file?</p> - <p><b>Warning: </b>this will ignore <u>all</u> embedded subtitles for every video file!</p> - </span> - </label> - </div> - <div class="field-pair"> - <label class="nocheck"> - <span class="component-title">Extra Scripts</span> - <input type="text" name="subtitles_extra_scripts" value="<%='|'.join(sickbeard.SUBTITLES_EXTRA_SCRIPTS)%>" class="form-control input-sm input350" /> - </label> - <label class="nocheck"> - <span class="component-title"> </span> - <span class="component-desc"><b>NOTE:</b></span> - </label> - <label class="nocheck"> - <span class="component-title"> </span> - <span class="component-desc"> - <ul> - <li>See <a href="https://github.com/SiCKRAGETV/SickRage/wiki/Subtitle%20Scripts"><font color='red'><b>Wiki</b></font></a> for a script arguments description.</li> - <li>Additional scripts separated by <b>|</b>.</li> - <li>Scripts are called after each episode has searched and downloaded subtitles.</li> - <li>For any scripted languages, include the interpreter executable before the script. See the following example:</li> - <ul> - <li>For Windows: <pre>C:\Python27\pythonw.exe C:\Script\test.py</pre></li> - <li>For Linux: <pre>python /Script/test.py</pre></li> - </ul> - </ul> - </span> - </label> - </div> - - <br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/> + <div class="field-pair"> + <label> + <span class="component-title">Subtitle Languages</span> + <span class="component-desc"><input type="text" id="subtitles_languages" name="subtitles_languages" /></span> + </label> + </div> + <div class="field-pair"> + <label> + <span class="component-title">Subtitle Directory</span> + <input type="text" value="$sickbeard.SUBTITLES_DIR" id="subtitles_dir" name="subtitles_dir" class="form-control input-sm input350"> + </label> + <label> + <span class="component-title"> </span> + <span class="component-desc">The directory where SickRage should store your <i>Subtitles</i> files.</span> + </label> + <label> + <span class="component-title"> </span> + <span class="component-desc"><b>NOTE:</b> Leave empty if you want store subtitle in episode path.</span> + </label> + </div> + <div class="field-pair"> + <label> + <span class="component-title">Subtitle Find Frequency</span> + <input type="number" name="subtitles_finder_frequency" value="$sickbeard.SUBTITLES_FINDER_FREQUENCY" hours="1" class="form-control input-sm input75" /> + <span class="component-desc">time in hours between scans (default: 1)</span> + </label> + </div> + <div class="field-pair"> + <label class="clearfix" for="subtitles_history"> + <span class="component-title">Subtitles History</span> + <span class="component-desc"> + <input type="checkbox" name="subtitles_history" id="subtitles_history" #if $sickbeard.SUBTITLES_HISTORY then " checked=\"checked\"" else ""#/> + <p>Log downloaded Subtitle on History page?</p> + </span> + </label> + </div> + <div class="field-pair"> + <label class="clearfix" for="subtitles_multi"> + <span class="component-title">Subtitles Multi-Language</span> + <span class="component-desc"> + <input type="checkbox" name="subtitles_multi" id="subtitles_multi" #if $sickbeard.SUBTITLES_MULTI then " checked=\"checked\"" else ""#/> + <p>Append language codes to subtitle filenames?</p> + </span> + </label> + </div> + <div class="field-pair"> + <label class="clearfix" for="embedded_subtitles_all"> + <span class="component-title">Embedded Subtitles</span> + <span class="component-desc"> + <input type="checkbox" name="embedded_subtitles_all" id="embedded_subtitles_all" #if $sickbeard.EMBEDDED_SUBTITLES_ALL then " checked=\"checked\"" else ""#/> + <p>Ignore subtitles embedded inside video file?</p> + <p><b>Warning: </b>this will ignore <u>all</u> embedded subtitles for every video file!</p> + </span> + </label> + </div> + <div class="field-pair"> + <label class="nocheck"> + <span class="component-title">Extra Scripts</span> + <input type="text" name="subtitles_extra_scripts" value="<%='|'.join(sickbeard.SUBTITLES_EXTRA_SCRIPTS)%>" class="form-control input-sm input350" /> + </label> + <label class="nocheck"> + <span class="component-title"> </span> + <span class="component-desc"><b>NOTE:</b></span> + </label> + <label class="nocheck"> + <span class="component-title"> </span> + <span class="component-desc"> + <ul> + <li>See <a href="https://github.com/SiCKRAGETV/SickRage/wiki/Subtitle%20Scripts"><font color='red'><b>Wiki</b></font></a> for a script arguments description.</li> + <li>Additional scripts separated by <b>|</b>.</li> + <li>Scripts are called after each episode has searched and downloaded subtitles.</li> + <li>For any scripted languages, include the interpreter executable before the script. See the following example:</li> + <ul> + <li>For Windows: <pre>C:\Python27\pythonw.exe C:\Script\test.py</pre></li> + <li>For Linux: <pre>python /Script/test.py</pre></li> + </ul> + </ul> + </span> + </label> + </div> + + <br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/> </div> </fieldset> </div><!-- /component-group1 //--> @@ -179,12 +179,12 @@ #end for </ul> <input type="hidden" name="service_order" id="service_order" value="<%=" ".join(['%s:%d' % (x['name'], x['enabled']) for x in sickbeard.subtitles.sortedServiceList()])%>"/> - + <br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/> </fieldset> </div><!-- /component-group2 //--> - <br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/> + <br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/> </div><!-- /config-components //--> @@ -196,7 +196,7 @@ <script type="text/javascript" charset="utf-8"> <!-- jQuery('#config-components').tabs(); - jQuery('#subtitles_dir').fileBrowser({ title: 'Select Subtitles Download Directory' }); + jQuery('#subtitles_dir').fileBrowser({ title: 'Select Subtitles Download Directory' }); //--> </script> #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_bottom.tmpl") diff --git a/gui/slick/interfaces/default/displayShow.tmpl b/gui/slick/interfaces/default/displayShow.tmpl index fc40c90b53a170737af9cd8caf98a6de06430e90..b1928280774ba230b6b512a31efd69fc3d9fb04d 100644 --- a/gui/slick/interfaces/default/displayShow.tmpl +++ b/gui/slick/interfaces/default/displayShow.tmpl @@ -9,7 +9,7 @@ #import ntpath #set global $title=$show.name -##set global $header = '<a></a>' % +##set global $header = '<a></a>' % #set global $topmenu="manageShows"# #set $exceptions_string = " | ".join($show.exceptions) #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") @@ -49,7 +49,7 @@ }); }); #end raw - + \$.fn.generateStars = function() { return this.each(function(i,e){\$(e).html(\$('<span/>').width(\$(e).text()*12));}); }; @@ -70,10 +70,10 @@ columnSelector_mediaquery: false, columnSelector_cssChecked : 'checked' }, - }); + }); + + - - \$('#popover') .popover({ placement: 'bottom', @@ -85,9 +85,9 @@ #if $show.is_anime: \$.tablesorter.columnSelector.attachTo( \$('#animeTable'), '#popover-target'); #else: - \$.tablesorter.columnSelector.attachTo( \$('#showTable'), '#popover-target'); + \$.tablesorter.columnSelector.attachTo( \$('#showTable'), '#popover-target'); #end if - }); + }); }); //--> </script> @@ -120,12 +120,12 @@ <h1 class="title" id="scene_exception_$show.indexerid">$show.name</h1> </div> - + #if $seasonResults: ##There is a special/season_0?## #if int($seasonResults[-1]["season"]) == 0: #set $season_special = 1 - #else: + #else: #set $season_special = 0 #end if @@ -143,8 +143,8 @@ #end if #end if </span> - - <div class="h2footer pull-right"> + + <div class="h2footer pull-right"> <span> #if (len($seasonResults) > 14): <select id="seasonJump" class="form-control input-sm" style="position: relative; top: -4px;"> @@ -170,28 +170,28 @@ #end if </div> - + <div class="clearfix"></div> - + #if $show_message: <div class="alert alert-info"> $show_message </div> #end if - + <div id="container"> <div id="posterCol"> <a href="$sbRoot/showPoster/?show=$show.indexerid&which=poster" rel="dialog" title="View Poster for $show.name"><img src="$sbRoot/showPoster/?show=$show.indexerid&which=poster_thumb" class="tvshowImg" alt=""/></a> </div> <div id="showCol"> - + <div id="showinfo"> #if 'rating' in $show.imdb_info: #set $rating_tip = str($show.imdb_info['rating']) + " / 10" + " Stars" + "<br />" + str($show.imdb_info['votes']) + " Votes" <span class="imdbstars" qtip-content="$rating_tip">$show.imdb_info['rating']</span> #end if - + #set $_show = $show #if not $show.imdbid <span>($show.startyear) - $show.runtime minutes - </span> @@ -228,7 +228,7 @@ #end if </ul> </div> - + <div id="summary"> <table class="summaryTable pull-left"> #set $anyQualities, $bestQualities = $Quality.splitQuality(int($show.quality)) @@ -259,7 +259,7 @@ <tr><td class="showLegend"><span style="color: red;">Location: </span></td><td><span style="color: red;">$showLoc[0]</span> (dir is missing)</td></tr> #end if <tr><td class="showLegend">Scene Name:</td><td>#if $show.exceptions then $exceptions_string else $show.name#</td></tr> - + #if $show.rls_require_words: <tr><td class="showLegend">Required Words: </td><td>#echo $show.rls_require_words#</td></tr> #end if @@ -282,7 +282,7 @@ <tr><td class="showLegend">Size:</td><td>$sickbeard.helpers.pretty_filesize(sickbeard.helpers.get_size($showLoc[0]))</td></tr> </table> - + <table style="width:180px; float: right; vertical-align: middle; height: 100%;"> #set $info_flag = $subtitles.fromietf($show.lang).opensubtitles if $show.lang else '' <tr><td class="showLegend">Info Language:</td><td><img src="$sbRoot/images/subtitles/flags/${info_flag}.png" width="16" height="11" alt="$show.lang" title="$show.lang" onError="this.onerror=null;this.src='$sbRoot/images/flags/unknown.png';"/></td></tr> @@ -290,7 +290,7 @@ <tr><td class="showLegend">Subtitles: </td><td><img src="$sbRoot/images/#if $show.subtitles then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr> #end if <tr><td class="showLegend">Flat Folders: </td><td><img src="$sbRoot/images/#if $show.flatten_folders == 1 or $sickbeard.NAMING_FORCE_FOLDERS then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr> - <tr><td class="showLegend">Paused: </td><td><img src="$sbRoot/images/#if int($show.paused) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr> + <tr><td class="showLegend">Paused: </td><td><img src="$sbRoot/images/#if int($show.paused) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr> <tr><td class="showLegend">Air-by-Date: </td><td><img src="$sbRoot/images/#if int($show.air_by_date) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr> <tr><td class="showLegend">Sports: </td><td><img src="$sbRoot/images/#if int($show.is_sports) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr> <tr><td class="showLegend">Anime: </td><td><img src="$sbRoot/images/#if int($show.is_anime) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr> @@ -303,7 +303,7 @@ </div> </div> </div> - + <div class="clearfix"></div> <div class="pull-left" > @@ -331,14 +331,14 @@ <label for="skipped"><span class="skipped"><input type="checkbox" id="skipped" checked="checked" /> Skipped: <b>$epCounts[$Overview.SKIPPED]</b></span></label> <label for="snatched"><span class="snatched"><input type="checkbox" id="snatched" checked="checked" /> Snatched: <b>$epCounts[$Overview.SNATCHED]</b></span></label> </div> - + <button id="popover" type="button" class="btn btn-xs">Select Columns</button> <div class="pull-right" > - <button class="btn btn-xs seriesCheck">Select Filtered Episodes</button> + <button class="btn btn-xs seriesCheck">Select Filtered Episodes</button> <button class="btn btn-xs clearAll">Clear All</button> </div> </div> -<br /> +<br /> <br /> <br /> @@ -352,7 +352,7 @@ #end if #if not $sickbeard.DISPLAY_SHOW_SPECIALS and int($epResult["season"]) == 0: #continue - #end if + #end if #set $scene = False #set $scene_anime = False #if not $show.air_by_date and not $show.is_sports and not $show.is_anime and $show.is_scene: @@ -384,7 +384,7 @@ #set $dfltEpNumbering = True #end if - #set $epLoc = $epResult["location"] + #set $epLoc = $epResult["location"] #if int($epResult["season"]) != $curSeason: #if $curSeason == -1: @@ -404,9 +404,9 @@ <th data-sorter="false" #if not $sickbeard.DOWNLOAD_URL then "class=\"col-ep columnSelector-false\"" else "class=\"col-ep\""#>Download</th> <th data-sorter="false" #if not $sickbeard.USE_SUBTITLES then "class=\"col-ep columnSelector-false\"" else "class=\"col-ep\""#>Subtitles</th> <th data-sorter="false" class="col-status">Status</th> - <th data-sorter="false" class="col-search">Search</th> + <th data-sorter="false" class="col-search">Search</th> </tr> - </thead> + </thead> <tbody class="tablesorter-no-sort"> <tr style="height: 60px;"> <th class="row-seasonheader displayShowTable" colspan="13" style="vertical-align: bottom; width: auto;"> @@ -445,7 +445,7 @@ <th class="col-ep">Download</th> <th class="col-ep">Subtitles</th> <th class="col-status">Status</th> - <th class="col-search">Search</th> + <th class="col-search">Search</th> </tr> #else: </tbody> @@ -487,25 +487,25 @@ <th class="col-ep">Download</th> <th class="col-ep">Subtitles</th> <th class="col-status">Status</th> - <th class="col-search">Search</th> - </tr> + <th class="col-search">Search</th> + </tr> #end if </tbody> #if $sickbeard.DISPLAY_ALL_SEASONS == False: <tbody class="collapse#if $curSeason == -1 then ' in' else ''#" id="collapseSeason-$epResult['season']"> #else <tbody> - #end if + #end if #set $curSeason = int($epResult["season"]) #end if - #set $epLoc = $epResult["location"] + #set $epLoc = $epResult["location"] <tr class="$Overview.overviewStrings[$epCats[$epStr]] season-$curSeason seasonstyle"> - <td class="col-checkbox"> + <td class="col-checkbox"> #if int($epResult["status"]) != $UNAIRED <input type="checkbox" class="epCheck" id="<%=str(epResult["season"])+'x'+str(epResult["episode"])%>" name="<%=str(epResult["season"]) +"x"+str(epResult["episode"]) %>" /> #end if - </td> - <td align="center"><img src="$sbRoot/images/#if $epResult["hasnfo"] == 1 then "nfo.gif\" alt=\"Y" else "nfo-no.gif\" alt=\"N"#" width="23" height="11" /></td> + </td> + <td align="center"><img src="$sbRoot/images/#if $epResult["hasnfo"] == 1 then "nfo.gif\" alt=\"Y" else "nfo-no.gif\" alt=\"N"#" width="23" height="11" /></td> <td align="center"><img src="$sbRoot/images/#if $epResult["hastbn"] == 1 then "tbn.gif\" alt=\"Y" else "tbn-no.gif\" alt=\"N"#" width="23" height="11" /></td> <td align="center"> #if $epLoc and $show._location and $epLoc.lower().startswith($show._location.lower()): @@ -513,7 +513,7 @@ #elif $epLoc and (not $epLoc.lower().startswith($show._location.lower()) or not $show._location): #set $epLoc = $epLoc #end if - + #if $epLoc != "" and $epLoc != None: <span title="$epLoc" class="addQTip">$epResult["episode"]</span> #else @@ -560,10 +560,10 @@ #if not $rootDir.startswith('/') #set $filename = $filename.replace('\\','\\\\') #end if - #set $filename = ntpath.basename($filename) + #set $filename = ntpath.basename($filename) #end for $filename - #end if + #end if </td> <td class="col-ep"> #if $epResult["file_size"]: @@ -573,7 +573,7 @@ </td> <td class="col-airdate"> <span class="${fuzzydate}">#if int($epResult['airdate']) == 1 then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($epResult['airdate'],$show.airs,$show.network)))#</span> - </td> + </td> <td> #if $sickbeard.DOWNLOAD_URL and $epResult['location'] #if $epResult['location'] @@ -595,9 +595,9 @@ #end for </td> #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($epResult["status"])) - #if $curQuality != Quality.NONE: + #if $curQuality != Quality.NONE: <td class="col-status">$statusStrings[$curStatus] <span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("HDTV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> - #else: + #else: <td class="col-status">$statusStrings[$curStatus]</td> #end if <td class="col-search"> @@ -612,11 +612,11 @@ <a class="epSubtitlesSearch" href="searchEpisodeSubtitles?show=$show.indexerid&season=$epResult["season"]&episode=$epResult["episode"]"><img src="$sbRoot/images/closed_captioning.png" height="16" alt="search subtitles" title="Search Subtitles" /></a> #end if </td> - </tr> + </tr> #end for </tbody> </table> - + <!--Begin - Bootstrap Modal--> <div id="manualSearchModalFailed" class="modal fade"> diff --git a/gui/slick/interfaces/default/editShow.tmpl b/gui/slick/interfaces/default/editShow.tmpl index f25d4da8781a9b1445fc8d33a1d4c4802521af28..8049440494acf625fd7fb8997186da1664260deb 100644 --- a/gui/slick/interfaces/default/editShow.tmpl +++ b/gui/slick/interfaces/default/editShow.tmpl @@ -15,9 +15,9 @@ #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") -#if $varExists('header') +#if $varExists('header') <h1 class="header">$header</h1> -#else +#else <h1 class="title">$title</h1> #end if @@ -145,34 +145,34 @@ Separate words with a comma, e.g. "word1,word2,word3"<br /> <script type="text/javascript" charset="utf-8"> <!-- var all_exceptions = new Array; - + jQuery('#location').fileBrowser({ title: 'Select Show Location' }); - + \$('#submit').click(function(){ all_exceptions = [] \$("#exceptions_list option").each ( function() { all_exceptions.push( \$(this).val() ); }); - + \$("#exceptions_list").val(all_exceptions); - + #if $show.is_anime: generate_bwlist() - + #end if }); \$('#addSceneName').click(function() { var scene_ex = \$('#SceneName').val() var option = \$("<option>") all_exceptions = [] - + \$("#exceptions_list option").each ( function() { all_exceptions.push( \$(this).val() ) }); - + \$('#SceneName').val('') - + if (jQuery.inArray(scene_ex, all_exceptions) > -1 || (scene_ex == '')) return @@ -182,20 +182,20 @@ Separate words with a comma, e.g. "word1,word2,word3"<br /> option.html(scene_ex) return option.appendTo('#exceptions_list'); }); - + \$('#removeSceneName').click(function() { \$('#exceptions_list option:selected').remove(); - + \$(this).toggle_SceneException() }); - + $.fn.toggle_SceneException = function() { all_exceptions = [] - + \$("#exceptions_list option").each ( function() { all_exceptions.push( \$(this).val() ); }); - + if (all_exceptions == '') \$("#SceneException").hide(); else diff --git a/gui/slick/interfaces/default/errorlogs.tmpl b/gui/slick/interfaces/default/errorlogs.tmpl index e2299396518e4d92d20245bd0def627ffa437004..3e8b9d9374e0a9d73f2c56c2a89c279bf0753341 100644 --- a/gui/slick/interfaces/default/errorlogs.tmpl +++ b/gui/slick/interfaces/default/errorlogs.tmpl @@ -9,10 +9,10 @@ #set global $topmenu="errorlogs"# #import os.path #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <div class="align-left"><pre> #if $classes.ErrorViewer.errors: diff --git a/gui/slick/interfaces/default/history.tmpl b/gui/slick/interfaces/default/history.tmpl index 0babb59b8ee3b761ac8982838ea8353a78ab4fe9..478b84085a3c3cc80b0ba18ea347e2bcd37959a2 100644 --- a/gui/slick/interfaces/default/history.tmpl +++ b/gui/slick/interfaces/default/history.tmpl @@ -34,21 +34,21 @@ type: 'numeric' }); -\$(document).ready(function() -{ +\$(document).ready(function() +{ \$("#historyTable:has(tbody tr)").tablesorter({ widgets: ['zebra', 'filter'], sortList: [[0,1]], textExtraction: { - #if ( $layout == 'detailed'): - 0: function(node) { return \$(node).find("span").text().toLowerCase(); }, - 4: function(node) { return \$(node).find("span").text().toLowerCase(); } - #else - 0: function(node) { return \$(node).find("span").text().toLowerCase(); }, - 1: function(node) { return \$(node).find("span").text().toLowerCase(); }, - 2: function(node) { return \$(node).attr("provider").toLowerCase(); }, - 5: function(node) { return \$(node).attr("quality").toLowerCase(); } - #end if + #if ( $layout == 'detailed'): + 0: function(node) { return \$(node).find("span").text().toLowerCase(); }, + 4: function(node) { return \$(node).find("span").text().toLowerCase(); } + #else + 0: function(node) { return \$(node).find("span").text().toLowerCase(); }, + 1: function(node) { return \$(node).find("span").text().toLowerCase(); }, + 2: function(node) { return \$(node).attr("provider").toLowerCase(); }, + 5: function(node) { return \$(node).attr("quality").toLowerCase(); } + #end if }, headers: { #if ( $layout == 'detailed'): @@ -60,7 +60,7 @@ 5: { sorter: 'quality' } #end if } - + }); \$('#limit').change(function(){ url = '$sbRoot/history/?limit='+\$(this).val() @@ -82,12 +82,12 @@ }); //--> </script> -#if $varExists('header') +#if $varExists('header') <h1 class="header">$header</h1> -#else +#else <h1 class="title">$title</h1> #end if -<div class="h2footer pull-right"><b>Limit:</b> +<div class="h2footer pull-right"><b>Limit:</b> <select name="history_limit" id="history_limit" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;"> <option value="$sbRoot/setHistoryLimit/?history_limit=100" #if $history_limit == "100" then "selected=\"selected\"" else ""#>100</option> <option value="$sbRoot/setHistoryLimit/?history_limit=250" #if $history_limit == "250" then "selected=\"selected\"" else ""#>250</option> @@ -96,146 +96,146 @@ </select> - <span> Layout: - <select name="HistoryLayout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;"> - <option value="$sbRoot/setHistoryLayout/?layout=compact" #if $sickbeard.HISTORY_LAYOUT == "compact" then "selected=\"selected\"" else ""#>Compact</option> - <option value="$sbRoot/setHistoryLayout/?layout=detailed" #if $sickbeard.HISTORY_LAYOUT == "detailed" then "selected=\"selected\"" else ""#>Detailed</option> - </select> - </span> + <span> Layout: + <select name="HistoryLayout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;"> + <option value="$sbRoot/setHistoryLayout/?layout=compact" #if $sickbeard.HISTORY_LAYOUT == "compact" then "selected=\"selected\"" else ""#>Compact</option> + <option value="$sbRoot/setHistoryLayout/?layout=detailed" #if $sickbeard.HISTORY_LAYOUT == "detailed" then "selected=\"selected\"" else ""#>Detailed</option> + </select> + </span> </div> <br> #if $layout == "detailed" - <table id="historyTable" class="sickbeardTable tablesorter" cellspacing="1" border="0" cellpadding="0"> - <thead> - <tr> - <th class="nowrap">Time</th> - <th>Episode</th> - <th>Action</th> - <th>Provider</th> - <th>Quality</th> - </tr> - </thead> - - <tfoot> - <tr> - <th class="nowrap" colspan="5"> </th> - </tr> - </tfoot> - - <tbody> - #for $hItem in $historyResults: - #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($hItem["action"])) - <tr> - #set $curdatetime = $datetime.datetime.strptime(str($hItem["date"]), $history.dateFormat) - <td align="center"><div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)</div><span class="sort_data">$time.mktime($curdatetime.timetuple())</span></td> - <td class="tvShow" width="35%"><a href="$sbRoot/home/displayShow?show=$hItem["showid"]#season-$hItem["season"]">$hItem["show_name"] - <%="S%02i" % int(hItem["season"])+"E%02i" % int(hItem["episode"]) %>#if "proper" in $hItem["resource"].lower() or "repack" in $hItem["resource"].lower() then ' <span class="quality Proper">Proper</span>' else ""#</a></td> - <td align="center" #if $curStatus == SUBTITLED then 'class="subtitles_column"' else ''#> - #if $curStatus == SUBTITLED: - <img width="16" height="11" style="vertical-align:middle;" src="$sbRoot/images/subtitles/flags/${hItem['resource']}.png" onError="this.onerror=null;this.src='$sbRoot/images/flags/unknown.png';"> - #end if - <span style="cursor: help; vertical-align:middle;" title="$os.path.basename($hItem['resource'])">$statusStrings[$curStatus]</span> - </td> - <td align="center"> - #if $curStatus == DOWNLOADED: - #if $hItem["provider"] != "-1": - <span style="vertical-align:middle;"><i>$hItem["provider"]</i></span> - #end if - #else - #if $hItem["provider"] > 0 - #if $curStatus in [SNATCHED, FAILED]: - #set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($hItem["provider"])) - #if $provider != None: - <img src="$sbRoot/images/providers/<%=provider.imageName()%>" width="16" height="16" style="vertical-align:middle;" /> <span style="vertical-align:middle;">$provider.name</span> - #else: - <img src="$sbRoot/images/providers/missing.png" width="16" height="16" style="vertical-align:middle;" title="missing provider"/> <span style="vertical-align:middle;">Missing Provider</span> - #end if - #else: - <img src="$sbRoot/images/subtitles/${hItem['provider']}.png" width="16" height="16" style="vertical-align:middle;" /> <span style="vertical-align:middle;"><%=hItem["provider"].capitalize()%></span> - #end if - #end if - #end if - </td> - <span style="display: none;">$curQuality</span> - <td align="center"><span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("HDTV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> - </tr> - #end for - </tbody> - </table> + <table id="historyTable" class="sickbeardTable tablesorter" cellspacing="1" border="0" cellpadding="0"> + <thead> + <tr> + <th class="nowrap">Time</th> + <th>Episode</th> + <th>Action</th> + <th>Provider</th> + <th>Quality</th> + </tr> + </thead> + + <tfoot> + <tr> + <th class="nowrap" colspan="5"> </th> + </tr> + </tfoot> + + <tbody> + #for $hItem in $historyResults: + #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($hItem["action"])) + <tr> + #set $curdatetime = $datetime.datetime.strptime(str($hItem["date"]), $history.dateFormat) + <td align="center"><div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)</div><span class="sort_data">$time.mktime($curdatetime.timetuple())</span></td> + <td class="tvShow" width="35%"><a href="$sbRoot/home/displayShow?show=$hItem["showid"]#season-$hItem["season"]">$hItem["show_name"] - <%="S%02i" % int(hItem["season"])+"E%02i" % int(hItem["episode"]) %>#if "proper" in $hItem["resource"].lower() or "repack" in $hItem["resource"].lower() then ' <span class="quality Proper">Proper</span>' else ""#</a></td> + <td align="center" #if $curStatus == SUBTITLED then 'class="subtitles_column"' else ''#> + #if $curStatus == SUBTITLED: + <img width="16" height="11" style="vertical-align:middle;" src="$sbRoot/images/subtitles/flags/${hItem['resource']}.png" onError="this.onerror=null;this.src='$sbRoot/images/flags/unknown.png';"> + #end if + <span style="cursor: help; vertical-align:middle;" title="$os.path.basename($hItem['resource'])">$statusStrings[$curStatus]</span> + </td> + <td align="center"> + #if $curStatus == DOWNLOADED: + #if $hItem["provider"] != "-1": + <span style="vertical-align:middle;"><i>$hItem["provider"]</i></span> + #end if + #else + #if $hItem["provider"] > 0 + #if $curStatus in [SNATCHED, FAILED]: + #set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($hItem["provider"])) + #if $provider != None: + <img src="$sbRoot/images/providers/<%=provider.imageName()%>" width="16" height="16" style="vertical-align:middle;" /> <span style="vertical-align:middle;">$provider.name</span> + #else: + <img src="$sbRoot/images/providers/missing.png" width="16" height="16" style="vertical-align:middle;" title="missing provider"/> <span style="vertical-align:middle;">Missing Provider</span> + #end if + #else: + <img src="$sbRoot/images/subtitles/${hItem['provider']}.png" width="16" height="16" style="vertical-align:middle;" /> <span style="vertical-align:middle;"><%=hItem["provider"].capitalize()%></span> + #end if + #end if + #end if + </td> + <span style="display: none;">$curQuality</span> + <td align="center"><span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("HDTV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> + </tr> + #end for + </tbody> + </table> #else: - <table id="historyTable" class="sickbeardTable tablesorter" cellspacing="1" border="0" cellpadding="0"> - <thead> - <tr> - <th class="nowrap">Time</th> - <th>Episode</th> - <th>Snatched</th> - <th>Downloaded</th> - #if sickbeard.USE_SUBTITLES - <th>Subtitled</th> - #end if - <th>Quality</th> - </tr> - </thead> - - <tfoot> - <tr> - <th class="nowrap" colspan="6"> </th> - </tr> - </tfoot> - - <tbody> - #for $hItem in $compactResults: - <tr> - #set $curdatetime = $datetime.datetime.strptime(str($hItem["actions"][0]["time"]), $history.dateFormat) - <td align="center"><div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)</div><span class="sort_data">$time.mktime($curdatetime.timetuple())</span></td> - <td class="tvShow" width="25%"> - <span><a href="$sbRoot/home/displayShow?show=$hItem["show_id"]#season-$hItem["season"]">$hItem["show_name"] - <%="S%02i" % int(hItem["season"])+"E%02i" % int(hItem["episode"]) %>#if "proper" in $hItem["resource"].lower() or "repack" in $hItem["resource"].lower() then ' <span class="quality Proper">Proper</span>' else ""#</a></span> - </td> - <td align="center" provider="<%=str(sorted(hItem["actions"])[0]["provider"])%>"> - #for $action in sorted($hItem["actions"]): - #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) - #if $curStatus in [SNATCHED, FAILED]: - #set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($action["provider"])) - #if $provider != None: - <img src="$sbRoot/images/providers/<%=provider.imageName()%>" width="16" height="16" style="vertical-align:middle;" alt="$provider.name" style="cursor: help;" title="$provider.name: $os.path.basename($action["resource"])"/> - #else: - <img src="$sbRoot/images/providers/missing.png" width="16" height="16" style="vertical-align:middle;" alt="missing provider" title="missing provider"/> - #end if - #end if - #end for - </td> - <td align="center"> - #for $action in sorted($hItem["actions"]): - #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) - #if $curStatus == DOWNLOADED: - #if $action["provider"] != "-1": - <span style="cursor: help;" title="$os.path.basename($action["resource"])"><i>$action["provider"]</i></span> - #else: - <span style="cursor: help;" title="$os.path.basename($action["resource"])"></span> - #end if - #end if - #end for - </td> - #if sickbeard.USE_SUBTITLES: - <td align="center"> - #for $action in sorted($hItem["actions"]): - #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) - #if $curStatus == SUBTITLED: - <img src="$sbRoot/images/subtitles/${action['provider']}.png" width="16" height="16" style="vertical-align:middle;" alt="$action["provider"]" title="<%=action["provider"].capitalize()%>: $os.path.basename($action["resource"])"/> - <span style="vertical-align:middle;"> / </span> - <img width="16" height="11" style="vertical-align:middle;" src="$sbRoot/images/flags/${action['resource']}.png" onError="this.onerror=null;this.src='$sbRoot/images/flags/unknown.png';" style="vertical-align: middle !important;"> - - #end if - #end for - </td> - #end if - <td align="center" width="14%" quality="$curQuality"><span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("RawHD TV", "RawHD").replace("HD TV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> - </tr> - #end for - </tbody> - </table> + <table id="historyTable" class="sickbeardTable tablesorter" cellspacing="1" border="0" cellpadding="0"> + <thead> + <tr> + <th class="nowrap">Time</th> + <th>Episode</th> + <th>Snatched</th> + <th>Downloaded</th> + #if sickbeard.USE_SUBTITLES + <th>Subtitled</th> + #end if + <th>Quality</th> + </tr> + </thead> + + <tfoot> + <tr> + <th class="nowrap" colspan="6"> </th> + </tr> + </tfoot> + + <tbody> + #for $hItem in $compactResults: + <tr> + #set $curdatetime = $datetime.datetime.strptime(str($hItem["actions"][0]["time"]), $history.dateFormat) + <td align="center"><div class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)</div><span class="sort_data">$time.mktime($curdatetime.timetuple())</span></td> + <td class="tvShow" width="25%"> + <span><a href="$sbRoot/home/displayShow?show=$hItem["show_id"]#season-$hItem["season"]">$hItem["show_name"] - <%="S%02i" % int(hItem["season"])+"E%02i" % int(hItem["episode"]) %>#if "proper" in $hItem["resource"].lower() or "repack" in $hItem["resource"].lower() then ' <span class="quality Proper">Proper</span>' else ""#</a></span> + </td> + <td align="center" provider="<%=str(sorted(hItem["actions"])[0]["provider"])%>"> + #for $action in sorted($hItem["actions"]): + #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) + #if $curStatus in [SNATCHED, FAILED]: + #set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($action["provider"])) + #if $provider != None: + <img src="$sbRoot/images/providers/<%=provider.imageName()%>" width="16" height="16" style="vertical-align:middle;" alt="$provider.name" style="cursor: help;" title="$provider.name: $os.path.basename($action["resource"])"/> + #else: + <img src="$sbRoot/images/providers/missing.png" width="16" height="16" style="vertical-align:middle;" alt="missing provider" title="missing provider"/> + #end if + #end if + #end for + </td> + <td align="center"> + #for $action in sorted($hItem["actions"]): + #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) + #if $curStatus == DOWNLOADED: + #if $action["provider"] != "-1": + <span style="cursor: help;" title="$os.path.basename($action["resource"])"><i>$action["provider"]</i></span> + #else: + <span style="cursor: help;" title="$os.path.basename($action["resource"])"></span> + #end if + #end if + #end for + </td> + #if sickbeard.USE_SUBTITLES: + <td align="center"> + #for $action in sorted($hItem["actions"]): + #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) + #if $curStatus == SUBTITLED: + <img src="$sbRoot/images/subtitles/${action['provider']}.png" width="16" height="16" style="vertical-align:middle;" alt="$action["provider"]" title="<%=action["provider"].capitalize()%>: $os.path.basename($action["resource"])"/> + <span style="vertical-align:middle;"> / </span> + <img width="16" height="11" style="vertical-align:middle;" src="$sbRoot/images/flags/${action['resource']}.png" onError="this.onerror=null;this.src='$sbRoot/images/flags/unknown.png';" style="vertical-align: middle !important;"> + + #end if + #end for + </td> + #end if + <td align="center" width="14%" quality="$curQuality"><span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("RawHD TV", "RawHD").replace("HD TV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td> + </tr> + #end for + </tbody> + </table> #end if diff --git a/gui/slick/interfaces/default/home.tmpl b/gui/slick/interfaces/default/home.tmpl index 1f1262d21a949fbcd40400e0f59a06a32cf4f145..dd186c78a912867c6bf7ffef4def729afa6197dc 100644 --- a/gui/slick/interfaces/default/home.tmpl +++ b/gui/slick/interfaces/default/home.tmpl @@ -58,12 +58,12 @@ format: function(s) { if (s.indexOf('Loading...') == 0) return s.replace('Loading...','000'); - else - #if not $sickbeard.SORT_ARTICLE: - return (s || '').replace(/^(The|A|An)\s/i,''); - #else: - return (s || ''); - #end if + else + #if not $sickbeard.SORT_ARTICLE: + return (s || '').replace(/^(The|A|An)\s/i,''); + #else: + return (s || ''); + #end if }, type: 'text' }); @@ -73,16 +73,16 @@ is: function(s) { 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('custom',7); }, type: 'numeric' }); -\$.tablesorter.addParser({ +\$.tablesorter.addParser({ id: 'eps', is: function(s) { - return false; + return false; }, format: function(s) { match = s.match(/^(.*)/); @@ -113,35 +113,35 @@ }); -\$(document).ready(function(){ - +\$(document).ready(function(){ + \$("img#network").on('error', function(){ - \$(this).parent().text(\$(this).attr('alt')); - \$(this).remove(); + \$(this).parent().text(\$(this).attr('alt')); + \$(this).remove(); }); \$("#showListTableShows:has(tbody tr)").tablesorter({ sortList: [[6,1],[2,0]], textExtraction: { - 0: function(node) { return \$(node).find("span").text().toLowerCase(); }, - 1: function(node) { return \$(node).find("span").text().toLowerCase(); }, - 3: function(node) { return \$(node).find("span").prop("title").toLowerCase(); }, - 4: function(node) { return \$(node).find("span").text().toLowerCase(); }, - 5: function(node) { return \$(node).find("span").text(); }, - 6: function(node) { return \$(node).find("img").attr("alt"); } + 0: function(node) { return \$(node).find("span").text().toLowerCase(); }, + 1: function(node) { return \$(node).find("span").text().toLowerCase(); }, + 3: function(node) { return \$(node).find("span").prop("title").toLowerCase(); }, + 4: function(node) { return \$(node).find("span").text().toLowerCase(); }, + 5: function(node) { return \$(node).find("span").text(); }, + 6: function(node) { return \$(node).find("img").attr("alt"); } }, widgets: ['saveSort', 'zebra', 'stickyHeaders', 'filter', 'columnSelector'], headers: { - 0: { sorter: 'isoDate' }, - 1: { columnSelector: false }, - 2: { sorter: 'loadingNames' }, - 4: { sorter: 'quality' }, - 5: { sorter: 'eps' }, - #if $sickbeard.FILTER_ROW: - 6: { filter : 'parsed' } - #end if + 0: { sorter: 'isoDate' }, + 1: { columnSelector: false }, + 2: { sorter: 'loadingNames' }, + 4: { sorter: 'quality' }, + 5: { sorter: 'eps' }, + #if $sickbeard.FILTER_ROW: + 6: { filter : 'parsed' } + #end if }, - widgetOptions : { + widgetOptions : { #if $sickbeard.FILTER_ROW: filter_columnFilters: true, filter_hideFilters : true, @@ -158,22 +158,22 @@ if (result[1] === "<") { if (pct < parseInt(result[2])) { test = true; - } + } } else if (result[1] === "<=") { if (pct <= parseInt(result[2])) { test = true; - } + } } else if (result[1] === ">=") { if (pct >= parseInt(result[2])) { test = true; - } + } } else if (result[1] === ">") { if (pct > parseInt(result[2])) { test = true; - } + } } } - + var result = f.match(/(\d+)\s(-|to)\s(\d+)/i); if (result) { if ((result[2] === "-") || (result[2] === "to")) { @@ -182,7 +182,7 @@ } } } - + var result = f.match(/(=)?\s?(\d+)\s?(=)?/i); if (result) { if ((result[1] === "=") || (result[3] === "=")) { @@ -191,27 +191,27 @@ } } } - + if (!isNaN(parseFloat(f)) && isFinite(f)) { if (parseInt(f) === pct) { test = true; } - } + } } return test; }, }, - #else + #else filter_columnFilters: false, #end if - filter_reset: '.resetshows', - columnSelector_mediaquery: false, - }, + filter_reset: '.resetshows', + columnSelector_mediaquery: false, + }, sortStable: true, sortAppend: [[2,0]] }); - - \$("#showListTableAnime:has(tbody tr)").tablesorter({ + + \$("#showListTableAnime:has(tbody tr)").tablesorter({ sortList: [[6,1],[2,0]], textExtraction: { 0: function(node) { return \$(node).find("span").text().toLowerCase(); }, @@ -223,16 +223,16 @@ }, widgets: ['saveSort', 'zebra', 'stickyHeaders', 'filter', 'columnSelector'], headers: { - 0: { sorter: 'isoDate' }, - 1: { columnSelector: false }, - 2: { sorter: 'loadingNames' }, - 4: { sorter: 'quality' }, - 5: { sorter: 'eps' }, - #if $sickbeard.FILTER_ROW: - 6: { filter : 'parsed' } - #end if + 0: { sorter: 'isoDate' }, + 1: { columnSelector: false }, + 2: { sorter: 'loadingNames' }, + 4: { sorter: 'quality' }, + 5: { sorter: 'eps' }, + #if $sickbeard.FILTER_ROW: + 6: { filter : 'parsed' } + #end if }, - widgetOptions : { + widgetOptions : { #if $sickbeard.FILTER_ROW: filter_columnFilters: true, filter_hideFilters : true, @@ -249,22 +249,22 @@ if (result[1] === "<") { if (pct < parseInt(result[2])) { test = true; - } + } } else if (result[1] === "<=") { if (pct <= parseInt(result[2])) { test = true; - } + } } else if (result[1] === ">=") { if (pct >= parseInt(result[2])) { test = true; - } + } } else if (result[1] === ">") { if (pct > parseInt(result[2])) { test = true; - } + } } } - + var result = f.match(/(\d+)\s(-|to)\s(\d+)/i); if (result) { if ((result[2] === "-") || (result[2] === "to")) { @@ -273,7 +273,7 @@ } } } - + var result = f.match(/(=)?\s?(\d+)\s?(=)?/i); if (result) { if ((result[1] === "=") || (result[3] === "=")) { @@ -282,34 +282,34 @@ } } } - + if (!isNaN(parseFloat(f)) && isFinite(f)) { if (parseInt(f) === pct) { test = true; } - } + } } return test; }, }, - #else + #else filter_columnFilters: false, #end if - filter_reset: '.resetanime', - columnSelector_mediaquery: false, - }, + filter_reset: '.resetanime', + columnSelector_mediaquery: false, + }, sortStable: true, sortAppend: [[2,0]] }); - if (\$("#showListTableShows").find("tbody").find("tr").size() > 0) - \$.tablesorter.filter.bindSearch( "#showListTableShows", \$('.search') ); - - #if $sickbeard.ANIME_SPLIT_HOME: - if (\$("#showListTableAnime").find("tbody").find("tr").size() > 0) - \$.tablesorter.filter.bindSearch( "#showListTableAnime", \$('.search') ); - #end if - + if (\$("#showListTableShows").find("tbody").find("tr").size() > 0) + \$.tablesorter.filter.bindSearch( "#showListTableShows", \$('.search') ); + + #if $sickbeard.ANIME_SPLIT_HOME: + if (\$("#showListTableAnime").find("tbody").find("tr").size() > 0) + \$.tablesorter.filter.bindSearch( "#showListTableAnime", \$('.search') ); + #end if + #set $fuzzydate = 'airdate' #if $sickbeard.FUZZY_DATING: fuzzyMoment({ @@ -321,120 +321,120 @@ trimZero : #if $sickbeard.TRIM_ZERO then "true" else "false"# }); #end if - - var \$container = [\$('#container'), \$('#container-anime')]; - - jQuery.each(\$container, function (j) { + + var \$container = [\$('#container'), \$('#container-anime')]; + + jQuery.each(\$container, function (j) { this.isotope({ - itemSelector: '.show', + itemSelector: '.show', sortBy : '$sickbeard.POSTER_SORTBY', sortAscending: $sickbeard.POSTER_SORTDIR, - layoutMode: 'masonry', - masonry: { - columnWidth: 13, - isFitWidth: true - }, - getSortData: { - name: function( itemElem ) { - var name = \$( itemElem ).attr('data-name'); - #if not $sickbeard.SORT_ARTICLE: - return (name || '').replace(/^(The|A|An)\s/i,''); - #else: - return (name || ''); - #end if - }, - network: '[data-network]', - date: function( itemElem ) { - var date = \$( itemElem ).attr('data-date'); + layoutMode: 'masonry', + masonry: { + columnWidth: 13, + isFitWidth: true + }, + getSortData: { + name: function( itemElem ) { + var name = \$( itemElem ).attr('data-name'); + #if not $sickbeard.SORT_ARTICLE: + return (name || '').replace(/^(The|A|An)\s/i,''); + #else: + return (name || ''); + #end if + }, + network: '[data-network]', + date: function( itemElem ) { + var date = \$( itemElem ).attr('data-date'); return date.length && parseInt( date, 10 ) || Number.POSITIVE_INFINITY; - }, - progress: function( itemElem ) { - var progress = \$( itemElem ).attr('data-progress'); - return progress.length && parseInt( progress, 10 ) || Number.NEGATIVE_INFINITY; - } - } - }); - }); - - \$('#postersort').on( 'change', function() { - var sortValue = this.value; - \$('#container').isotope({ sortBy: sortValue }); - \$('#container-anime').isotope({ sortBy: sortValue }); + }, + progress: function( itemElem ) { + var progress = \$( itemElem ).attr('data-progress'); + return progress.length && parseInt( progress, 10 ) || Number.NEGATIVE_INFINITY; + } + } + }); + }); + + \$('#postersort').on( 'change', function() { + var sortValue = this.value; + \$('#container').isotope({ sortBy: sortValue }); + \$('#container-anime').isotope({ sortBy: sortValue }); \$.get(this.options[this.selectedIndex].getAttribute('data-sort')); - }); - - \$('#postersortdirection').on( 'change', function() { - var sortDirection = this.value; - sortDirection = sortDirection == 'true'; - \$('#container').isotope({ sortAscending: sortDirection }); - \$('#container-anime').isotope({ sortAscending: sortDirection }); + }); + + \$('#postersortdirection').on( 'change', function() { + var sortDirection = this.value; + sortDirection = sortDirection == 'true'; + \$('#container').isotope({ sortAscending: sortDirection }); + \$('#container-anime').isotope({ sortAscending: sortDirection }); \$.get(this.options[this.selectedIndex].getAttribute('data-sort')); - }); - - \$('#popover') - .popover({ - placement: 'bottom', - html: true, // required if content has HTML - content: '<div id="popover-target"></div>' - }) - // bootstrap popover event triggered when the popover opens - .on('shown.bs.popover', function () { - // call this function to copy the column selection code into the popover - \$.tablesorter.columnSelector.attachTo( \$('#showListTableShows'), '#popover-target'); - #if $sickbeard.ANIME_SPLIT_HOME: - \$.tablesorter.columnSelector.attachTo( \$('#showListTableAnime'), '#popover-target'); - #end if - }); - + }); + + \$('#popover') + .popover({ + placement: 'bottom', + html: true, // required if content has HTML + content: '<div id="popover-target"></div>' + }) + // bootstrap popover event triggered when the popover opens + .on('shown.bs.popover', function () { + // call this function to copy the column selection code into the popover + \$.tablesorter.columnSelector.attachTo( \$('#showListTableShows'), '#popover-target'); + #if $sickbeard.ANIME_SPLIT_HOME: + \$.tablesorter.columnSelector.attachTo( \$('#showListTableAnime'), '#popover-target'); + #end if + }); + }); //--> </script> -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <div id="HomeLayout" class="pull-right" style="margin-top: -40px;"> #if $layout != 'poster': <button id="popover" type="button" class="btn btn-inline">Select Column</button> #end if - <span> Layout: - <select name="layout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;"> - <option value="$sbRoot/setHomeLayout/?layout=poster" #if $sickbeard.HOME_LAYOUT == "poster" then "selected=\"selected\"" else ""#>Poster</option> - <option value="$sbRoot/setHomeLayout/?layout=small" #if $sickbeard.HOME_LAYOUT == "small" then "selected=\"selected\"" else ""#>Small Poster</option> - <option value="$sbRoot/setHomeLayout/?layout=banner" #if $sickbeard.HOME_LAYOUT == "banner" then "selected=\"selected\"" else ""#>Banner</option> - <option value="$sbRoot/setHomeLayout/?layout=simple" #if $sickbeard.HOME_LAYOUT == "simple" then "selected=\"selected\"" else ""#>Simple</option> - </select> - #if $layout != 'poster': + <span> Layout: + <select name="layout" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;"> + <option value="$sbRoot/setHomeLayout/?layout=poster" #if $sickbeard.HOME_LAYOUT == "poster" then "selected=\"selected\"" else ""#>Poster</option> + <option value="$sbRoot/setHomeLayout/?layout=small" #if $sickbeard.HOME_LAYOUT == "small" then "selected=\"selected\"" else ""#>Small Poster</option> + <option value="$sbRoot/setHomeLayout/?layout=banner" #if $sickbeard.HOME_LAYOUT == "banner" then "selected=\"selected\"" else ""#>Banner</option> + <option value="$sbRoot/setHomeLayout/?layout=simple" #if $sickbeard.HOME_LAYOUT == "simple" then "selected=\"selected\"" else ""#>Simple</option> + </select> + #if $layout != 'poster': Search: - <input class="search form-control form-control-inline input-sm input200" type="search" data-column="2" placeholder="Search Show Name"> - <button type="button" class="resetshows resetanime btn btn-inline">Reset Search</button> - #end if - </span> - - #if $layout == 'poster': - - <span> Sort By: - <select id="postersort" class="form-control form-control-inline input-sm"> + <input class="search form-control form-control-inline input-sm input200" type="search" data-column="2" placeholder="Search Show Name"> + <button type="button" class="resetshows resetanime btn btn-inline">Reset Search</button> + #end if + </span> + + #if $layout == 'poster': + + <span> Sort By: + <select id="postersort" class="form-control form-control-inline input-sm"> <option value="name" data-sort="$sbRoot/setPosterSortBy/?sort=name" #if $sickbeard.POSTER_SORTBY == "name" then "selected=\"selected\"" else ""#>Name</option> <option value="date" data-sort="$sbRoot/setPosterSortBy/?sort=date" #if $sickbeard.POSTER_SORTBY == "date" then "selected=\"selected\"" else ""#>Next Episode</option> <option value="network" data-sort="$sbRoot/setPosterSortBy/?sort=network" #if $sickbeard.POSTER_SORTBY == "network" then "selected=\"selected\"" else ""#>Network</option> <option value="progress" data-sort="$sbRoot/setPosterSortBy/?sort=progress" #if $sickbeard.POSTER_SORTBY == "progress" then "selected=\"selected\"" else ""#>Progress</option> - </select> - </span> - - <span> Sort Order: - <select id="postersortdirection" class="form-control form-control-inline input-sm"> + </select> + </span> + + <span> Sort Order: + <select id="postersortdirection" class="form-control form-control-inline input-sm"> <option value="true" data-sort="$sbRoot/setPosterSortDir/?direction=1" #if $sickbeard.POSTER_SORTDIR == 1 then "selected=\"selected\"" else ""#>Asc</option> <option value="false" data-sort="$sbRoot/setPosterSortDir/?direction=0" #if $sickbeard.POSTER_SORTDIR == 0 then "selected=\"selected\"" else ""#>Desc</option> - </select> - </span> - + </select> + </span> + - #end if + #end if </div> #for $curShowlist in $showlists: @@ -449,20 +449,20 @@ <div class="posterview"> #for $curLoadingShow in $sickbeard.showQueueScheduler.action.loadingShowList: - #if $curLoadingShow.show != None and $curLoadingShow.show in $sickbeard.showList: + #if $curLoadingShow.show != None and $curLoadingShow.show in $sickbeard.showList: #continue - #end if - - #if $curLoadingShow.show == None: - <div class="show" data-name="0" data-date="010101" data-network="0" data-progress="101"> - <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> - </div> + #end if + + #if $curLoadingShow.show == None: + <div class="show" data-name="0" data-date="010101" data-network="0" data-progress="101"> + <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> + </div> #end if - + #end for $myShowList.sort(lambda x, y: cmp(x.name, y.name)) @@ -521,8 +521,8 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) #set $den = 1 #end if - #set $progressbar_percent = $nom * 100 / $den - + #set $progressbar_percent = $nom * 100 / $den + #set $data_date = '6000000000.0' #if $cur_airs_next: #set $data_date = $calendar.timegm($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_next,$curShow.airs,$curShow.network)).timetuple()) @@ -535,46 +535,46 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) #set $data_date = '5000000100.0' #end if #end if - <div class="show" id="show$curShow.indexerid" data-name="$curShow.name" data-date="$data_date" data-network="$curShow.network" data-progress="$progressbar_percent"> - <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> - - <div id="progressbar$curShow.indexerid"></div> - <script type="text/javascript"> - <!-- - \$(function() { - \$("\#progressbar$curShow.indexerid").progressbar({ - value: $progressbar_percent }); - classvalue = $progressbar_percent - if (classvalue<20) { - classtoadd = "progress-20" - } - if (classvalue>=20 && classvalue<40) { - classtoadd = "progress-40" - } - if (classvalue>=40 && classvalue<80) { - classtoadd = "progress-60" - } - if (classvalue>=80 && classvalue<100) { - classtoadd = "progress-80" - } - if (classvalue==100) { - classtoadd = "progress-100" - } - \$("\#progressbar$curShow.indexerid > .ui-progressbar-value").addClass(classtoadd); - }); - //--> - </script> - - <div class="show-title"> - $curShow.name - </div> - - <div class="show-date"> + <div class="show" id="show$curShow.indexerid" data-name="$curShow.name" data-date="$data_date" data-network="$curShow.network" data-progress="$progressbar_percent"> + <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> + + <div id="progressbar$curShow.indexerid"></div> + <script type="text/javascript"> + <!-- + \$(function() { + \$("\#progressbar$curShow.indexerid").progressbar({ + value: $progressbar_percent }); + classvalue = $progressbar_percent + if (classvalue<20) { + classtoadd = "progress-20" + } + if (classvalue>=20 && classvalue<40) { + classtoadd = "progress-40" + } + if (classvalue>=40 && classvalue<80) { + classtoadd = "progress-60" + } + if (classvalue>=80 && classvalue<100) { + classtoadd = "progress-80" + } + if (classvalue==100) { + classtoadd = "progress-100" + } + \$("\#progressbar$curShow.indexerid > .ui-progressbar-value").addClass(classtoadd); + }); + //--> + </script> + + <div class="show-title"> + $curShow.name + </div> + + <div class="show-date"> #if $cur_airs_next #set $ldatetime = $sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_next,$curShow.airs,$curShow.network)) - <span class="${fuzzydate}"> + <span class="${fuzzydate}"> #try $sbdatetime.sbdatetime.sbfdate($ldatetime) #except ValueError @@ -594,72 +594,72 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) #end if </div> - <table width="100%" cellspacing="1" border="0" cellpadding="0"> - <tr> - <td class="show-table"> - <span class="show-dlstats" title="$download_stat_tip">$download_stat</span> - </td> - - <td class="show-table"> - #if $layout != 'simple': - #if $curShow.network: - <span title="$curShow.network"><img class="show-network-image" src="$sbRoot/showNetworkLogo/?show=$curShow.indexerid" alt="$curShow.network" title="$curShow.network" /></span> - #else: - <span title="No Network"><img class="show-network-image" src="$sbRoot/images/network/nonetwork.png" alt="No Network" title="No Network" /></span> - #end if - #else: - <span title="$curShow.network">$curShow.network</span> - #end if - </td> - - <td class="show-table"> - #if $curShow.quality in $qualityPresets: - <span class="show-quality">$qualityPresetStrings[$curShow.quality]</span> - #else: - <span class="show-quality">Custom</span> - #end if - </td> - </tr> - </table> - - </div> - - - -#end for -</div> -</div> + <table width="100%" cellspacing="1" border="0" cellpadding="0"> + <tr> + <td class="show-table"> + <span class="show-dlstats" title="$download_stat_tip">$download_stat</span> + </td> + + <td class="show-table"> + #if $layout != 'simple': + #if $curShow.network: + <span title="$curShow.network"><img class="show-network-image" src="$sbRoot/showNetworkLogo/?show=$curShow.indexerid" alt="$curShow.network" title="$curShow.network" /></span> + #else: + <span title="No Network"><img class="show-network-image" src="$sbRoot/images/network/nonetwork.png" alt="No Network" title="No Network" /></span> + #end if + #else: + <span title="$curShow.network">$curShow.network</span> + #end if + </td> + + <td class="show-table"> + #if $curShow.quality in $qualityPresets: + <span class="show-quality">$qualityPresetStrings[$curShow.quality]</span> + #else: + <span class="show-quality">Custom</span> + #end if + </td> + </tr> + </table> + + </div> + + + +#end for +</div> +</div> #else <table id="showListTable$curListType" class="tablesorter" cellspacing="1" border="0" cellpadding="0"> <thead> - <tr> - <th class="nowrap">Next Ep</th> - <th class="nowrap">Prev Ep</th> - <th>Show</th> - <th>Network</th> - <th>Quality</th> - <th>Downloads</th> - <th>Active</th> - <th>Status</th> - </tr> - </thead> - + <tr> + <th class="nowrap">Next Ep</th> + <th class="nowrap">Prev Ep</th> + <th>Show</th> + <th>Network</th> + <th>Quality</th> + <th>Downloads</th> + <th>Active</th> + <th>Status</th> + </tr> + </thead> + <tfoot> <tr> - <th rowspan="1" colspan="1" align="center"><a href="$sbRoot/home/addShows/">Add Show</a></th> - <th> </th> - <th> </th> - <th> </th> - <th> </th> - <th> </th> - <th> </th> - <th> </th> + <th rowspan="1" colspan="1" align="center"><a href="$sbRoot/home/addShows/">Add Show</a></th> + <th> </th> + <th> </th> + <th> </th> + <th> </th> + <th> </th> + <th> </th> + <th> </th> </tr> </tfoot> - + #if $sickbeard.showQueueScheduler.action.loadingShowList <tbody class="tablesorter-infoOnly"> @@ -703,7 +703,7 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) #if $curShow.indexerid in $show_stat: #set $cur_airs_next = $show_stat[$curShow.indexerid]['ep_airs_next'] #set $cur_airs_prev = $show_stat[$curShow.indexerid]['ep_airs_prev'] - + #set $cur_snatched = $show_stat[$curShow.indexerid]['ep_snatched'] #if not $cur_snatched: @@ -741,120 +741,120 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) #set $den = 1 #end if - #set $progressbar_percent = $nom * 100 / $den + #set $progressbar_percent = $nom * 100 / $den <tr> - - #if $cur_airs_next + + #if $cur_airs_next #set $ldatetime = $sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_next,$curShow.airs,$curShow.network)) - #try - #set $temp_sbfdate_next = $sbdatetime.sbdatetime.sbfdate($ldatetime) - #set $temp_timegm_next = $calendar.timegm($ldatetime.timetuple()) - <td align="center" class="nowrap"> - <div class="${fuzzydate}">$temp_sbfdate_next</div> - <span class="sort_data">$temp_timegm_next</span> - </td> - #except ValueError - <td align="center" class="nowrap"></td> - #end try + #try + #set $temp_sbfdate_next = $sbdatetime.sbdatetime.sbfdate($ldatetime) + #set $temp_timegm_next = $calendar.timegm($ldatetime.timetuple()) + <td align="center" class="nowrap"> + <div class="${fuzzydate}">$temp_sbfdate_next</div> + <span class="sort_data">$temp_timegm_next</span> + </td> + #except ValueError + <td align="center" class="nowrap"></td> + #end try #else: - <td align="center" class="nowrap"></td> + <td align="center" class="nowrap"></td> #end if #if $cur_airs_prev #set $pdatetime = $sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_prev,$curShow.airs,$curShow.network)) - #try - #set $temp_sbfdate_prev = $sbdatetime.sbdatetime.sbfdate($pdatetime) - #set $temp_timegm_prev = $calendar.timegm($pdatetime.timetuple()) - <td align="center" class="nowrap"> - <div class="${fuzzydate}">$temp_sbfdate_prev</div> - <span class="sort_data">$temp_timegm_prev</span> - </td> - #except ValueError - <td align="center" class="nowrap"></td> - #end try + #try + #set $temp_sbfdate_prev = $sbdatetime.sbdatetime.sbfdate($pdatetime) + #set $temp_timegm_prev = $calendar.timegm($pdatetime.timetuple()) + <td align="center" class="nowrap"> + <div class="${fuzzydate}">$temp_sbfdate_prev</div> + <span class="sort_data">$temp_timegm_prev</span> + </td> + #except ValueError + <td align="center" class="nowrap"></td> + #end try #else: <td align="center" class="nowrap"></td> #end if - #if $layout == 'small': - <td class="tvShow"> - <div class="imgsmallposter $layout"> - <a href="$sbRoot/showPoster/?show=$curShow.indexerid&which=$layout" rel="dialog" title="$curShow.name"> - <img src="$sbRoot/showPoster/?show=$curShow.indexerid&which=poster_thumb" class="$layout" alt="$curShow.indexerid"/> - </a> - <a href="$sbRoot/home/displayShow?show=$curShow.indexerid" style="vertical-align: middle;">$curShow.name</a> - </div> - </td> + #if $layout == 'small': + <td class="tvShow"> + <div class="imgsmallposter $layout"> + <a href="$sbRoot/showPoster/?show=$curShow.indexerid&which=$layout" rel="dialog" title="$curShow.name"> + <img src="$sbRoot/showPoster/?show=$curShow.indexerid&which=poster_thumb" class="$layout" alt="$curShow.indexerid"/> + </a> + <a href="$sbRoot/home/displayShow?show=$curShow.indexerid" style="vertical-align: middle;">$curShow.name</a> + </div> + </td> #else if $layout == 'banner': - <td> - <span style="display: none;">$curShow.name</span> - <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"/> - </div> - </td> - #else if $layout == 'simple': - <td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td> + <td> + <span style="display: none;">$curShow.name</span> + <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"/> + </div> + </td> + #else if $layout == 'simple': + <td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td> #end if - #if $layout != 'simple': - <td align="center"> + #if $layout != 'simple': + <td align="center"> #if $curShow.network: - <span title="$curShow.network"><img id="network" width="54" height="27" src="$sbRoot/showNetworkLogo/?show=$curShow.indexerid" alt="$curShow.network" title="$curShow.network" /></span> - #else: - <span title="No Network"><img id="network" width="54" height="27" src="$sbRoot/images/network/nonetwork.png" alt="No Network" title="No Network" /></span> - #end if - </td> - #else: - <td> - <span title="$curShow.network">$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> - #else: - <td align="center"><span class="quality Custom">Custom</span></td> - #end if - - <td align="center"><span style="display: none;">$download_stat</span><div id="progressbar$curShow.indexerid" style="position:relative;"></div> - <script type="text/javascript"> - <!-- - \$(function() { - \$("\#progressbar$curShow.indexerid").progressbar({ - value: $progressbar_percent }); - \$("\#progressbar$curShow.indexerid").append( "<div class='progressbarText' title='$download_stat_tip'>$download_stat</div>" ) - classvalue = $progressbar_percent - if (classvalue<20) { - classtoadd = "progress-20" - } - if (classvalue>=20 && classvalue<40) { - classtoadd = "progress-40" - } - if (classvalue>=40 && classvalue<80) { - classtoadd = "progress-60" - } - if (classvalue>=80 && classvalue<100) { - classtoadd = "progress-80" - } - if (classvalue==100) { - classtoadd = "progress-100" - } - \$("\#progressbar$curShow.indexerid > .ui-progressbar-value").addClass(classtoadd); - }); - //--> - </script> - </td> - + <span title="$curShow.network"><img id="network" width="54" height="27" src="$sbRoot/showNetworkLogo/?show=$curShow.indexerid" alt="$curShow.network" title="$curShow.network" /></span> + #else: + <span title="No Network"><img id="network" width="54" height="27" src="$sbRoot/images/network/nonetwork.png" alt="No Network" title="No Network" /></span> + #end if + </td> + #else: + <td> + <span title="$curShow.network">$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> + #else: + <td align="center"><span class="quality Custom">Custom</span></td> + #end if + + <td align="center"><span style="display: none;">$download_stat</span><div id="progressbar$curShow.indexerid" style="position:relative;"></div> + <script type="text/javascript"> + <!-- + \$(function() { + \$("\#progressbar$curShow.indexerid").progressbar({ + value: $progressbar_percent }); + \$("\#progressbar$curShow.indexerid").append( "<div class='progressbarText' title='$download_stat_tip'>$download_stat</div>" ) + classvalue = $progressbar_percent + if (classvalue<20) { + classtoadd = "progress-20" + } + if (classvalue>=20 && classvalue<40) { + classtoadd = "progress-40" + } + if (classvalue>=40 && classvalue<80) { + classtoadd = "progress-60" + } + if (classvalue>=80 && classvalue<100) { + classtoadd = "progress-80" + } + if (classvalue==100) { + classtoadd = "progress-100" + } + \$("\#progressbar$curShow.indexerid > .ui-progressbar-value").addClass(classtoadd); + }); + //--> + </script> + </td> + <td align="center"> #if sickbeard.TRAKT_USE_ROLLING_DOWNLOAD and sickbeard.USE_TRAKT - <img src="$sbRoot/images/#if int($curShow.paused) == 0 then "yes16.png\" alt=\"Yes\"" else "no16.png\" alt=\"No\""# width="16" height="16" /> + <img src="$sbRoot/images/#if int($curShow.paused) == 0 then "yes16.png\" alt=\"Yes\"" else "no16.png\" alt=\"No\""# width="16" height="16" /> #else - <img src="$sbRoot/images/#if int($curShow.paused) == 0 and $curShow.status == "Continuing" then "yes16.png\" alt=\"Yes\"" else "no16.png\" alt=\"No\""# width="16" height="16" /> + <img src="$sbRoot/images/#if int($curShow.paused) == 0 and $curShow.status == "Continuing" then "yes16.png\" alt=\"Yes\"" else "no16.png\" alt=\"No\""# width="16" height="16" /> #end if - </td> - + </td> + <td align="center"> #set $display_status = $curShow.status #if None is not $display_status @@ -865,10 +865,10 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) #end if #end if - $display_status + $display_status + + </td> - </td> - </tr> #end for diff --git a/gui/slick/interfaces/default/home_addExistingShow.tmpl b/gui/slick/interfaces/default/home_addExistingShow.tmpl index 44f97392ea2012e2eb8e81a9c08721f3811125a8..dabf106c0cc7a821eb1cb3994bff25ddbca83921 100644 --- a/gui/slick/interfaces/default/home_addExistingShow.tmpl +++ b/gui/slick/interfaces/default/home_addExistingShow.tmpl @@ -14,11 +14,11 @@ <script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/addExistingShow.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/rootDirs.js?$sbPID"></script> -<script type="text/javascript" src="$sbRoot/js/addShowOptions.js?$sbPID"></script> +<script type="text/javascript" src="$sbRoot/js/addShowOptions.js?$sbPID"></script> <script type="text/javascript" charset="utf-8"> <!-- -\$(document).ready(function(){ +\$(document).ready(function(){ \$( "#tabs" ).tabs({ collapsible: true, selected: #if $sickbeard.ROOT_DIRS then '-1' else '0'# @@ -27,57 +27,57 @@ //--> </script> -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <div id="newShowPortal"> - <div id="config-components"> - <ul> - <li><a href="#core-component-group1">Add Existing Show</a></li> - </ul> + <div id="config-components"> + <ul> + <li><a href="#core-component-group1">Add Existing Show</a></li> + </ul> - <div id="core-component-group1" class="tab-pane active component-group"> + <div id="core-component-group1" class="tab-pane active component-group"> - <form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8"> + <form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8"> - <div id="tabs"> - <ul> - <li><a href="#tabs-1">Manage Directories</a></li> - <li><a href="#tabs-2">Customize Options</a></li> - </ul> - <div id="tabs-1" class="existingtabs"> - #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_rootDirs.tmpl") - </div> - <div id="tabs-2" class="existingtabs"> - #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_addShowOptions.tmpl") - </div> - </div> - <br /> + <div id="tabs"> + <ul> + <li><a href="#tabs-1">Manage Directories</a></li> + <li><a href="#tabs-2">Customize Options</a></li> + </ul> + <div id="tabs-1" class="existingtabs"> + #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_rootDirs.tmpl") + </div> + <div id="tabs-2" class="existingtabs"> + #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_addShowOptions.tmpl") + </div> + </div> + <br /> - <p>SickRage can add existing shows, using the current options, by using locally stored NFO/XML metadata to eliminate user interaction. - If you would rather have SickRage prompt you to customize each show, then use the checkbox below.</p> + <p>SickRage can add existing shows, using the current options, by using locally stored NFO/XML metadata to eliminate user interaction. + If you would rather have SickRage prompt you to customize each show, then use the checkbox below.</p> - <p><input type="checkbox" name="promptForSettings" id="promptForSettings" /> <label for="promptForSettings">Prompt me to set settings for each show</label></p> + <p><input type="checkbox" name="promptForSettings" id="promptForSettings" /> <label for="promptForSettings">Prompt me to set settings for each show</label></p> - <hr /> + <hr /> - <p><b>Displaying folders within these directories which aren't already added to SickRage:</b></p> + <p><b>Displaying folders within these directories which aren't already added to SickRage:</b></p> - <ul id="rootDirStaticList"><li></li></ul> + <ul id="rootDirStaticList"><li></li></ul> - <br /> - <div id="tableDiv"></div> - <br /> - <br /> - <input class="btn btn-primary" type="button" value="Submit" id="submitShowDirs" /> + <br /> + <div id="tableDiv"></div> + <br /> + <br /> + <input class="btn btn-primary" type="button" value="Submit" id="submitShowDirs" /> - </form> + </form> - </div> - </div> + </div> + </div> </div> #include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl") diff --git a/gui/slick/interfaces/default/home_addShows.tmpl b/gui/slick/interfaces/default/home_addShows.tmpl index c83159681fdd43020355d991caa4ea3557c9fcf8..da8bd0a9fdb9c263b3a4c52ad7f6dcd3ff0a8b71 100644 --- a/gui/slick/interfaces/default/home_addShows.tmpl +++ b/gui/slick/interfaces/default/home_addShows.tmpl @@ -12,10 +12,10 @@ #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <div id="addShowPortal"> @@ -28,8 +28,8 @@ </div> </a> - <br/><br/> - #if $sickbeard.USE_TRAKT == True: + <br/><br/> + #if $sickbeard.USE_TRAKT == True: <a href="$sbRoot/home/addShows/trendingShows/" id="btnNewShow" class="btn btn-large"> <div class="button"><div class="icon-addtrendingshow"></div></div> <div class="buttontext"> @@ -40,7 +40,7 @@ <br/><br/> - <a href="$sbRoot/home/addShows/recommendedShows/" id="btnNewShow" class="btn btn-large"> + <a href="$sbRoot/home/addShows/recommendedShows/" id="btnNewShow" class="btn btn-large"> <div class="button"><div class="icon-addrecommendedshow"></div></div> <div class="buttontext"> <h3>Add Recommended Shows</h3> @@ -49,7 +49,7 @@ </a> <br/><br/> - #end if + #end if <a href="$sbRoot/home/addShows/existingShows/" id="btnExistingShow" class="btn btn-large"> <div class="button"><div class="icon-addexistingshow"></div></div> <div class="buttontext"> diff --git a/gui/slick/interfaces/default/home_newShow.tmpl b/gui/slick/interfaces/default/home_newShow.tmpl index ca02c5e01e68a70dce1e32e76fbe4e7f1cac6a8f..05f98857a9cf89d26c9bc79c976552d816c60b6e 100644 --- a/gui/slick/interfaces/default/home_newShow.tmpl +++ b/gui/slick/interfaces/default/home_newShow.tmpl @@ -19,90 +19,90 @@ <script type="text/javascript" src="$sbRoot/js/addShowOptions.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/lib/bootstrap-formhelpers.min-2.3.0.js?$sbPID"></script> - #if $varExists('header') - <h1 class="header">$header</h1> - #else - <h1 class="title">$title</h1> + #if $varExists('header') + <h1 class="header">$header</h1> + #else + <h1 class="title">$title</h1> #end if - + <div id="newShowPortal"> - <div id="config-components"> - <ul> - <li><a href="#core-component-group1">Add New Show</a></li> - </ul> - - <div id="core-component-group1" class="tab-pane active component-group"> - - <div id="displayText">aoeu</div> - <br /> - - <form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8"> - - <fieldset class="sectionwrap"> - <legend class="legendStep">Find a show on the TVDB or TVRAGE</legend> - - <div class="stepDiv"> - <input type="hidden" id="indexer_timeout" value="$sickbeard.INDEXER_TIMEOUT" /> - - #if $use_provided_info: - Show retrieved from existing metadata: <a href="$anon_url($sickbeard.indexerApi($provided_indexer).config['show_url'], $provided_indexer_id)">$provided_indexer_name</a> - <input type="hidden" id="indexerLang" name="indexerLang" value="en" /> - <input type="hidden" id="whichSeries" name="whichSeries" value="$provided_indexer_id" /> - <input type="hidden" id="providedIndexer" name="providedIndexer" value="$provided_indexer" /> - <input type="hidden" id="providedName" value="$provided_indexer_name" /> - #else: - - <input type="text" id="nameToSearch" value="$default_show_name" class="form-control form-control-inline input-sm input350" /> - - <select name="indexerLang" id="indexerLangSelect" class="form-control form-control-inline input-sm bfh-languages" data-language="#echo $sickbeard.INDEXER_DEFAULT_LANGUAGE#" data-available="#echo ','.join($sickbeard.indexerApi().config['valid_languages'])#"> - </select><b>*</b> - - <select name="providedIndexer" id="providedIndexer" class="form-control form-control-inline input-sm"> - <option value="0" #if $provided_indexer == 0 then "selected=\"selected\"" else ""#>All Indexers</option> - #for $indexer in $indexers - <option value="$indexer" #if $provided_indexer == $indexer then "selected=\"selected\"" else ""#> - #if $indexers[$indexer] == 'TVRage' then ''.join(($indexers[$indexer], ' **')) else $indexers[$indexer]#</option> - #end for - </select> - - <input class="btn btn-inline" type="button" id="searchName" value="Search" /> - - <br /><br /> - <b>*</b> This will only affect the language of the retrieved metadata file contents and episode filenames.<br /> - This <b>DOES NOT</b> allow SickRage to download non-english TV episodes!<br /> - <b>** IMPORTANT: </b> TVRAGE indexer implementation doesn't currently support <b>specials</b> and <b>banners/posters</b>.<br /> - <br /> - <div id="searchResults" style="height: 100%;"><br/></div> - #end if - - </div> - </fieldset> - - <fieldset class="sectionwrap"> - <legend class="legendStep">Pick the parent folder</legend> - - <div class="stepDiv"> - #if $provided_show_dir: - Pre-chosen Destination Folder: <b>$provided_show_dir</b> <br /> - <input type="hidden" id="fullShowPath" name="fullShowPath" value="$provided_show_dir" /><br /> - #else - #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_rootDirs.tmpl") - #end if - </div> - </fieldset> - - <fieldset class="sectionwrap"> - <legend class="legendStep">Customize options</legend> - <div class="stepDiv"> - #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_addShowOptions.tmpl") - </div> - </fieldset> - - #for $curNextDir in $other_shows: - <input type="hidden" name="other_shows" value="$curNextDir" /> - #end for - <input type="hidden" name="skipShow" id="skipShow" value="" /> - </form> + <div id="config-components"> + <ul> + <li><a href="#core-component-group1">Add New Show</a></li> + </ul> + + <div id="core-component-group1" class="tab-pane active component-group"> + + <div id="displayText">aoeu</div> + <br /> + + <form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8"> + + <fieldset class="sectionwrap"> + <legend class="legendStep">Find a show on the TVDB or TVRAGE</legend> + + <div class="stepDiv"> + <input type="hidden" id="indexer_timeout" value="$sickbeard.INDEXER_TIMEOUT" /> + + #if $use_provided_info: + Show retrieved from existing metadata: <a href="$anon_url($sickbeard.indexerApi($provided_indexer).config['show_url'], $provided_indexer_id)">$provided_indexer_name</a> + <input type="hidden" id="indexerLang" name="indexerLang" value="en" /> + <input type="hidden" id="whichSeries" name="whichSeries" value="$provided_indexer_id" /> + <input type="hidden" id="providedIndexer" name="providedIndexer" value="$provided_indexer" /> + <input type="hidden" id="providedName" value="$provided_indexer_name" /> + #else: + + <input type="text" id="nameToSearch" value="$default_show_name" class="form-control form-control-inline input-sm input350" /> + + <select name="indexerLang" id="indexerLangSelect" class="form-control form-control-inline input-sm bfh-languages" data-language="#echo $sickbeard.INDEXER_DEFAULT_LANGUAGE#" data-available="#echo ','.join($sickbeard.indexerApi().config['valid_languages'])#"> + </select><b>*</b> + + <select name="providedIndexer" id="providedIndexer" class="form-control form-control-inline input-sm"> + <option value="0" #if $provided_indexer == 0 then "selected=\"selected\"" else ""#>All Indexers</option> + #for $indexer in $indexers + <option value="$indexer" #if $provided_indexer == $indexer then "selected=\"selected\"" else ""#> + #if $indexers[$indexer] == 'TVRage' then ''.join(($indexers[$indexer], ' **')) else $indexers[$indexer]#</option> + #end for + </select> + + <input class="btn btn-inline" type="button" id="searchName" value="Search" /> + + <br /><br /> + <b>*</b> This will only affect the language of the retrieved metadata file contents and episode filenames.<br /> + This <b>DOES NOT</b> allow SickRage to download non-english TV episodes!<br /> + <b>** IMPORTANT: </b> TVRAGE indexer implementation doesn't currently support <b>specials</b> and <b>banners/posters</b>.<br /> + <br /> + <div id="searchResults" style="height: 100%;"><br/></div> + #end if + + </div> + </fieldset> + + <fieldset class="sectionwrap"> + <legend class="legendStep">Pick the parent folder</legend> + + <div class="stepDiv"> + #if $provided_show_dir: + Pre-chosen Destination Folder: <b>$provided_show_dir</b> <br /> + <input type="hidden" id="fullShowPath" name="fullShowPath" value="$provided_show_dir" /><br /> + #else + #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_rootDirs.tmpl") + #end if + </div> + </fieldset> + + <fieldset class="sectionwrap"> + <legend class="legendStep">Customize options</legend> + <div class="stepDiv"> + #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_addShowOptions.tmpl") + </div> + </fieldset> + + #for $curNextDir in $other_shows: + <input type="hidden" name="other_shows" value="$curNextDir" /> + #end for + <input type="hidden" name="skipShow" id="skipShow" value="" /> + </form> <br /> diff --git a/gui/slick/interfaces/default/home_postprocess.tmpl b/gui/slick/interfaces/default/home_postprocess.tmpl index 404e8c7773beb8d2ab66c8fbb9e3c613d26ff0b1..8a7e3b41660d4d482927e24fc3d0cf19c22ccd80 100644 --- a/gui/slick/interfaces/default/home_postprocess.tmpl +++ b/gui/slick/interfaces/default/home_postprocess.tmpl @@ -9,80 +9,80 @@ #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") <div id="content800"> #if $varExists('header') - <h1 class="header">$header</h1> + <h1 class="header">$header</h1> #else - <h1 class="title">$title</h1> + <h1 class="title">$title</h1> #end if <div id="postProcess"> - <form name="processForm" method="post" action="processEpisode" style="line-height: 40px;"> - <table> - <input type="hidden" id="type" name="type" value="manual"> - <tr> - <td style="padding-right:10px;"> - <b>Enter the folder containing the episode:</b> - </td> - <td> - <input type="text" name="dir" id="episodeDir" class="form-control form-control-inline input-sm input350" /> - </td> - </tr> - <tr> - <td> - <b>Process Method to be used:</b> - </td> - <td> - <select name="process_method" id="process_method" class="form-control form-control-inline input-sm" > - #set $process_method_text = {'copy': "Copy", 'move': "Move", 'hardlink': "Hard Link", 'symlink' : "Symbolic Link"} - #for $curAction in ('copy', 'move', 'hardlink', 'symlink'): - #if $sickbeard.PROCESS_METHOD == $curAction: - #set $process_method = "selected=\"selected\"" - #else - #set $process_method = "" - #end if - <option value="$curAction" $process_method>$process_method_text[$curAction]</option> - #end for - </select> - </td> - </tr> - <tr> - <td> - <b>Force already Post Processed Dir/Files:</b> - </td> - <td> - <input id="force" name="force" type="checkbox"> - </td> - </tr> - <tr> - <td> - <b>Mark Dir/Files as priority download:</b> - </td> - <td> - <input id="is_priority" name="is_priority" type="checkbox"> - <span style="line-height: 0; font-size: 12px;"><i> (Check it to replace the file even if it exists at higher quality)</i></span> - </td> - </tr> - <tr> - <td> - <b>Delete files and folders:</b> - </td> - <td> - <input id="delete_on" name="delete_on" type="checkbox"> - <span style="line-height: 0; font-size: 12px;"><i> (Check it to delete files and folders like auto processing)</i></span> - </td> - </tr> - #if $sickbeard.USE_FAILED_DOWNLOADS: - <tr> - <td> - <b>Mark download as failed:</b> - </td> - <td> - <input id="failed" name="failed" type="checkbox"> - </td> - </tr> - #end if - </table> - <input id="submit" class="btn" type="submit" value="Process" /> - </form> + <form name="processForm" method="post" action="processEpisode" style="line-height: 40px;"> + <table> + <input type="hidden" id="type" name="type" value="manual"> + <tr> + <td style="padding-right:10px;"> + <b>Enter the folder containing the episode:</b> + </td> + <td> + <input type="text" name="dir" id="episodeDir" class="form-control form-control-inline input-sm input350" /> + </td> + </tr> + <tr> + <td> + <b>Process Method to be used:</b> + </td> + <td> + <select name="process_method" id="process_method" class="form-control form-control-inline input-sm" > + #set $process_method_text = {'copy': "Copy", 'move': "Move", 'hardlink': "Hard Link", 'symlink' : "Symbolic Link"} + #for $curAction in ('copy', 'move', 'hardlink', 'symlink'): + #if $sickbeard.PROCESS_METHOD == $curAction: + #set $process_method = "selected=\"selected\"" + #else + #set $process_method = "" + #end if + <option value="$curAction" $process_method>$process_method_text[$curAction]</option> + #end for + </select> + </td> + </tr> + <tr> + <td> + <b>Force already Post Processed Dir/Files:</b> + </td> + <td> + <input id="force" name="force" type="checkbox"> + </td> + </tr> + <tr> + <td> + <b>Mark Dir/Files as priority download:</b> + </td> + <td> + <input id="is_priority" name="is_priority" type="checkbox"> + <span style="line-height: 0; font-size: 12px;"><i> (Check it to replace the file even if it exists at higher quality)</i></span> + </td> + </tr> + <tr> + <td> + <b>Delete files and folders:</b> + </td> + <td> + <input id="delete_on" name="delete_on" type="checkbox"> + <span style="line-height: 0; font-size: 12px;"><i> (Check it to delete files and folders like auto processing)</i></span> + </td> + </tr> + #if $sickbeard.USE_FAILED_DOWNLOADS: + <tr> + <td> + <b>Mark download as failed:</b> + </td> + <td> + <input id="failed" name="failed" type="checkbox"> + </td> + </tr> + #end if + </table> + <input id="submit" class="btn" type="submit" value="Process" /> + </form> <script type="text/javascript" charset="utf-8"> <!-- diff --git a/gui/slick/interfaces/default/home_recommendedShows.tmpl b/gui/slick/interfaces/default/home_recommendedShows.tmpl index f71551ada90f25ce91ee7a5707bc4eeab5d0966b..5f4f21449e3b95b15c6fffbf7cb97b7ff4d19f1e 100644 --- a/gui/slick/interfaces/default/home_recommendedShows.tmpl +++ b/gui/slick/interfaces/default/home_recommendedShows.tmpl @@ -105,20 +105,20 @@ </div> <br> - <span>Sort By:</span> - <select id="showsort" class="form-control form-control-inline input-sm"> - <option value="name">Name</option> - <option value="original" selected="selected">Original</option> - <option value="votes">Votes</option> - <option value="rating">% Rating</option> - <option value="rating_votes">% Rating > Votes</option> - </select> - - <span style="margin-left:12px">Sort Order:</span> - <select id="showsortdirection" class="form-control form-control-inline input-sm"> - <option value="asc" selected="selected">Asc</option> - <option value="desc">Desc</option> - </select> + <span>Sort By:</span> + <select id="showsort" class="form-control form-control-inline input-sm"> + <option value="name">Name</option> + <option value="original" selected="selected">Original</option> + <option value="votes">Votes</option> + <option value="rating">% Rating</option> + <option value="rating_votes">% Rating > Votes</option> + </select> + + <span style="margin-left:12px">Sort Order:</span> + <select id="showsortdirection" class="form-control form-control-inline input-sm"> + <option value="asc" selected="selected">Asc</option> + <option value="desc">Desc</option> + </select> </div> <br /> diff --git a/gui/slick/interfaces/default/home_trendingShows.tmpl b/gui/slick/interfaces/default/home_trendingShows.tmpl index d0a1da711588aa40e0ec051913eabae73f54b325..03a25bcbae54936af88ca26dc02c4a829fa4b88f 100644 --- a/gui/slick/interfaces/default/home_trendingShows.tmpl +++ b/gui/slick/interfaces/default/home_trendingShows.tmpl @@ -86,9 +86,9 @@ </script> #if $varExists('header') - <h1 class="header">$header</h1> + <h1 class="header">$header</h1> #else - <h1 class="title">$title</h1> + <h1 class="title">$title</h1> #end if <div id="tabs"> @@ -104,20 +104,20 @@ </div> <br> - <span>Sort By:</span> - <select id="showsort" class="form-control form-control-inline input-sm"> - <option value="name">Name</option> - <option value="original" selected="selected">Original</option> - <option value="votes">Votes</option> - <option value="rating">% Rating</option> - <option value="rating_votes">% Rating > Votes</option> - </select> - - <span style="margin-left:12px">Sort Order:</span> - <select id="showsortdirection" class="form-control form-control-inline input-sm"> - <option value="asc" selected="selected">Asc</option> - <option value="desc">Desc</option> - </select> + <span>Sort By:</span> + <select id="showsort" class="form-control form-control-inline input-sm"> + <option value="name">Name</option> + <option value="original" selected="selected">Original</option> + <option value="votes">Votes</option> + <option value="rating">% Rating</option> + <option value="rating_votes">% Rating > Votes</option> + </select> + + <span style="margin-left:12px">Sort Order:</span> + <select id="showsortdirection" class="form-control form-control-inline input-sm"> + <option value="asc" selected="selected">Asc</option> + <option value="desc">Desc</option> + </select> </div> <br /> diff --git a/gui/slick/interfaces/default/inc_addShowOptions.tmpl b/gui/slick/interfaces/default/inc_addShowOptions.tmpl index fe26f8b79614b1527d4de7c079c49f06d30e38d5..1a462d03c4f05a19906bfd5b9002e42a71a5ab5b 100644 --- a/gui/slick/interfaces/default/inc_addShowOptions.tmpl +++ b/gui/slick/interfaces/default/inc_addShowOptions.tmpl @@ -2,7 +2,7 @@ #from sickbeard.common import * #from sickbeard import subtitles - #if $sickbeard.USE_SUBTITLES: + #if $sickbeard.USE_SUBTITLES: <br><div class="field-pair"> <label for="subtitles" class="clearfix"> <span class="component-title">Subtitles</span> @@ -13,7 +13,7 @@ </label> </div> #end if - + <div class="field-pair"> <label for="statusSelect"> <span class="component-title">Status for previously aired episodes</span> @@ -49,7 +49,7 @@ </div> #if $enable_anime_options - <div class="field-pair alt"> + <div class="field-pair alt"> <label for="anime" class="clearfix"> <span class="component-title">Anime</span> <span class="component-desc"> @@ -66,7 +66,7 @@ <span class="component-title">Scene Numbering</span> <span class="component-desc"> <input type="checkbox" name="scene" id="scene" #if $sickbeard.SCENE_DEFAULT then "checked=\"checked\"" else ""# /> - <p>Is this show scene numbered?</p> + <p>Is this show scene numbered?</p> </span> </label> </div> @@ -75,8 +75,8 @@ #set global $anyQualities = $qualities[0] #set global $bestQualities = $qualities[1] #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_qualityChooser.tmpl") - - <br> + + <br> <div class="field-pair alt"> <label for="saveDefaultsButton" class="nocheck clearfix"> <span class="component-title"><input class="btn btn-inline" type="button" id="saveDefaultsButton" value="Save Defaults" disabled="disabled" /></span> @@ -86,9 +86,9 @@ </label> </div><br> -#if $enable_anime_options +#if $enable_anime_options #import sickbeard.blackandwhitelist #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_blackwhitelist.tmpl") #else - <input type="hidden" name="anime" id="anime" value="0" /> + <input type="hidden" name="anime" id="anime" value="0" /> #end if diff --git a/gui/slick/interfaces/default/inc_bottom.tmpl b/gui/slick/interfaces/default/inc_bottom.tmpl index e300853518a30c0144fba91d0411aa431dda0fe6..551196b09ac036c841b57151b70962cc7d956b72 100644 --- a/gui/slick/interfaces/default/inc_bottom.tmpl +++ b/gui/slick/interfaces/default/inc_bottom.tmpl @@ -7,12 +7,12 @@ </div> <!-- /contentWrapper --> <footer> - <div class="footer clearfix"> - #set $myDB = $db.DBConnection() - #set $today = str($datetime.date.today().toordinal()) + <div class="footer clearfix"> + #set $myDB = $db.DBConnection() + #set $today = str($datetime.date.today().toordinal()) #set status_quality = '(%s)' % ','.join([str(quality) for quality in $Quality.SNATCHED + $Quality.SNATCHED_PROPER]) #set status_download = '(%s)' % ','.join([str(quality) for quality in $Quality.DOWNLOADED + [$ARCHIVED]]) - + #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\ @@ -23,23 +23,23 @@ % ($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) - - #set $sql_result = $myDB.select($sql_statement) - #set $shows_total = len($sickbeard.showList) - #set $shows_active = len([show for show in $sickbeard.showList if show.paused == 0 and show.status == "Continuing"]) + #set $sql_result = $myDB.select($sql_statement) + + #set $shows_total = len($sickbeard.showList) + #set $shows_active = len([show for show in $sickbeard.showList if show.paused == 0 and show.status == "Continuing"]) - #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 + #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 #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)) - + #try #set $localRoot = $sbRoot #except NotFound @@ -49,9 +49,9 @@ #set $localheader = $header #except NotFound #set $localheader = '' - #end try - - <span class="footerhighlight">$shows_total</span> Shows (<span class="footerhighlight">$shows_active</span> Active) + #end try + + <span class="footerhighlight">$shows_total</span> Shows (<span class="footerhighlight">$shows_active</span> Active) | <span class="footerhighlight">$ep_downloaded</span> <%= ( '', @@ -63,19 +63,19 @@ )['Episode Overview' != localheader] )[0 < ep_snatched] %> - / <span class="footerhighlight">$ep_total</span> Episodes Downloaded $ep_percentage - | Daily Search: <span class="footerhighlight"><%=str(sickbeard.dailySearchScheduler.timeLeft()).split('.')[0]%></span> + / <span class="footerhighlight">$ep_total</span> Episodes Downloaded $ep_percentage + | Daily Search: <span class="footerhighlight"><%=str(sickbeard.dailySearchScheduler.timeLeft()).split('.')[0]%></span> | Backlog Search: <span class="footerhighlight"><%=str(sickbeard.backlogSearchScheduler.timeLeft()).split('.')[0]%></span> - </div> - <!-- - <ul style="display: table; margin: 0 auto; font-size: 12px; list-style-type: none; padding: 0; padding-top: 10px;"> - <li><a href="$sbRoot/manage/manageSearches/forceVersionCheck"><img src="$sbRoot/images/menu/update16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Force Version Check</a></li> - <li><a href="$sbRoot/home/restart/?pid=$sbPID" class="confirm"><img src="$sbRoot/images/menu/restart16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Restart</a></li> - <li><a href="$sbRoot/home/shutdown/?pid=$sbPID" class="confirm"><img src="$sbRoot/images/menu/shutdown16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Shutdown</a></li> - </ul> - --> + </div> + <!-- + <ul style="display: table; margin: 0 auto; font-size: 12px; list-style-type: none; padding: 0; padding-top: 10px;"> + <li><a href="$sbRoot/manage/manageSearches/forceVersionCheck"><img src="$sbRoot/images/menu/update16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Force Version Check</a></li> + <li><a href="$sbRoot/home/restart/?pid=$sbPID" class="confirm"><img src="$sbRoot/images/menu/restart16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Restart</a></li> + <li><a href="$sbRoot/home/shutdown/?pid=$sbPID" class="confirm"><img src="$sbRoot/images/menu/shutdown16.png" alt="" width="16" height="16" style="vertical-align:middle;" />Shutdown</a></li> + </ul> + --> </footer> - + </body> </html> diff --git a/gui/slick/interfaces/default/inc_qualityChooser.tmpl b/gui/slick/interfaces/default/inc_qualityChooser.tmpl index a7e7299d2a723bbabcc7677c5c068919397fd7fa..85dda6f4298fdde0109564de28e7b4ad9e029595 100644 --- a/gui/slick/interfaces/default/inc_qualityChooser.tmpl +++ b/gui/slick/interfaces/default/inc_qualityChooser.tmpl @@ -19,10 +19,10 @@ </div> <div id="customQualityWrapper"> - <div id="customQuality"> - <div class="component-group-desc"> - <p><b>Preferred</b> qualities will replace an <b>Allowed</b> quality if found, initially or in the future, even if it is a lower quality</p> - </div> + <div id="customQuality"> + <div class="component-group-desc"> + <p><b>Preferred</b> qualities will replace an <b>Allowed</b> quality if found, initially or in the future, even if it is a lower quality</p> + </div> <div style="padding-right: 40px; text-align: left; float: left;"> <h5>Allowed</h4> diff --git a/gui/slick/interfaces/default/inc_rootDirs.tmpl b/gui/slick/interfaces/default/inc_rootDirs.tmpl index 2bce67544af5b0c85e9588ea36dd099920f3532a..852b7dbe2fba24abc0afc3bd3cfb5dfc498d6cf6 100644 --- a/gui/slick/interfaces/default/inc_rootDirs.tmpl +++ b/gui/slick/interfaces/default/inc_rootDirs.tmpl @@ -12,16 +12,16 @@ <input type="hidden" id="whichDefaultRootDir" value="$backend_default" /> <div class="rootdir-selectbox"> - <select name="rootDir" id="rootDirs" size="6"> + <select name="rootDir" id="rootDirs" size="6"> #for $cur_dir in $backend_dirs: - <option value="$cur_dir">$cur_dir</option> + <option value="$cur_dir">$cur_dir</option> #end for - </select> + </select> </div> <div id="rootDirsControls" class="rootdir-controls"> - <input class="btn" type="button" id="addRootDir" value="New" /> - <input class="btn" type="button" id="editRootDir" value="Edit" /> - <input class="btn" type="button" id="deleteRootDir" value="Delete" /> - <input class="btn" type="button" id="defaultRootDir" value="Set as Default *" /> + <input class="btn" type="button" id="addRootDir" value="New" /> + <input class="btn" type="button" id="editRootDir" value="Edit" /> + <input class="btn" type="button" id="deleteRootDir" value="Delete" /> + <input class="btn" type="button" id="defaultRootDir" value="Set as Default *" /> </div> <input type="text" style="display: none" id="rootDirText" /> diff --git a/gui/slick/interfaces/default/inc_top.tmpl b/gui/slick/interfaces/default/inc_top.tmpl index 44edefcc4dc731690e5031e3d2b480ee8efa5f10..0499190e550fdae16ff1311c8cdf744ed675f981 100644 --- a/gui/slick/interfaces/default/inc_top.tmpl +++ b/gui/slick/interfaces/default/inc_top.tmpl @@ -3,184 +3,184 @@ <!DOCTYPE html> <html> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width"> - <!-- These values come from css/dark.css and css/light.css --> - #if $sickbeard.THEME_NAME == "dark": - <meta name="theme-color" content="#15528F"> - #elif $sickbeard.THEME_NAME == "light": - <meta name="theme-color" content="#333333"> - #end if - - <title>SickRage - BRANCH:[$sickbeard.BRANCH] - $title</title> - - <!--[if lt IE 9]> - <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> - <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> - <![endif]--> + <!-- These values come from css/dark.css and css/light.css --> + #if $sickbeard.THEME_NAME == "dark": + <meta name="theme-color" content="#15528F"> + #elif $sickbeard.THEME_NAME == "light": + <meta name="theme-color" content="#333333"> + #end if - <link rel="shortcut icon" href="$sbRoot/images/ico/favicon.ico"> - <link rel="icon" sizes="16x16 32x32 64x64" href="$sbRoot/images/ico/favicon.ico"> - <link rel="icon" type="image/png" sizes="196x196" href="$sbRoot/images/ico/favicon-196.png"> - <link rel="icon" type="image/png" sizes="160x160" href="$sbRoot/images/ico/favicon-160.png"> - <link rel="icon" type="image/png" sizes="96x96" href="$sbRoot/images/ico/favicon-96.png"> - <link rel="icon" type="image/png" sizes="64x64" href="$sbRoot/images/ico/favicon-64.png"> - <link rel="icon" type="image/png" sizes="32x32" href="$sbRoot/images/ico/favicon-32.png"> - <link rel="icon" type="image/png" sizes="16x16" href="$sbRoot/images/ico/favicon-16.png"> - <link rel="apple-touch-icon" sizes="152x152" href="$sbRoot/images/ico/favicon-152.png"> - <link rel="apple-touch-icon" sizes="144x144" href="$sbRoot/images/ico/favicon-144.png"> - <link rel="apple-touch-icon" sizes="120x120" href="$sbRoot/images/ico/favicon-120.png"> - <link rel="apple-touch-icon" sizes="114x114" href="$sbRoot/images/ico/favicon-114.png"> - <link rel="apple-touch-icon" sizes="76x76" href="$sbRoot/images/ico/favicon-76.png"> - <link rel="apple-touch-icon" sizes="72x72" href="$sbRoot/images/ico/favicon-72.png"> - <link rel="apple-touch-icon" href="$sbRoot/images/ico/favicon-57.png"> - <meta name="msapplication-TileColor" content="#FFFFFF"> - <meta name="msapplication-TileImage" content="$sbRoot/images/ico/favicon-144.png"> - <meta name="msapplication-config" content="$sbRoot/css/browserconfig.xml"> + <title>SickRage - BRANCH:[$sickbeard.BRANCH] - $title</title> - <link rel="stylesheet" type="text/css" href="$sbRoot/css/lib/bootstrap.css?$sbPID"/> - <link rel="stylesheet" type="text/css" href="$sbRoot/css/browser.css?$sbPID" /> - <link rel="stylesheet" type="text/css" href="$sbRoot/css/lib/jquery-ui-1.10.4.custom.css?$sbPID" /> - <link rel="stylesheet" type="text/css" href="$sbRoot/css/lib/jquery.qtip-2.2.1.min.css?$sbPID"/> - <link rel="stylesheet" type="text/css" href="$sbRoot/css/style.css?$sbPID"/> - <link rel="stylesheet" type="text/css" href="$sbRoot/css/${sickbeard.THEME_NAME}.css?$sbPID" /> - #if $sbLogin: - <link rel="stylesheet" type="text/css" href="$sbRoot/css/lib/pnotify.custom.min.css?$sbPID" /> - <link rel="stylesheet" type="text/css" href="$sbRoot/css/country-flags.css?$sbPID"/> - #end if + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> + <link rel="shortcut icon" href="$sbRoot/images/ico/favicon.ico"> + <link rel="icon" sizes="16x16 32x32 64x64" href="$sbRoot/images/ico/favicon.ico"> + <link rel="icon" type="image/png" sizes="196x196" href="$sbRoot/images/ico/favicon-196.png"> + <link rel="icon" type="image/png" sizes="160x160" href="$sbRoot/images/ico/favicon-160.png"> + <link rel="icon" type="image/png" sizes="96x96" href="$sbRoot/images/ico/favicon-96.png"> + <link rel="icon" type="image/png" sizes="64x64" href="$sbRoot/images/ico/favicon-64.png"> + <link rel="icon" type="image/png" sizes="32x32" href="$sbRoot/images/ico/favicon-32.png"> + <link rel="icon" type="image/png" sizes="16x16" href="$sbRoot/images/ico/favicon-16.png"> + <link rel="apple-touch-icon" sizes="152x152" href="$sbRoot/images/ico/favicon-152.png"> + <link rel="apple-touch-icon" sizes="144x144" href="$sbRoot/images/ico/favicon-144.png"> + <link rel="apple-touch-icon" sizes="120x120" href="$sbRoot/images/ico/favicon-120.png"> + <link rel="apple-touch-icon" sizes="114x114" href="$sbRoot/images/ico/favicon-114.png"> + <link rel="apple-touch-icon" sizes="76x76" href="$sbRoot/images/ico/favicon-76.png"> + <link rel="apple-touch-icon" sizes="72x72" href="$sbRoot/images/ico/favicon-72.png"> + <link rel="apple-touch-icon" href="$sbRoot/images/ico/favicon-57.png"> + <meta name="msapplication-TileColor" content="#FFFFFF"> + <meta name="msapplication-TileImage" content="$sbRoot/images/ico/favicon-144.png"> + <meta name="msapplication-config" content="$sbRoot/css/browserconfig.xml"> - <script type="text/javascript" src="$sbRoot/js/lib/jquery-1.11.2.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/bootstrap.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/bootstrap-hover-dropdown.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery-ui-1.10.4.custom.min.js?$sbPID"></script> - #if $sbLogin: - <script type="text/javascript" src="$sbRoot/js/lib/jquery.cookie.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.cookiejar.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.json-2.2.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.selectboxes.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.tablesorter-2.17.7.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.tablesorter.widgets-2.17.7.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.tablesorter.widget-columnSelector-2.17.7.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.qtip-2.2.1.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/pnotify.custom.min.js"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.form-3.35.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.ui.touch-punch-0.2.2.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/isotope.pkgd.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.confirm.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/script.js?$sbPID"></script> + <link rel="stylesheet" type="text/css" href="$sbRoot/css/lib/bootstrap.css?$sbPID"/> + <link rel="stylesheet" type="text/css" href="$sbRoot/css/browser.css?$sbPID" /> + <link rel="stylesheet" type="text/css" href="$sbRoot/css/lib/jquery-ui-1.10.4.custom.css?$sbPID" /> + <link rel="stylesheet" type="text/css" href="$sbRoot/css/lib/jquery.qtip-2.2.1.min.css?$sbPID"/> + <link rel="stylesheet" type="text/css" href="$sbRoot/css/style.css?$sbPID"/> + <link rel="stylesheet" type="text/css" href="$sbRoot/css/${sickbeard.THEME_NAME}.css?$sbPID" /> + #if $sbLogin: + <link rel="stylesheet" type="text/css" href="$sbRoot/css/lib/pnotify.custom.min.css?$sbPID" /> + <link rel="stylesheet" type="text/css" href="$sbRoot/css/country-flags.css?$sbPID"/> + #end if - - #if $sickbeard.FUZZY_DATING: - <script type="text/javascript" src="$sbRoot/js/moment/moment.min.js?$sbPID"></script> - <script type="text/javascript" src="$sbRoot/js/fuzzyMoment.js?$sbPID"></script> - #end if - <script type="text/javascript" charset="utf-8"> - <!-- - sbRoot = '$sbRoot'; // needed for browser.js & ajaxNotifications.js - //HTML for scrolltopcontrol, which is auto wrapped in DIV w/ ID="topcontrol" - top_image_html = '<img src="$sbRoot/images/top.gif" width="31" height="11" alt="Jump to top" />'; - themeSpinner = <%= '\'\'' if 'dark' != sickbeard.THEME_NAME else '\'-dark\'' %>; - anonURL = '<%= sickbeard.ANON_REDIRECT %>' - //--> - </script> - <script type="text/javascript" src="$sbRoot/js/lib/jquery.scrolltopcontrol-1.1.js"></script> - <script type="text/javascript" src="$sbRoot/js/browser.js"></script> - <script type="text/javascript" src="$sbRoot/js/ajaxNotifications.js"></script> - <script type="text/javascript"> - <!-- - function initActions() { - \$("#SubMenu a[href*='/home/restart/']").addClass('btn restart').html('<span class="submenu-icon-restart pull-left"></span> Restart'); - \$("#SubMenu a[href*='/home/shutdown/']").addClass('btn shutdown').html('<span class="submenu-icon-shutdown pull-left"></span> Shutdown'); - \$("#SubMenu a[href*='/home/logout/']").addClass('btn').html('<span class="ui-icon ui-icon-power pull-left"></span> Logout'); - \$("#SubMenu a:contains('Edit')").addClass('btn').html('<span class="ui-icon ui-icon-pencil pull-left"></span> Edit'); - \$("#SubMenu a:contains('Remove')").addClass('btn remove').html('<span class="ui-icon ui-icon-trash pull-left"></span> Remove'); - \$("#SubMenu a:contains('Clear History')").addClass('btn clearhistory').html('<span class="ui-icon ui-icon-trash pull-left"></span> Clear History'); - \$("#SubMenu a:contains('Trim History')").addClass('btn trimhistory').html('<span class="ui-icon ui-icon-trash pull-left"></span> Trim History'); - \$("#SubMenu a[href$='/errorlogs/clearerrors/']").addClass('btn').html('<span class="ui-icon ui-icon-trash pull-left"></span> Clear Errors'); - #if sickbeard.GIT_USERNAME and sickbeard.GIT_PASSWORD: - \$("#SubMenu a[href$='/errorlogs/submit_errors/']").addClass('btn submiterrors').html('<span class="ui-icon ui-icon-arrowreturnthick-1-n pull-left"></span> Submit Errors'); - #end if - \$("#SubMenu a:contains('Re-scan')").addClass('btn').html('<span class="ui-icon ui-icon-refresh pull-left"></span> Re-scan'); - \$("#SubMenu a:contains('Backlog Overview')").addClass('btn').html('<span class="ui-icon ui-icon-refresh pull-left"></span> Backlog Overview'); - \$("#SubMenu a[href$='/home/updatePLEX/']").addClass('btn').html('<span class="ui-icon ui-icon-refresh pull-left"></span> Update PLEX'); - \$("#SubMenu a:contains('Force')").addClass('btn').html('<span class="ui-icon ui-icon-transfer-e-w pull-left"></span> Force Full Update'); - \$("#SubMenu a:contains('Rename')").addClass('btn').html('<span class="ui-icon ui-icon-tag pull-left"></span> Preview Rename'); - \$("#SubMenu a[href$='/config/subtitles/']").addClass('btn').html('<span class="ui-icon ui-icon-comment pull-left"></span> Search Subtitles'); - \$("#SubMenu a[href*='/home/subtitleShow']").addClass('btn').html('<span class="ui-icon ui-icon-comment pull-left"></span> Download Subtitles'); - \$("#SubMenu a:contains('Anime')").addClass('btn').html('<span class="submenu-icon-anime pull-left"></span> Anime'); - \$("#SubMenu a:contains('Settings')").addClass('btn').html('<span class="ui-icon ui-icon-search pull-left"></span> Search Settings'); - \$("#SubMenu a:contains('Provider')").addClass('btn').html('<span class="ui-icon ui-icon-search pull-left"></span> Search Providers'); - \$("#SubMenu a:contains('Backup/Restore')").addClass('btn').html('<span class="ui-icon ui-icon-gear pull-left"></span> Backup/Restore'); - \$("#SubMenu a:contains('General')").addClass('btn').html('<span class="ui-icon ui-icon-gear pull-left"></span> General'); - \$("#SubMenu a:contains('Episode Status')").addClass('btn').html('<span class="ui-icon ui-icon-transferthick-e-w pull-left"></span> Episode Status Management'); - \$("#SubMenu a:contains('Missed Subtitle')").addClass('btn').html('<span class="ui-icon ui-icon-transferthick-e-w pull-left"></span> Missed Subtitles'); - \$("#SubMenu a[href$='/home/addShows/']").addClass('btn').html('<span class="ui-icon ui-icon-video pull-left"></span> Add Show'); - \$("#SubMenu a:contains('Processing')").addClass('btn').html('<span class="ui-icon ui-icon-folder-open pull-left"></span> Post-Processing'); - \$("#SubMenu a:contains('Manage Searches')").addClass('btn').html('<span class="ui-icon ui-icon-search pull-left"></span> Manage Searches'); - \$("#SubMenu a:contains('Manage Torrents')").addClass('btn').html('<span class="submenu-icon-bittorrent pull-left"></span> Manage Torrents'); - \$("#SubMenu a[href$='/manage/failedDownloads/']").addClass('btn').html('<span class="submenu-icon-failed-download pull-left"></span> Failed Downloads'); - \$("#SubMenu a:contains('Notification')").addClass('btn').html('<span class="ui-icon ui-icon-note pull-left"></span> Notifications'); - \$("#SubMenu a:contains('Update show in KODI')").addClass('btn').html('<span class="submenu-icon-kodi pull-left"></span> Update show in KODI'); - \$("#SubMenu a[href$='/home/updateKODI/']").addClass('btn').html('<span class="submenu-icon-kodi pull-left"></span> Update KODI'); + + <script type="text/javascript" src="$sbRoot/js/lib/jquery-1.11.2.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/bootstrap.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/bootstrap-hover-dropdown.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery-ui-1.10.4.custom.min.js?$sbPID"></script> + #if $sbLogin: + <script type="text/javascript" src="$sbRoot/js/lib/jquery.cookie.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.cookiejar.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.json-2.2.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.selectboxes.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.tablesorter-2.17.7.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.tablesorter.widgets-2.17.7.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.tablesorter.widget-columnSelector-2.17.7.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.qtip-2.2.1.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/pnotify.custom.min.js"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.form-3.35.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.ui.touch-punch-0.2.2.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/isotope.pkgd.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.confirm.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/script.js?$sbPID"></script> + + + #if $sickbeard.FUZZY_DATING: + <script type="text/javascript" src="$sbRoot/js/moment/moment.min.js?$sbPID"></script> + <script type="text/javascript" src="$sbRoot/js/fuzzyMoment.js?$sbPID"></script> + #end if + <script type="text/javascript" charset="utf-8"> + <!-- + sbRoot = '$sbRoot'; // needed for browser.js & ajaxNotifications.js + //HTML for scrolltopcontrol, which is auto wrapped in DIV w/ ID="topcontrol" + top_image_html = '<img src="$sbRoot/images/top.gif" width="31" height="11" alt="Jump to top" />'; + themeSpinner = <%= '\'\'' if 'dark' != sickbeard.THEME_NAME else '\'-dark\'' %>; + anonURL = '<%= sickbeard.ANON_REDIRECT %>' + //--> + </script> + <script type="text/javascript" src="$sbRoot/js/lib/jquery.scrolltopcontrol-1.1.js"></script> + <script type="text/javascript" src="$sbRoot/js/browser.js"></script> + <script type="text/javascript" src="$sbRoot/js/ajaxNotifications.js"></script> + <script type="text/javascript"> + <!-- + function initActions() { + \$("#SubMenu a[href*='/home/restart/']").addClass('btn restart').html('<span class="submenu-icon-restart pull-left"></span> Restart'); + \$("#SubMenu a[href*='/home/shutdown/']").addClass('btn shutdown').html('<span class="submenu-icon-shutdown pull-left"></span> Shutdown'); + \$("#SubMenu a[href*='/home/logout/']").addClass('btn').html('<span class="ui-icon ui-icon-power pull-left"></span> Logout'); + \$("#SubMenu a:contains('Edit')").addClass('btn').html('<span class="ui-icon ui-icon-pencil pull-left"></span> Edit'); + \$("#SubMenu a:contains('Remove')").addClass('btn remove').html('<span class="ui-icon ui-icon-trash pull-left"></span> Remove'); + \$("#SubMenu a:contains('Clear History')").addClass('btn clearhistory').html('<span class="ui-icon ui-icon-trash pull-left"></span> Clear History'); + \$("#SubMenu a:contains('Trim History')").addClass('btn trimhistory').html('<span class="ui-icon ui-icon-trash pull-left"></span> Trim History'); + \$("#SubMenu a[href$='/errorlogs/clearerrors/']").addClass('btn').html('<span class="ui-icon ui-icon-trash pull-left"></span> Clear Errors'); + #if sickbeard.GIT_USERNAME and sickbeard.GIT_PASSWORD: + \$("#SubMenu a[href$='/errorlogs/submit_errors/']").addClass('btn submiterrors').html('<span class="ui-icon ui-icon-arrowreturnthick-1-n pull-left"></span> Submit Errors'); + #end if + \$("#SubMenu a:contains('Re-scan')").addClass('btn').html('<span class="ui-icon ui-icon-refresh pull-left"></span> Re-scan'); + \$("#SubMenu a:contains('Backlog Overview')").addClass('btn').html('<span class="ui-icon ui-icon-refresh pull-left"></span> Backlog Overview'); + \$("#SubMenu a[href$='/home/updatePLEX/']").addClass('btn').html('<span class="ui-icon ui-icon-refresh pull-left"></span> Update PLEX'); + \$("#SubMenu a:contains('Force')").addClass('btn').html('<span class="ui-icon ui-icon-transfer-e-w pull-left"></span> Force Full Update'); + \$("#SubMenu a:contains('Rename')").addClass('btn').html('<span class="ui-icon ui-icon-tag pull-left"></span> Preview Rename'); + \$("#SubMenu a[href$='/config/subtitles/']").addClass('btn').html('<span class="ui-icon ui-icon-comment pull-left"></span> Search Subtitles'); + \$("#SubMenu a[href*='/home/subtitleShow']").addClass('btn').html('<span class="ui-icon ui-icon-comment pull-left"></span> Download Subtitles'); + \$("#SubMenu a:contains('Anime')").addClass('btn').html('<span class="submenu-icon-anime pull-left"></span> Anime'); + \$("#SubMenu a:contains('Settings')").addClass('btn').html('<span class="ui-icon ui-icon-search pull-left"></span> Search Settings'); + \$("#SubMenu a:contains('Provider')").addClass('btn').html('<span class="ui-icon ui-icon-search pull-left"></span> Search Providers'); + \$("#SubMenu a:contains('Backup/Restore')").addClass('btn').html('<span class="ui-icon ui-icon-gear pull-left"></span> Backup/Restore'); + \$("#SubMenu a:contains('General')").addClass('btn').html('<span class="ui-icon ui-icon-gear pull-left"></span> General'); + \$("#SubMenu a:contains('Episode Status')").addClass('btn').html('<span class="ui-icon ui-icon-transferthick-e-w pull-left"></span> Episode Status Management'); + \$("#SubMenu a:contains('Missed Subtitle')").addClass('btn').html('<span class="ui-icon ui-icon-transferthick-e-w pull-left"></span> Missed Subtitles'); + \$("#SubMenu a[href$='/home/addShows/']").addClass('btn').html('<span class="ui-icon ui-icon-video pull-left"></span> Add Show'); + \$("#SubMenu a:contains('Processing')").addClass('btn').html('<span class="ui-icon ui-icon-folder-open pull-left"></span> Post-Processing'); + \$("#SubMenu a:contains('Manage Searches')").addClass('btn').html('<span class="ui-icon ui-icon-search pull-left"></span> Manage Searches'); + \$("#SubMenu a:contains('Manage Torrents')").addClass('btn').html('<span class="submenu-icon-bittorrent pull-left"></span> Manage Torrents'); + \$("#SubMenu a[href$='/manage/failedDownloads/']").addClass('btn').html('<span class="submenu-icon-failed-download pull-left"></span> Failed Downloads'); + \$("#SubMenu a:contains('Notification')").addClass('btn').html('<span class="ui-icon ui-icon-note pull-left"></span> Notifications'); + \$("#SubMenu a:contains('Update show in KODI')").addClass('btn').html('<span class="submenu-icon-kodi pull-left"></span> Update show in KODI'); + \$("#SubMenu a[href$='/home/updateKODI/']").addClass('btn').html('<span class="submenu-icon-kodi pull-left"></span> Update KODI'); \$("#SubMenu a:contains('Pause')").addClass('btn').html('<span class="ui-icon ui-icon-pause pull-left"></span> Pause'); - \$("#SubMenu a:contains('Resume')").addClass('btn').html('<span class="ui-icon ui-icon-play pull-left"></span> Resume'); - - } - - \$(document).ready(function() { - - initActions(); - - \$("#NAV$topmenu").addClass("active"); - - \$('.dropdown-toggle').dropdownHover(); - - }); - //--> - </script> - <script type="text/javascript" src="$sbRoot/js/confirmations.js?$sbPID"></script> - #end if - </head> + \$("#SubMenu a:contains('Resume')").addClass('btn').html('<span class="ui-icon ui-icon-play pull-left"></span> Resume'); + + } + + \$(document).ready(function() { - <body> - <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> - <div class="container-fluid"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="navbar-brand" href="$sbRoot/home/" title="SickRage"><img alt="SickRage" src="$sbRoot/images/sickrage.png" style="height: 50px;" class="img-responsive pull-left" /></a> - </div> + initActions(); - #if $sbLogin: - <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> - <ul class="nav navbar-nav navbar-right"> - <li id="NAVnews"> + \$("#NAV$topmenu").addClass("active"); + + \$('.dropdown-toggle').dropdownHover(); + + }); + //--> + </script> + <script type="text/javascript" src="$sbRoot/js/confirmations.js?$sbPID"></script> + #end if + </head> + + <body> + <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> + <div class="container-fluid"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="$sbRoot/home/" title="SickRage"><img alt="SickRage" src="$sbRoot/images/sickrage.png" style="height: 50px;" class="img-responsive pull-left" /></a> + </div> + + #if $sbLogin: + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav navbar-right"> + <li id="NAVnews"> <a href="$sbRoot/news/">News</a> </li> - <li id="NAVnews"> + <li id="NAVnews"> <a href="$sbRoot/IRC/">IRC</a> </li> - <li id="NAVhome"> + <li id="NAVhome"> <a href="$sbRoot/home/">Shows</a> </li> - - <li id="NAVcomingEpisodes"> + + <li id="NAVcomingEpisodes"> <a href="$sbRoot/comingEpisodes/">Coming Episodes</a> </li> - - <li id="NAVhistory"> + + <li id="NAVhistory"> <a href="$sbRoot/history/">History</a> </li> - - <li id="NAVmanage" class="dropdown"> + + <li id="NAVmanage" class="dropdown"> <a href="$sbRoot/manage/" class="dropdown-toggle" data-toggle="dropdown">Manage <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="$sbRoot/manage/"><i class="menu-icon-manage"></i> Mass Update</a></li> @@ -188,101 +188,101 @@ <li><a href="$sbRoot/manage/manageSearches/"><i class="menu-icon-manage-searches"></i> Manage Searches</a></li> <li><a href="$sbRoot/manage/episodeStatuses/"><i class="menu-icon-backlog"></i> Episode Status Management</a></li> #if $sickbeard.USE_PLEX and $sickbeard.PLEX_SERVER_HOST != "": - <li><a href="$sbRoot/home/updatePLEX/"><i class="menu-icon-backlog-view"></i> Update PLEX</a></li> - #end if - #if $sickbeard.USE_KODI and $sickbeard.KODI_HOST != "": - <li><a href="$sbRoot/home/updateKODI/"><i class="menu-icon-kodi"></i> Update KODI</a></li> - #end if - #if $sickbeard.USE_TORRENTS and $sickbeard.TORRENT_METHOD != 'blackhole' \ - and ($sickbeard.ENABLE_HTTPS and $sickbeard.TORRENT_HOST[:5] == 'https' \ - or not $sickbeard.ENABLE_HTTPS and $sickbeard.TORRENT_HOST[:5] == 'http:'): - <li><a href="$sbRoot/manage/manageTorrents/"><i class="menu-icon-bittorrent"></i> Manage Torrents</a></li> - #end if - #if $sickbeard.USE_FAILED_DOWNLOADS: - <li><a href="$sbRoot/manage/failedDownloads/"><i class="menu-icon-failed-download"></i> Failed Downloads</a></li> - #end if - #if $sickbeard.USE_SUBTITLES: - <li><a href="$sbRoot/manage/subtitleMissed/"><i class="menu-icon-backlog"></i> Missed Subtitle Management</a></li> - #end if + <li><a href="$sbRoot/home/updatePLEX/"><i class="menu-icon-backlog-view"></i> Update PLEX</a></li> + #end if + #if $sickbeard.USE_KODI and $sickbeard.KODI_HOST != "": + <li><a href="$sbRoot/home/updateKODI/"><i class="menu-icon-kodi"></i> Update KODI</a></li> + #end if + #if $sickbeard.USE_TORRENTS and $sickbeard.TORRENT_METHOD != 'blackhole' \ + and ($sickbeard.ENABLE_HTTPS and $sickbeard.TORRENT_HOST[:5] == 'https' \ + or not $sickbeard.ENABLE_HTTPS and $sickbeard.TORRENT_HOST[:5] == 'http:'): + <li><a href="$sbRoot/manage/manageTorrents/"><i class="menu-icon-bittorrent"></i> Manage Torrents</a></li> + #end if + #if $sickbeard.USE_FAILED_DOWNLOADS: + <li><a href="$sbRoot/manage/failedDownloads/"><i class="menu-icon-failed-download"></i> Failed Downloads</a></li> + #end if + #if $sickbeard.USE_SUBTITLES: + <li><a href="$sbRoot/manage/subtitleMissed/"><i class="menu-icon-backlog"></i> Missed Subtitle Management</a></li> + #end if </ul> </li> - - <li id="NAVerrorlogs" class="dropdown"> + + <li id="NAVerrorlogs" class="dropdown"> <a href="$sbRoot/errorlogs/" class="dropdown-toggle" data-toggle="dropdown">$logPageTitle <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="$sbRoot/errorlogs/"><i class="menu-icon-viewlog-errors"></i> View Log (Errors)</a></li> <li><a href="$sbRoot/errorlogs/viewlog/"><i class="menu-icon-viewlog"></i> View Log</a></li> </ul> </li> - - <li id="NAVconfig" class="dropdown"> + + <li id="NAVconfig" class="dropdown"> <a href="$sbRoot/config/" class="dropdown-toggle" data-toggle="dropdown"><img src="$sbRoot/images/menu/system18.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">Config <b class="caret"></b></span></a> <ul class="dropdown-menu"> <li><a href="$sbRoot/config/"><i class="menu-icon-help"></i> Help & Info</a></li> <li><a href="$sbRoot/config/general/"><i class="menu-icon-config"></i> General</a></li> - <li><a href="$sbRoot/config/backuprestore/"><i class="menu-icon-config"></i> Backup & Restore</a></li> + <li><a href="$sbRoot/config/backuprestore/"><i class="menu-icon-config"></i> Backup & Restore</a></li> <li><a href="$sbRoot/config/search/"><i class="menu-icon-config"></i> Search Settings</a></li> <li><a href="$sbRoot/config/providers/"><i class="menu-icon-config"></i> Search Providers</a></li> - <li><a href="$sbRoot/config/subtitles/"><i class="menu-icon-config"></i> Subtitles Settings</a></li> + <li><a href="$sbRoot/config/subtitles/"><i class="menu-icon-config"></i> Subtitles Settings</a></li> <li><a href="$sbRoot/config/postProcessing/"><i class="menu-icon-config"></i> Post Processing</a></li> <li><a href="$sbRoot/config/notifications/"><i class="menu-icon-config"></i> Notifications</a></li> - <li><a href="$sbRoot/config/anime/"><i class="menu-icon-config"></i> Anime</a></li> + <li><a href="$sbRoot/config/anime/"><i class="menu-icon-config"></i> Anime</a></li> </ul> </li> - - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="$sbRoot/images/menu/system18-2.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">System <b class="caret"></b></span></a> - <ul class="dropdown-menu"> - <li><a href="$sbRoot/home/updateCheck?pid=$sbPID"><i class="menu-icon-update"></i> Check For Updates</a></li> + + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="$sbRoot/images/menu/system18-2.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">System <b class="caret"></b></span></a> + <ul class="dropdown-menu"> + <li><a href="$sbRoot/home/updateCheck?pid=$sbPID"><i class="menu-icon-update"></i> Check For Updates</a></li> <li><a href="$sbRoot/changes"><i class="menu-icon-help"></i> Changelog</a></li> <li><a href="$sbRoot/home/restart/?pid=$sbPID" class="confirm restart"><i class="menu-icon-restart"></i> Restart</a></li> <li><a href="$sbRoot/home/shutdown/?pid=$sbPID" class="confirm shutdown"><i class="menu-icon-shutdown"></i> Shutdown</a></li> <li><a href="$sbRoot/logout" class="confirm logout"><i class="menu-icon-shutdown"></i> Logout</a></li> <li><a href="$sbRoot/home/status/"><i class="menu-icon-help"></i> Server Status</a></li> - </ul> - </li> - <li id="donate"><a href="https://github.com/SiCKRAGETV/SickRage/wiki/Donations" rel="noreferrer" onclick="window.open('${sickbeard.ANON_REDIRECT}' + this.href); return false;"><img src="$sbRoot/images/donate.jpg" alt="[donate]" class="navbaricon hidden-xs" /></a></li> - </ul> - #end if - </div><!-- /.navbar-collapse --> - </div><!-- /.container-fluid --> - </nav> + </ul> + </li> + <li id="donate"><a href="https://github.com/SiCKRAGETV/SickRage/wiki/Donations" rel="noreferrer" onclick="window.open('${sickbeard.ANON_REDIRECT}' + this.href); return false;"><img src="$sbRoot/images/donate.jpg" alt="[donate]" class="navbaricon hidden-xs" /></a></li> + </ul> + #end if + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> + </nav> + + #if $varExists('submenu'): + <div id="SubMenu"> + <span> + #set $first = True + #for $menuItem in $submenu: + #if 'requires' not in $menuItem or $menuItem.requires(): + #if type($menuItem.path) == dict: + #if $first then "" else "</span><span>"#<b>$menuItem.title</b> + #set $first = False + #set $inner_first = True + #for $cur_link in $menuItem.path: + #if $inner_first then "" else "· "#<a class="inner" href="$sbRoot/$menuItem.path[$cur_link]">$cur_link</a> + #set $inner_first = False + #end for + #else + #if $first then "" else ""#<a href="$sbRoot/$menuItem.path" #if 'confirm' in $menuItem then "class=\"confirm\"" else "" #>$menuItem.title</a> + #set $first = False + #end if + #end if + #end for + </span> + </div> + #end if + + #if $sickbeard.BRANCH and $sickbeard.BRANCH != 'master' and not $sickbeard.DEVELOPER and $sbLogin + <div class="alert alert-danger upgrade-notification" role="alert"> + <span>You're using the $sickbeard.BRANCH branch. Please use 'master' unless specifically asked</span> + </div> + #end if - #if $varExists('submenu'): - <div id="SubMenu"> - <span> - #set $first = True - #for $menuItem in $submenu: - #if 'requires' not in $menuItem or $menuItem.requires(): - #if type($menuItem.path) == dict: - #if $first then "" else "</span><span>"#<b>$menuItem.title</b> - #set $first = False - #set $inner_first = True - #for $cur_link in $menuItem.path: - #if $inner_first then "" else "· "#<a class="inner" href="$sbRoot/$menuItem.path[$cur_link]">$cur_link</a> - #set $inner_first = False - #end for - #else - #if $first then "" else ""#<a href="$sbRoot/$menuItem.path" #if 'confirm' in $menuItem then "class=\"confirm\"" else "" #>$menuItem.title</a> - #set $first = False - #end if - #end if - #end for - </span> - </div> - #end if - - #if $sickbeard.BRANCH and $sickbeard.BRANCH != 'master' and not $sickbeard.DEVELOPER and $sbLogin - <div class="alert alert-danger upgrade-notification" role="alert"> - <span>You're using the $sickbeard.BRANCH branch. Please use 'master' unless specifically asked</span> - </div> - #end if - - #if $sickbeard.NEWEST_VERSION_STRING and $sbLogin - <div class="alert alert-success upgrade-notification" role="alert"> - <span>$sickbeard.NEWEST_VERSION_STRING</span> - </div> - #end if + #if $sickbeard.NEWEST_VERSION_STRING and $sbLogin + <div class="alert alert-success upgrade-notification" role="alert"> + <span>$sickbeard.NEWEST_VERSION_STRING</span> + </div> + #end if <div id="contentWrapper"> <div id="content"> diff --git a/gui/slick/interfaces/default/manage.tmpl b/gui/slick/interfaces/default/manage.tmpl index 76d7ec2711284e0442573e41ca8d2f325b39ff1a..2efba08e85e19593627c5dcc239fe1b90b886fa7 100644 --- a/gui/slick/interfaces/default/manage.tmpl +++ b/gui/slick/interfaces/default/manage.tmpl @@ -18,11 +18,11 @@ return false; }, format: function(s) { - #if not $sickbeard.SORT_ARTICLE: - return (s || '').replace(/^(The|A|An)\s/i,''); - #else: - return (s || ''); - #end if + #if not $sickbeard.SORT_ARTICLE: + return (s || '').replace(/^(The|A|An)\s/i,''); + #else: + return (s || ''); + #end if }, type: 'text' }); @@ -31,24 +31,24 @@ is: function(s) { 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); }, type: 'numeric' }); -\$(document).ready(function() -{ +\$(document).ready(function() +{ \$("#massUpdateTable:has(tbody tr)").tablesorter({ sortList: [[1,0]], textExtraction: { 2: function(node) { return \$(node).find("span").text().toLowerCase(); }, 3: function(node) { return \$(node).find("img").attr("alt"); }, 4: function(node) { return \$(node).find("img").attr("alt"); }, - 5: function(node) { return \$(node).find("img").attr("alt"); }, - 6: function(node) { return \$(node).find("img").attr("alt"); }, - 7: function(node) { return \$(node).find("img").attr("alt"); }, - 8: function(node) { return \$(node).find("img").attr("alt"); }, + 5: function(node) { return \$(node).find("img").attr("alt"); }, + 6: function(node) { return \$(node).find("img").attr("alt"); }, + 7: function(node) { return \$(node).find("img").attr("alt"); }, + 8: function(node) { return \$(node).find("img").attr("alt"); }, }, widgets: ['zebra'], headers: { @@ -57,7 +57,7 @@ 2: { sorter: 'quality'}, 3: { sorter: 'sports'}, 4: { sorter: 'scene'}, - 5: { sorter: 'anime'}, + 5: { sorter: 'anime'}, 6: { sorter: 'flatfold'}, 7: { sorter: 'paused'}, 8: { sorter: 'subtitle'}, @@ -67,134 +67,134 @@ 12: { sorter: false}, 13: { sorter: false}, 14: { sorter: false}, - 15: { sorter: false}, - 16: { sorter: false}, - 17: { sorter: false} + 15: { sorter: false}, + 16: { sorter: false}, + 17: { sorter: false} } - }); + }); }); //--> </script> <script type="text/javascript" src="$sbRoot/js/massUpdate.js?$sbPID"></script> -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <form name="massUpdateForm" method="post" action="massUpdate"> <table id="massUpdateTable" class="sickbeardTable tablesorter" cellspacing="1" border="0" cellpadding="0"> - <thead> - <tr> - <th class="col-checkbox">Edit<br/><input type="checkbox" class="bulkCheck" id="editCheck" /></th> - <th class="nowrap" style="text-align: left;">Show Name</th> - <th class="col-legend">Quality</th> - <th class="col-legend">Sports</th> - <th class="col-legend">Scene</th> - <th class="col-legend">Anime</th> - <th class="col-legend">Flat Folders</th> - <th class="col-legend">Paused</th> - <th class="col-legend">Subtitle</th> - <th class="col-legend">Default Ep<br>Status</th> - <th class="col-legend">Status</th> - <th width="1%">Update<br/><input type="checkbox" class="bulkCheck" id="updateCheck" /></th> - <th width="1%">Rescan<br/><input type="checkbox" class="bulkCheck" id="refreshCheck" /></th> - <th width="1%">Rename<br/><input type="checkbox" class="bulkCheck" id="renameCheck" /></th> - #if $sickbeard.USE_SUBTITLES: - <th width="1%">Search Subtitle<br/><input type="checkbox" class="bulkCheck" id="subtitleCheck" /></th> - #end if - <!-- <th>Force Metadata Regen <input type="checkbox" class="bulkCheck" id="metadataCheck" /></th>//--> - <th width="1%">Delete<br/><input type="checkbox" class="bulkCheck" id="deleteCheck" /></th> - <th width="1%">Remove<br/><input type="checkbox" class="bulkCheck" id="removeCheck" /></th> - </tr> - </thead> - - <tfoot> - <tr> - <td rowspan="1" colspan="2" class="align-center alt"><input class="btn pull-left" type="button" value="Edit Selected" id="submitMassEdit" /></td> - <td rowspan="1" colspan="#if $sickbeard.USE_SUBTITLES then 15 else 14#" class="align-right alt"><input class="btn pull-right" type="button" value="Submit" id="submitMassUpdate" /></td> - </tr> - </tfoot> - - <tbody> - #set $myShowList = $sickbeard.showList - $myShowList.sort(lambda x, y: cmp(x.name, y.name)) - - #for $curShow in $myShowList: - #set $curEp = $curShow.nextaired - #set $curUpdate_disabled = "" - #set $curRefresh_disabled = "" - #set $curRename_disabled = "" - #set $curSubtitle_disabled = "" - #set $curDelete_disabled = "" - #set $curRemove_disabled = "" - - #if $sickbeard.showQueueScheduler.action.isBeingUpdated($curShow) or $sickbeard.showQueueScheduler.action.isInUpdateQueue($curShow): - #set $curUpdate_disabled = "disabled=\"disabled\" " - #end if - - #set $curUpdate = "<input type=\"checkbox\" class=\"updateCheck\" id=\"update-"+str($curShow.indexerid)+"\" "+$curUpdate_disabled+"/>" - - #if $sickbeard.showQueueScheduler.action.isBeingRefreshed($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): - #set $curRefresh_disabled = "disabled=\"disabled\" " - #end if - - #set $curRefresh = "<input type=\"checkbox\" class=\"refreshCheck\" id=\"refresh-"+str($curShow.indexerid)+"\" "+$curRefresh_disabled+"/>" - - #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow): - #set $curRename = "disabled=\"disabled\" " - #end if - - #set $curRename = "<input type=\"checkbox\" class=\"renameCheck\" id=\"rename-"+str($curShow.indexerid)+"\" "+$curRename_disabled+"/>" - - #if not $curShow.subtitles or $sickbeard.showQueueScheduler.action.isBeingSubtitled($curShow) or $sickbeard.showQueueScheduler.action.isInSubtitleQueue($curShow): - #set $curSubtitle_disabled = "disabled=\"disabled\" " - #end if - - #set $curSubtitle = "<input type=\"checkbox\" class=\"subtitleCheck\" id=\"subtitle-"+str($curShow.indexerid)+"\" "+$curSubtitle_disabled+"/>" - - #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): - #set $curDelete = "disabled=\"disabled\" " - #end if - - #set $curDelete = "<input type=\"checkbox\" class=\"deleteCheck\" id=\"delete-"+str($curShow.indexerid)+"\" "+$curDelete_disabled+"/>" - - #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): - #set $curRemove = "disabled=\"disabled\" " - #end if - - #set $curRemove = "<input type=\"checkbox\" class=\"removeCheck\" id=\"remove-"+str($curShow.indexerid)+"\" "+$curRemove_disabled+"/>" - - <tr> - <td align="center"><input type="checkbox" class="editCheck" id="edit-$curShow.indexerid" /></td> - <td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td> - #if $curShow.quality in $qualityPresets: - <td align="center"><span class="quality $qualityPresetStrings[$curShow.quality]">$qualityPresetStrings[$curShow.quality]</span></td> - #else: - <td align="center"><span class="quality Custom">Custom</span></td> - #end if - <td align="center"><img src="$sbRoot/images/#if int($curShow.is_sports) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> - <td align="center"><img src="$sbRoot/images/#if int($curShow.is_scene) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> - <td align="center"><img src="$sbRoot/images/#if int($curShow.is_anime) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> - <td align="center"><img src="$sbRoot/images/#if int($curShow.flatten_folders) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> - <td align="center"><img src="$sbRoot/images/#if int($curShow.paused) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> - <td align="center"><img src="$sbRoot/images/#if int($curShow.subtitles) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> - <td align="center">$statusStrings[$curShow.default_ep_status]</td> - <td align="center">$curShow.status</td> - <td align="center">$curUpdate</td> - <td align="center">$curRefresh</td> - <td align="center">$curRename</td> - #if $sickbeard.USE_SUBTITLES: - <td align="center">$curSubtitle</td> - #end if - <td align="center">$curDelete</td> - <td align="center">$curRemove</td> - </tr> - - #end for - - </tbody> - + <thead> + <tr> + <th class="col-checkbox">Edit<br/><input type="checkbox" class="bulkCheck" id="editCheck" /></th> + <th class="nowrap" style="text-align: left;">Show Name</th> + <th class="col-legend">Quality</th> + <th class="col-legend">Sports</th> + <th class="col-legend">Scene</th> + <th class="col-legend">Anime</th> + <th class="col-legend">Flat Folders</th> + <th class="col-legend">Paused</th> + <th class="col-legend">Subtitle</th> + <th class="col-legend">Default Ep<br>Status</th> + <th class="col-legend">Status</th> + <th width="1%">Update<br/><input type="checkbox" class="bulkCheck" id="updateCheck" /></th> + <th width="1%">Rescan<br/><input type="checkbox" class="bulkCheck" id="refreshCheck" /></th> + <th width="1%">Rename<br/><input type="checkbox" class="bulkCheck" id="renameCheck" /></th> + #if $sickbeard.USE_SUBTITLES: + <th width="1%">Search Subtitle<br/><input type="checkbox" class="bulkCheck" id="subtitleCheck" /></th> + #end if + <!-- <th>Force Metadata Regen <input type="checkbox" class="bulkCheck" id="metadataCheck" /></th>//--> + <th width="1%">Delete<br/><input type="checkbox" class="bulkCheck" id="deleteCheck" /></th> + <th width="1%">Remove<br/><input type="checkbox" class="bulkCheck" id="removeCheck" /></th> + </tr> + </thead> + + <tfoot> + <tr> + <td rowspan="1" colspan="2" class="align-center alt"><input class="btn pull-left" type="button" value="Edit Selected" id="submitMassEdit" /></td> + <td rowspan="1" colspan="#if $sickbeard.USE_SUBTITLES then 15 else 14#" class="align-right alt"><input class="btn pull-right" type="button" value="Submit" id="submitMassUpdate" /></td> + </tr> + </tfoot> + + <tbody> + #set $myShowList = $sickbeard.showList + $myShowList.sort(lambda x, y: cmp(x.name, y.name)) + + #for $curShow in $myShowList: + #set $curEp = $curShow.nextaired + #set $curUpdate_disabled = "" + #set $curRefresh_disabled = "" + #set $curRename_disabled = "" + #set $curSubtitle_disabled = "" + #set $curDelete_disabled = "" + #set $curRemove_disabled = "" + + #if $sickbeard.showQueueScheduler.action.isBeingUpdated($curShow) or $sickbeard.showQueueScheduler.action.isInUpdateQueue($curShow): + #set $curUpdate_disabled = "disabled=\"disabled\" " + #end if + + #set $curUpdate = "<input type=\"checkbox\" class=\"updateCheck\" id=\"update-"+str($curShow.indexerid)+"\" "+$curUpdate_disabled+"/>" + + #if $sickbeard.showQueueScheduler.action.isBeingRefreshed($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): + #set $curRefresh_disabled = "disabled=\"disabled\" " + #end if + + #set $curRefresh = "<input type=\"checkbox\" class=\"refreshCheck\" id=\"refresh-"+str($curShow.indexerid)+"\" "+$curRefresh_disabled+"/>" + + #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow): + #set $curRename = "disabled=\"disabled\" " + #end if + + #set $curRename = "<input type=\"checkbox\" class=\"renameCheck\" id=\"rename-"+str($curShow.indexerid)+"\" "+$curRename_disabled+"/>" + + #if not $curShow.subtitles or $sickbeard.showQueueScheduler.action.isBeingSubtitled($curShow) or $sickbeard.showQueueScheduler.action.isInSubtitleQueue($curShow): + #set $curSubtitle_disabled = "disabled=\"disabled\" " + #end if + + #set $curSubtitle = "<input type=\"checkbox\" class=\"subtitleCheck\" id=\"subtitle-"+str($curShow.indexerid)+"\" "+$curSubtitle_disabled+"/>" + + #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): + #set $curDelete = "disabled=\"disabled\" " + #end if + + #set $curDelete = "<input type=\"checkbox\" class=\"deleteCheck\" id=\"delete-"+str($curShow.indexerid)+"\" "+$curDelete_disabled+"/>" + + #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): + #set $curRemove = "disabled=\"disabled\" " + #end if + + #set $curRemove = "<input type=\"checkbox\" class=\"removeCheck\" id=\"remove-"+str($curShow.indexerid)+"\" "+$curRemove_disabled+"/>" + + <tr> + <td align="center"><input type="checkbox" class="editCheck" id="edit-$curShow.indexerid" /></td> + <td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td> + #if $curShow.quality in $qualityPresets: + <td align="center"><span class="quality $qualityPresetStrings[$curShow.quality]">$qualityPresetStrings[$curShow.quality]</span></td> + #else: + <td align="center"><span class="quality Custom">Custom</span></td> + #end if + <td align="center"><img src="$sbRoot/images/#if int($curShow.is_sports) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> + <td align="center"><img src="$sbRoot/images/#if int($curShow.is_scene) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> + <td align="center"><img src="$sbRoot/images/#if int($curShow.is_anime) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> + <td align="center"><img src="$sbRoot/images/#if int($curShow.flatten_folders) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> + <td align="center"><img src="$sbRoot/images/#if int($curShow.paused) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> + <td align="center"><img src="$sbRoot/images/#if int($curShow.subtitles) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> + <td align="center">$statusStrings[$curShow.default_ep_status]</td> + <td align="center">$curShow.status</td> + <td align="center">$curUpdate</td> + <td align="center">$curRefresh</td> + <td align="center">$curRename</td> + #if $sickbeard.USE_SUBTITLES: + <td align="center">$curSubtitle</td> + #end if + <td align="center">$curDelete</td> + <td align="center">$curRemove</td> + </tr> + + #end for + + </tbody> + </table> </form> diff --git a/gui/slick/interfaces/default/manage_backlogOverview.tmpl b/gui/slick/interfaces/default/manage_backlogOverview.tmpl index e83b418017e51ef3eb5ab2ba98e715f2f780309c..7d8f76f09d7ed379d56a86a199dda8f533ff794a 100644 --- a/gui/slick/interfaces/default/manage_backlogOverview.tmpl +++ b/gui/slick/interfaces/default/manage_backlogOverview.tmpl @@ -40,9 +40,9 @@ <div id="content960"> #if $varExists('header') - <h1 class="header">$header</h1> + <h1 class="header">$header</h1> #else - <h1 class="title">$title</h1> + <h1 class="title">$title</h1> #end if #set $totalWanted = 0 #set $totalQual = 0 @@ -59,12 +59,12 @@ <div class="float-left"> Jump to Show - <select id="pickShow" class="form-control form-control-inline input-sm"> - #for $curShow in sorted($sickbeard.showList, key = operator.attrgetter('name')): - #if $showCounts[$curShow.indexerid][$Overview.QUAL] + $showCounts[$curShow.indexerid][$Overview.WANTED] != 0: - <option value="$curShow.indexerid">$curShow.name</option> - #end if - #end for + <select id="pickShow" class="form-control form-control-inline input-sm"> + #for $curShow in sorted($sickbeard.showList, key = operator.attrgetter('name')): + #if $showCounts[$curShow.indexerid][$Overview.QUAL] + $showCounts[$curShow.indexerid][$Overview.WANTED] != 0: + <option value="$curShow.indexerid">$curShow.name</option> + #end if + #end for </select> </div> @@ -76,18 +76,18 @@ Jump to Show #continue #end if - <tr class="seasonheader" id="show-$curShow.indexerid"> - <td colspan="3" class="align-left"> - <br/><h2><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></h2> - <div class="pull-right"> - <span class="listing-key wanted">Wanted: <b>$showCounts[$curShow.indexerid][$Overview.WANTED]</b></span> - <span class="listing-key qual">Low Quality: <b>$showCounts[$curShow.indexerid][$Overview.QUAL]</b></span> - <a class="btn btn-inline forceBacklog" href="$sbRoot/manage/backlogShow?indexer_id=$curShow.indexerid"><i class="icon-play-circle icon-white"></i> Force Backlog</a> - </div> - </td> - </tr> + <tr class="seasonheader" id="show-$curShow.indexerid"> + <td colspan="3" class="align-left"> + <br/><h2><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></h2> + <div class="pull-right"> + <span class="listing-key wanted">Wanted: <b>$showCounts[$curShow.indexerid][$Overview.WANTED]</b></span> + <span class="listing-key qual">Low Quality: <b>$showCounts[$curShow.indexerid][$Overview.QUAL]</b></span> + <a class="btn btn-inline forceBacklog" href="$sbRoot/manage/backlogShow?indexer_id=$curShow.indexerid"><i class="icon-play-circle icon-white"></i> Force Backlog</a> + </div> + </td> + </tr> - <tr class="seasoncols"><th>Episode</th><th>Name</th><th class="nowrap">Airdate</th></tr> + <tr class="seasoncols"><th>Episode</th><th>Name</th><th class="nowrap">Airdate</th></tr> #for $curResult in $showSQLResults[$curShow.indexerid]: #set $whichStr = $str($curResult['season']) + 'x' + $str($curResult['episode']) @@ -101,11 +101,11 @@ Jump to Show #continue #end if - <tr class="seasonstyle $Overview.overviewStrings[$showCats[$curShow.indexerid][$whichStr]]"> - <td class="tableleft" align="center">$whichStr</td> - <td>$curResult["name"]</td> - <td class="tableright" align="center" class="nowrap"><div class="${fuzzydate}">#if int($curResult['airdate']) == 1 then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($curResult['airdate'],$curShow.airs,$curShow.network)))#</div></td> - </tr> + <tr class="seasonstyle $Overview.overviewStrings[$showCats[$curShow.indexerid][$whichStr]]"> + <td class="tableleft" align="center">$whichStr</td> + <td>$curResult["name"]</td> + <td class="tableright" align="center" class="nowrap"><div class="${fuzzydate}">#if int($curResult['airdate']) == 1 then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($curResult['airdate'],$curShow.airs,$curShow.network)))#</div></td> + </tr> #end for #end for diff --git a/gui/slick/interfaces/default/manage_episodeStatuses.tmpl b/gui/slick/interfaces/default/manage_episodeStatuses.tmpl index 78a67891baeee3bebf6e17555f5248ddfbec30f8..90a4e2dc87ceed5e795989d4c34c7ff8f4307c3b 100644 --- a/gui/slick/interfaces/default/manage_episodeStatuses.tmpl +++ b/gui/slick/interfaces/default/manage_episodeStatuses.tmpl @@ -11,10 +11,10 @@ #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") <div id="content960"> -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if #if not $whichStatus or ($whichStatus and not $ep_counts): @@ -30,7 +30,7 @@ Manage episodes with status <select name="whichStatus" class="form-control form- <option value="$curStatus">$common.statusStrings[$curStatus]</option> #end for </select> -<input class="btn btn-inline" type="submit" value="Manage" /> +<input class="btn btn-inline" type="submit" value="Manage" /> </form> #else @@ -68,8 +68,8 @@ $statusList.append($common.FAILED) <input class="btn btn-inline" type="submit" value="Go" /> <div> - <button type="button" class="btn btn-xs selectAllShows">Select all</a></button> - <button type="button" class="btn btn-xs unselectAllShows">Clear all</a></button> + <button type="button" class="btn btn-xs selectAllShows">Select all</a></button> + <button type="button" class="btn btn-xs unselectAllShows">Clear all</a></button> </div> <br /> diff --git a/gui/slick/interfaces/default/manage_failedDownloads.tmpl b/gui/slick/interfaces/default/manage_failedDownloads.tmpl index 14e5c274b93064dc28893aef0c9413ae90898da7..d7070514babd941fe26a6c5be0903af93fb1b540 100644 --- a/gui/slick/interfaces/default/manage_failedDownloads.tmpl +++ b/gui/slick/interfaces/default/manage_failedDownloads.tmpl @@ -31,10 +31,10 @@ </script> <script type="text/javascript" src="$sbRoot/js/failedDownloads.js?$sbPID"></script> -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <div class="h2footer pull-right"><b>Limit:</b> @@ -69,18 +69,18 @@ <td class="nowrap">$hItem["release"]</td> <td align="center"> #if $hItem["size"] != -1 - $hItem["size"] + $hItem["size"] #else - ? - #end if + ? + #end if </td> - <td align="center"> - #set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($hItem["provider"])) - #if $provider != None: - <img src="$sbRoot/images/providers/<%=provider.imageName()%>" width="16" height="16" alt="$provider.name" title="$provider.name"/> - #else: - <img src="$sbRoot/images/providers/missing.png" width="16" height="16" alt="missing provider" title="missing provider"/> - #end if + <td align="center"> + #set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($hItem["provider"])) + #if $provider != None: + <img src="$sbRoot/images/providers/<%=provider.imageName()%>" width="16" height="16" alt="$provider.name" title="$provider.name"/> + #else: + <img src="$sbRoot/images/providers/missing.png" width="16" height="16" alt="missing provider" title="missing provider"/> + #end if </td> <td align="center">$curRemove</td> </tr> diff --git a/gui/slick/interfaces/default/manage_manageSearches.tmpl b/gui/slick/interfaces/default/manage_manageSearches.tmpl index 033be41d9500387417d723fd9bb2688455f84955..03f421370f626f4833f9666fb13531fcd8678cf4 100644 --- a/gui/slick/interfaces/default/manage_manageSearches.tmpl +++ b/gui/slick/interfaces/default/manage_manageSearches.tmpl @@ -11,16 +11,16 @@ <script type="text/javascript" src="$sbRoot/js/plotTooltip.js?$sbPID"></script> <div id="content800"> - #if $varExists('header') - <h1 class="header">$header</h1> - #else - <h1 class="title">$title</h1> + #if $varExists('header') + <h1 class="header">$header</h1> + #else + <h1 class="title">$title</h1> #end if <div id="summary2" class="align-left"> <h3>Backlog Search:</h3> <a class="btn" href="$sbRoot/manage/manageSearches/forceBacklog"><i class="icon-exclamation-sign"></i> Force</a> -<a class="btn" href="$sbRoot/manage/manageSearches/pauseBacklog?paused=#if $backlogPaused then "0" else "1"#"><i class="#if $backlogPaused then "icon-play" else "icon-pause"#"></i> #if $backlogPaused then "Unpause" else "Pause"#</a> +<a class="btn" href="$sbRoot/manage/manageSearches/pauseBacklog?paused=#if $backlogPaused then "0" else "1"#"><i class="#if $backlogPaused then "icon-play" else "icon-pause"#"></i> #if $backlogPaused then "Unpause" else "Pause"#</a> #if not $backlogRunning: Not in progress<br /> #else: diff --git a/gui/slick/interfaces/default/manage_massEdit.tmpl b/gui/slick/interfaces/default/manage_massEdit.tmpl index bd899f3c29a8ee40c6875af844423a669210fbc6..69579b743a8631c623b09ef662931eec67d84358 100644 --- a/gui/slick/interfaces/default/manage_massEdit.tmpl +++ b/gui/slick/interfaces/default/manage_massEdit.tmpl @@ -28,7 +28,7 @@ #set $cur_index = $root_dir_list.index($cur_dir) <div> <input class="btn edit_root_dir" type="button" class="edit_root_dir" id="edit_root_dir_$cur_index" value="Edit" /> - <input class="btn delete_root_dir" type="button" class="delete_root_dir" id="delete_root_dir_$cur_index" value="Delete" /> + <input class="btn delete_root_dir" type="button" class="delete_root_dir" id="delete_root_dir_$cur_index" value="Delete" /> $cur_dir => <span id="display_new_root_dir_$cur_index">$cur_dir</span> </div> <input type="hidden" name="orig_root_dir_$cur_index" value="$cur_dir" /> diff --git a/gui/slick/interfaces/default/manage_subtitleMissed.tmpl b/gui/slick/interfaces/default/manage_subtitleMissed.tmpl index e3cf6050c6e01323d14b7e02cc08369488149cec..50fa41400fe3af5a8ea54ccaf0f0beed1caafed2 100644 --- a/gui/slick/interfaces/default/manage_subtitleMissed.tmpl +++ b/gui/slick/interfaces/default/manage_subtitleMissed.tmpl @@ -11,9 +11,9 @@ #import os.path #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") <div id="content960"> -#if $varExists('header') +#if $varExists('header') <h1 class="header">$header</h1> -#else +#else <h1 class="title">$title</h1> #end if #if $whichSubs: @@ -34,7 +34,7 @@ Manage episodes without <select name="whichSubs" class="form-control form-contro #end for </select> subtitles -<input class="btn" type="submit" value="Manage" /> +<input class="btn" type="submit" value="Manage" /> </form> #else @@ -47,8 +47,8 @@ subtitles <br /> Download missed subtitles for selected episodes <input class="btn btn-inline" type="submit" value="Go" /> <div> - <button type="button" class="btn btn-xs selectAllShows">Select all</a></button> - <button type="button" class="btn btn-xs unselectAllShows">Clear all</a></button> + <button type="button" class="btn btn-xs selectAllShows">Select all</a></button> + <button type="button" class="btn btn-xs unselectAllShows">Clear all</a></button> </div> <br /> <table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0"> diff --git a/gui/slick/interfaces/default/manage_torrents.tmpl b/gui/slick/interfaces/default/manage_torrents.tmpl index 6053563a47e3062f5ebce94f6b1a4beb97d9beae..50f2d08143c490c6feb5f0e3dc294983727c669b 100644 --- a/gui/slick/interfaces/default/manage_torrents.tmpl +++ b/gui/slick/interfaces/default/manage_torrents.tmpl @@ -10,10 +10,10 @@ #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") <script type="text/javascript" src="$sbRoot/js/plotTooltip.js?$sbPID"></script> - #if $varExists('header') - <h1 class="header">$header</h1> - #else - <h1 class="title">$title</h1> + #if $varExists('header') + <h1 class="header">$header</h1> + #else + <h1 class="title">$title</h1> #end if $info_download_station diff --git a/gui/slick/interfaces/default/status.tmpl b/gui/slick/interfaces/default/status.tmpl index f36bb178632539f571974021867c85d7cae596c1..c02a0482662ca8041547c6f302747d82502e0c00 100644 --- a/gui/slick/interfaces/default/status.tmpl +++ b/gui/slick/interfaces/default/status.tmpl @@ -9,10 +9,10 @@ #set global $topmenu="config"# #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if #set schedulerList = {'Daily Search': 'dailySearchScheduler', @@ -29,172 +29,172 @@ } <script type="text/javascript"> - \$(document).ready(function() { - \$("#schedulerStatusTable").tablesorter({ - widgets: ['saveSort', 'zebra'] - }); - }); - \$(document).ready(function() { - \$("#queueStatusTable").tablesorter({ - widgets: ['saveSort', 'zebra'], - sortList: [[3,0], [4,0], [2,1]] - }); - }); + \$(document).ready(function() { + \$("#schedulerStatusTable").tablesorter({ + widgets: ['saveSort', 'zebra'] + }); + }); + \$(document).ready(function() { + \$("#queueStatusTable").tablesorter({ + widgets: ['saveSort', 'zebra'], + sortList: [[3,0], [4,0], [2,1]] + }); + }); </script> <div id="config-content"> - <h2 class="header">Scheduler</h2> - <table id="schedulerStatusTable" class="tablesorter" width="100%"> - <thead> - <tr> - <th>Scheduler</th> - <th>Alive</th> - <th>Enable</th> - <th>Active</th> - <th>Start Time</th> - <th>Cycle Time</th> - <th>Next Run</th> - <th>Last Run</th> - <th>Silent</th> - </tr> - </thead> - <tbody> - #for $schedulerName, $scheduler in $schedulerList.iteritems() - #set service = getattr($sickbeard, $scheduler) - <tr> - <td>$schedulerName</td> - #if $service.isAlive() - <td style="background-color:green">$service.isAlive()</td> - #else - <td style="background-color:red">$service.isAlive()</td> - #end if - #if $scheduler == 'backlogSearchScheduler' - #set searchQueue = getattr($sickbeard, 'searchQueueScheduler') - #set $BLSpaused = $searchQueue.action.is_backlog_paused() - #del searchQueue - #if $BLSpaused - <td>Paused</td> - #else - <td>$service.enable</td> - #end if - #else - <td>$service.enable</td> - #end if - #if $scheduler == 'backlogSearchScheduler' - #set searchQueue = getattr($sickbeard, 'searchQueueScheduler') - #set $BLSinProgress = $searchQueue.action.is_backlog_in_progress() - #del searchQueue - #if $BLSinProgress - <td>True</td> - #else - #try - #set amActive = $service.action.amActive - <td>$amActive</td> - #except Exception - <td>N/A</td> - #end try - #end if - #else - #try - #set amActive = $service.action.amActive - <td>$amActive</td> - #except Exception - <td>N/A</td> - #end try - #end if - <td align="right">$service.start_time</td> - #set $cycleTime = ($service.cycleTime.microseconds + ($service.cycleTime.seconds + $service.cycleTime.days * 24 * 3600) * 10**6) / 10**6 - <td align="right">$helpers.pretty_time_delta($cycleTime)</td> - #if $service.enable - #set $timeLeft = ($service.timeLeft().microseconds + ($service.timeLeft().seconds + $service.timeLeft().days * 24 * 3600) * 10**6) / 10**6 - <td align="right">$helpers.pretty_time_delta($timeLeft)</td> - #else - <td></td> - #end if - <td>$service.lastRun.strftime("%Y-%m-%d %H:%M:%S")</td> - <td>$service.silent</td> - </tr> - #del service - #end for - </tbody> - </table> - <h2 class="header">Show Queue</h2> - <table id="queueStatusTable" class="tablesorter" width="100%"> - <thead> - <tr> - <th>Show id</th> - <th>Show name</th> - <th>In Progress</th> - <th>Priority</th> - <th>Added</th> - <th>Queue type</th> - </tr> - </thead> - <tbody> - #if $sickbeard.showQueueScheduler.action.currentItem is not None - <tr> - #try - #set showindexerid = $sickbeard.showQueueScheduler.action.currentItem.show.indexerid - <td>$showindexerid</td> - #except Exception - <td></td> - #end try - #try - #set showname = $sickbeard.showQueueScheduler.action.currentItem.show.name - <td>$showname</td> - #except Exception - #if $sickbeard.showQueueScheduler.action.currentItem.action_id == $ShowQueueActions.ADD - <td>$sickbeard.showQueueScheduler.action.currentItem.showDir</td> - #else - <td></td> - #end if - #end try - <td>$sickbeard.showQueueScheduler.action.currentItem.inProgress</td> - #if $sickbeard.showQueueScheduler.action.currentItem.priority == 10 - <td>LOW</td> - #elif $sickbeard.showQueueScheduler.action.currentItem.priority == 20 - <td>NORMAL</td> - #elif $sickbeard.showQueueScheduler.action.currentItem.priority == 30 - <td>HIGH</td> - #else - <td>$sickbeard.showQueueScheduler.action.currentItem.priority</td> - #end if - <td>$sickbeard.showQueueScheduler.action.currentItem.added.strftime("%Y-%m-%d %H:%M:%S")</td> - <td>$ShowQueueActions.names[$sickbeard.showQueueScheduler.action.currentItem.action_id]</td> - </tr> - #end if - #for item in $sickbeard.showQueueScheduler.action.queue - <tr> - #try - #set showindexerid = $item.show.indexerid - <td>$showindexerid</td> - #except Exception - <td></td> - #end try - #try - #set showname = $item.show.name - <td>$showname</td> - #except Exception - #if $item.action_id == $ShowQueueActions.ADD - <td>$item.showDir</td> - #else - <td></td> - #end if - #end try - <td>$item.inProgress</td> - #if $item.priority == 10 - <td>LOW</td> - #elif $item.priority == 20 - <td>NORMAL</td> - #elif $item.priority == 30 - <td>HIGH</td> - #else - <td>$item.priority</td> - #end if - <td>$item.added.strftime("%Y-%m-%d %H:%M:%S")</td> - <td>$ShowQueueActions.names[$item.action_id]</td> - </tr> - #end for - </tbody> - </table> + <h2 class="header">Scheduler</h2> + <table id="schedulerStatusTable" class="tablesorter" width="100%"> + <thead> + <tr> + <th>Scheduler</th> + <th>Alive</th> + <th>Enable</th> + <th>Active</th> + <th>Start Time</th> + <th>Cycle Time</th> + <th>Next Run</th> + <th>Last Run</th> + <th>Silent</th> + </tr> + </thead> + <tbody> + #for $schedulerName, $scheduler in $schedulerList.iteritems() + #set service = getattr($sickbeard, $scheduler) + <tr> + <td>$schedulerName</td> + #if $service.isAlive() + <td style="background-color:green">$service.isAlive()</td> + #else + <td style="background-color:red">$service.isAlive()</td> + #end if + #if $scheduler == 'backlogSearchScheduler' + #set searchQueue = getattr($sickbeard, 'searchQueueScheduler') + #set $BLSpaused = $searchQueue.action.is_backlog_paused() + #del searchQueue + #if $BLSpaused + <td>Paused</td> + #else + <td>$service.enable</td> + #end if + #else + <td>$service.enable</td> + #end if + #if $scheduler == 'backlogSearchScheduler' + #set searchQueue = getattr($sickbeard, 'searchQueueScheduler') + #set $BLSinProgress = $searchQueue.action.is_backlog_in_progress() + #del searchQueue + #if $BLSinProgress + <td>True</td> + #else + #try + #set amActive = $service.action.amActive + <td>$amActive</td> + #except Exception + <td>N/A</td> + #end try + #end if + #else + #try + #set amActive = $service.action.amActive + <td>$amActive</td> + #except Exception + <td>N/A</td> + #end try + #end if + <td align="right">$service.start_time</td> + #set $cycleTime = ($service.cycleTime.microseconds + ($service.cycleTime.seconds + $service.cycleTime.days * 24 * 3600) * 10**6) / 10**6 + <td align="right">$helpers.pretty_time_delta($cycleTime)</td> + #if $service.enable + #set $timeLeft = ($service.timeLeft().microseconds + ($service.timeLeft().seconds + $service.timeLeft().days * 24 * 3600) * 10**6) / 10**6 + <td align="right">$helpers.pretty_time_delta($timeLeft)</td> + #else + <td></td> + #end if + <td>$service.lastRun.strftime("%Y-%m-%d %H:%M:%S")</td> + <td>$service.silent</td> + </tr> + #del service + #end for + </tbody> + </table> + <h2 class="header">Show Queue</h2> + <table id="queueStatusTable" class="tablesorter" width="100%"> + <thead> + <tr> + <th>Show id</th> + <th>Show name</th> + <th>In Progress</th> + <th>Priority</th> + <th>Added</th> + <th>Queue type</th> + </tr> + </thead> + <tbody> + #if $sickbeard.showQueueScheduler.action.currentItem is not None + <tr> + #try + #set showindexerid = $sickbeard.showQueueScheduler.action.currentItem.show.indexerid + <td>$showindexerid</td> + #except Exception + <td></td> + #end try + #try + #set showname = $sickbeard.showQueueScheduler.action.currentItem.show.name + <td>$showname</td> + #except Exception + #if $sickbeard.showQueueScheduler.action.currentItem.action_id == $ShowQueueActions.ADD + <td>$sickbeard.showQueueScheduler.action.currentItem.showDir</td> + #else + <td></td> + #end if + #end try + <td>$sickbeard.showQueueScheduler.action.currentItem.inProgress</td> + #if $sickbeard.showQueueScheduler.action.currentItem.priority == 10 + <td>LOW</td> + #elif $sickbeard.showQueueScheduler.action.currentItem.priority == 20 + <td>NORMAL</td> + #elif $sickbeard.showQueueScheduler.action.currentItem.priority == 30 + <td>HIGH</td> + #else + <td>$sickbeard.showQueueScheduler.action.currentItem.priority</td> + #end if + <td>$sickbeard.showQueueScheduler.action.currentItem.added.strftime("%Y-%m-%d %H:%M:%S")</td> + <td>$ShowQueueActions.names[$sickbeard.showQueueScheduler.action.currentItem.action_id]</td> + </tr> + #end if + #for item in $sickbeard.showQueueScheduler.action.queue + <tr> + #try + #set showindexerid = $item.show.indexerid + <td>$showindexerid</td> + #except Exception + <td></td> + #end try + #try + #set showname = $item.show.name + <td>$showname</td> + #except Exception + #if $item.action_id == $ShowQueueActions.ADD + <td>$item.showDir</td> + #else + <td></td> + #end if + #end try + <td>$item.inProgress</td> + #if $item.priority == 10 + <td>LOW</td> + #elif $item.priority == 20 + <td>NORMAL</td> + #elif $item.priority == 30 + <td>HIGH</td> + #else + <td>$item.priority</td> + #end if + <td>$item.added.strftime("%Y-%m-%d %H:%M:%S")</td> + <td>$ShowQueueActions.names[$item.action_id]</td> + </tr> + #end for + </tbody> + </table> </div> \ No newline at end of file diff --git a/gui/slick/interfaces/default/testRename.tmpl b/gui/slick/interfaces/default/testRename.tmpl index 45c8d0d9de147f933beeddb24020026172caa88c..953f5efb0a8009826631240bda85a678954b473b 100644 --- a/gui/slick/interfaces/default/testRename.tmpl +++ b/gui/slick/interfaces/default/testRename.tmpl @@ -9,10 +9,10 @@ #import os.path #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <input type="hidden" id="showID" value="$show.indexerid" /> @@ -35,18 +35,18 @@ <table id="SelectAllTable" class="sickbeardTable" cellspacing="1" border="0" cellpadding="0"> - <thead> - <tr class="seasonheader" id="season-all"> + <thead> + <tr class="seasonheader" id="season-all"> <td colspan="4"> <h2>All Seasons</h2> </td> </tr> - <tr class="seasoncols" id="selectall"> - <th class="col-checkbox"><input type="checkbox" class="seriesCheck" id="SelectAll" /></th> - <th align="left" valign="top" class="nowrap">Select All</th> - <th width="100%" class="col-name" style="visibility:hidden;"></th> - </tr> - </thead> + <tr class="seasoncols" id="selectall"> + <th class="col-checkbox"><input type="checkbox" class="seriesCheck" id="SelectAll" /></th> + <th align="left" valign="top" class="nowrap">Select All</th> + <th width="100%" class="col-name" style="visibility:hidden;"></th> + </tr> + </thead> </table> <br/> @@ -63,7 +63,7 @@ <thead> <tr class="seasonheader" id="season-$cur_ep_obj.season"> <td colspan="4"> - <br/> + <br/> <h2>#if int($cur_ep_obj.season) == 0 then "Specials" else "Season "+str($cur_ep_obj.season)#</h2> </td> </tr> @@ -83,7 +83,7 @@ #if len($epList) > 1: #set $epList = [$min($epList), $max($epList)] #end if - <tr class="season-$curSeason + <tr class="season-$curSeason #if $curLoc == $newLoc: good #else @@ -91,9 +91,9 @@ #end if seasonstyle"> <td class="col-checkbox"> - #if $curLoc != $newLoc: + #if $curLoc != $newLoc: <input type="checkbox" class="epCheck" id="<%=str(cur_ep_obj.season) + 'x' + str(cur_ep_obj.episode)%>" name="<%=str(cur_ep_obj.season) + "x" + str(cur_ep_obj.episode) %>" /> - #end if + #end if </td> <td align="center" valign="top" class="nowrap"><%= "-".join(map(str, epList)) %></td> <td width="50%" class="col-name">$curLoc</td> diff --git a/gui/slick/interfaces/default/trendingShows.tmpl b/gui/slick/interfaces/default/trendingShows.tmpl index 1eb9ae88cfcba5310bf5c16ce6dedbbfe5f5d754..3d046b990767d2bd33b56822e60a4e93eb0ed3eb 100644 --- a/gui/slick/interfaces/default/trendingShows.tmpl +++ b/gui/slick/interfaces/default/trendingShows.tmpl @@ -70,9 +70,9 @@ <div id="container"> #if not $trending_shows - <div class="trakt_show" style="width:100%; margin-top:20px"> - <p class="red-text">Trakt API did not return any results, please check your config. - </div> + <div class="trakt_show" style="width:100%; margin-top:20px"> + <p class="red-text">Trakt API did not return any results, please check your config. + </div> #else #for $cur_show in $trending_shows: #set $show_url = 'http://www.trakt.tv/shows/%s' % $cur_show['show']['ids']['slug'] diff --git a/gui/slick/interfaces/default/viewlogs.tmpl b/gui/slick/interfaces/default/viewlogs.tmpl index 8807e2847e5b0e22827f93934fcd95f711487780..e84edbfac5fb1caedd069bd19fa65d49e0cae879 100644 --- a/gui/slick/interfaces/default/viewlogs.tmpl +++ b/gui/slick/interfaces/default/viewlogs.tmpl @@ -19,8 +19,8 @@ function(){ \$('#minLevel,#logFilter,#logSearch').change(function(){ if ( \$('#logSearch').val().length > 0 ) { \$('#logSearch').prop('disabled', true); - \$('#logFilter option[value=\\<NONE\\>]').prop('selected', true); - \$('#minLevel option[value=5]').prop('selected', true); + \$('#logFilter option[value=\\<NONE\\>]').prop('selected', true); + \$('#minLevel option[value=5]').prop('selected', true); } \$('#minLevel').prop('disabled', true); \$('#logFilter').prop('disabled', true); @@ -37,19 +37,19 @@ function(){ \$('#minLevel').prop('disabled', false); \$('#logFilter').prop('disabled', false); \$('#logSearch').prop('disabled', false); - } else { + } else { \$('#minLevel').prop('disabled', true); \$('#logFilter').prop('disabled', true); \$('#logSearch').prop('disabled', false); - } + } document.body.style.cursor='default'; }); \$('#logSearch').keyup(function() { if ( \$('#logSearch').val().length == 0 ) { - \$('#logFilter option[value=\\<NONE\\>]').prop('selected', true); - \$('#minLevel option[value=20]').prop('selected', true); + \$('#logFilter option[value=\\<NONE\\>]').prop('selected', true); + \$('#minLevel option[value=20]').prop('selected', true); \$('#minLevel').prop('disabled', false); \$('#logFilter').prop('disabled', false); url = '$sbRoot/errorlogs/viewlog/?minLevel='+\$('select[name=minLevel]').val()+'&logFilter='+\$('select[name=logFilter]').val()+'&logSearch='+\$('#logSearch').val() @@ -63,19 +63,19 @@ function(){ //--> </script> -#if $varExists('header') - <h1 class="header">$header</h1> -#else - <h1 class="title">$title</h1> +#if $varExists('header') + <h1 class="header">$header</h1> +#else + <h1 class="title">$title</h1> #end if <div class="h2footer pull-right">Minimum logging level to display: <select name="minLevel" id="minLevel" class="form-control form-control-inline input-sm"> #set $levels = $reverseNames.keys() $levels.sort(lambda x,y: cmp($reverseNames[$x], $reverseNames[$y])) #for $level in $levels: - #if not $sickbeard.DEBUG and ($level == 'DEBUG' or $level == 'DB') - #continue - #end if + #if not $sickbeard.DEBUG and ($level == 'DEBUG' or $level == 'DB') + #continue + #end if <option value="$reverseNames[$level]" #if $minLevel == $reverseNames[$level] then "selected=\"selected\"" else ""#>$level.title()</option> #end for </select> diff --git a/gui/slick/js/confirmations.js b/gui/slick/js/confirmations.js index 3b6e77471b046f5011743e8e5311355a63966ed7..6e2625edec9f5fa3bcc07ecbbc4fe0d9f29b75a1 100644 --- a/gui/slick/js/confirmations.js +++ b/gui/slick/js/confirmations.js @@ -111,7 +111,7 @@ $(document).ready(function () { var target = $( this ).attr('href'); $.confirm({ 'title' : 'Submit Errors', - 'message' : 'Are you sure you want to submit these errors ?<br /><br /><span class="red-text">You should trigger this error with debug enabled before submitting</span>', + 'message' : 'Are you sure you want to submit these errors ?<br /><br /><span class="red-text">Make sure SickRage is updated and trigger<br /> this error with debug enabled before submitting</span>', 'buttons' : { 'Yes' : { 'class' : 'green', diff --git a/lib/guessit/__init__.py b/lib/guessit/__init__.py index c8b6e9065c014e93ec668e3ee4dbe0772588014d..c89c19c07f95b4a992d16917cb3e99933eea934f 100644 --- a/lib/guessit/__init__.py +++ b/lib/guessit/__init__.py @@ -89,10 +89,10 @@ from guessit.guess import Guess, smart_merge from guessit.language import Language from guessit.matcher import IterativeMatcher from guessit.textutils import clean_default, is_camel, from_camel +from copy import deepcopy import babelfish import os.path import logging -from copy import deepcopy log = logging.getLogger(__name__) @@ -117,7 +117,7 @@ def _build_filename_mtree(filename, options=None, **kwargs): mtree = IterativeMatcher(filename, options=options, **kwargs) second_pass_options = mtree.second_pass_options if second_pass_options: - log.debug("Running 2nd pass") + log.debug('Running 2nd pass with options: %s' % second_pass_options) merged_options = dict(options) merged_options.update(second_pass_options) mtree = IterativeMatcher(filename, options=merged_options, **kwargs) diff --git a/lib/guessit/language.py b/lib/guessit/language.py index d67ff66468729d79f3dbdb9e27709c6258611b24..9654b624acb1fbe83fe549833a5de46f054b3802 100644 --- a/lib/guessit/language.py +++ b/lib/guessit/language.py @@ -173,8 +173,9 @@ LNG_COMMON_WORDS = frozenset([ 'is', 'it', 'am', 'mad', 'men', 'man', 'run', 'sin', 'st', 'to', 'no', 'non', 'war', 'min', 'new', 'car', 'day', 'bad', 'bat', 'fan', 'fry', 'cop', 'zen', 'gay', 'fat', 'one', 'cherokee', 'got', 'an', 'as', - 'cat', 'her', 'be', 'hat', 'sun', 'may', 'my', 'mr', 'rum', 'pi', 'bb', 'bt', - 'tv', 'aw', 'by', 'md', 'mp', 'cd', 'lt', 'gt', 'in', 'ad', 'ice', 'ay', 'at', + 'cat', 'her', 'be', 'hat', 'sun', 'may', 'my', 'mr', 'rum', 'pi', 'bb', + 'bt', 'tv', 'aw', 'by', 'md', 'mp', 'cd', 'lt', 'gt', 'in', 'ad', 'ice', + 'ay', 'at', 'star', # french words 'bas', 'de', 'le', 'son', 'ne', 'ca', 'ce', 'et', 'que', 'mal', 'est', 'vol', 'or', 'mon', 'se', 'je', 'tu', 'me', @@ -185,7 +186,7 @@ LNG_COMMON_WORDS = frozenset([ 'la', 'el', 'del', 'por', 'mar', 'al', # other 'ind', 'arw', 'ts', 'ii', 'bin', 'chan', 'ss', 'san', 'oss', 'iii', - 'vi', 'ben', 'da', 'lt', 'ch', + 'vi', 'ben', 'da', 'lt', 'ch', 'sr', # new from babelfish 'mkv', 'avi', 'dmd', 'the', 'dis', 'cut', 'stv', 'des', 'dia', 'and', 'cab', 'sub', 'mia', 'rim', 'las', 'une', 'par', 'srt', 'ano', 'toy', @@ -197,7 +198,7 @@ LNG_COMMON_WORDS = frozenset([ 'bs', # Bosnian 'kz', # countries - 'gt', 'lt', + 'gt', 'lt', 'im', # part/pt 'pt' ]) @@ -239,7 +240,7 @@ def find_possible_languages(string, allowed_languages=None): for prefix in lang_prefixes: if lang_word.startswith(prefix): lang_word = lang_word[len(prefix):] - if lang_word not in common_words: + if lang_word not in common_words and word.lower() not in common_words: try: lang = Language.fromguessit(lang_word) if allowed_languages: diff --git a/lib/guessit/matcher.py b/lib/guessit/matcher.py index fc914fce18ff2a8d18e9ee6b04d72702d3ee99ce..ba233d6c3209cc72c7f7041f582a6c7d0477f222 100644 --- a/lib/guessit/matcher.py +++ b/lib/guessit/matcher.py @@ -215,21 +215,12 @@ def log_found_guess(guess, logger=None): (k, v, guess.raw(k), guess.confidence(k))) -def _get_split_spans(node, span): - partition_spans = node.get_partition_spans(span) - for to_remove_span in partition_spans: - if to_remove_span[0] == span[0] and to_remove_span[1] in [span[1], span[1] + 1]: - partition_spans.remove(to_remove_span) - break - return partition_spans - - class GuessFinder(object): def __init__(self, guess_func, confidence=None, logger=None, options=None): self.guess_func = guess_func self.confidence = confidence self.logger = logger or log - self.options = options + self.options = options or {} def process_nodes(self, nodes): for node in nodes: @@ -242,67 +233,71 @@ class GuessFinder(object): value = node.value string = ' %s ' % value # add sentinels - if not self.options: - matcher_result = self.guess_func(string, node) + matcher_result = self.guess_func(string, node, self.options) + if not matcher_result: + return + + if not isinstance(matcher_result, Guess): + result, span = matcher_result else: - matcher_result = self.guess_func(string, node, self.options) + result, span = matcher_result, matcher_result.metadata().span + #log.error('span2 %s' % (span,)) - if matcher_result: - if not isinstance(matcher_result, Guess): - result, span = matcher_result - else: - result, span = matcher_result, matcher_result.metadata().span - - if result: - # readjust span to compensate for sentinels - span = (span[0] - 1, span[1] - 1) - - # readjust span to compensate for partial_span - if partial_span: - span = (span[0] + partial_span[0], span[1] + partial_span[0]) - - partition_spans = None - if self.options and 'skip_nodes' in self.options: - skip_nodes = self.options.get('skip_nodes') - for skip_node in skip_nodes: - if skip_node.parent.node_idx == node.node_idx[:len(skip_node.parent.node_idx)] and\ - skip_node.span == span or\ - skip_node.span == (span[0] + skip_node.offset, span[1] + skip_node.offset): - if partition_spans is None: - partition_spans = _get_split_spans(node, skip_node.span) - else: - new_partition_spans = [] - for partition_span in partition_spans: - tmp_node = MatchTree(value, span=partition_span, parent=node) - tmp_partitions_spans = _get_split_spans(tmp_node, skip_node.span) - new_partition_spans.extend(tmp_partitions_spans) - partition_spans.extend(new_partition_spans) - - if not partition_spans: - # restore sentinels compensation - - if isinstance(result, Guess): - guess = result - else: - guess = Guess(result, confidence=self.confidence, input=string, span=span) - - if not iterative: - found_guess(node, guess, logger=self.logger) - else: - absolute_span = (span[0] + node.offset, span[1] + node.offset) - node.partition(span) - if node.is_leaf(): - found_guess(node, guess, logger=self.logger) - else: - found_child = None - for child in node.children: - if child.span == absolute_span: - found_guess(child, guess, logger=self.logger) - found_child = child - break - for child in node.children: - if child is not found_child: - self.process_node(child) - else: + if not result: + return + + if span[1] == len(string): + # somehow, the sentinel got included in the span. Remove it + span = (span[0], span[1] - 1) + + # readjust span to compensate for sentinels + span = (span[0] - 1, span[1] - 1) + + # readjust span to compensate for partial_span + if partial_span: + span = (span[0] + partial_span[0], span[1] + partial_span[0]) + + skip_nodes = self.options.get('skip_nodes') + if skip_nodes: + # if we guessed a node that we need to skip, recurse down the tree and ignore that node + for skip_node in skip_nodes: + skip_node_relative_span = (skip_node.span[0] - node.offset, skip_node.span[1] - node.offset) + if skip_node_relative_span == span: + partition_spans = [s for s in node.get_partition_spans(span) if s != skip_node.span] for partition_span in partition_spans: - self.process_node(node, partial_span=partition_span) + relative_span = (partition_span[0] - node.offset, partition_span[1] - node.offset) + self.process_node(node, partial_span=relative_span) + return + + + # restore sentinels compensation + if isinstance(result, Guess): + guess = result + else: + guess = Guess(result, confidence=self.confidence, input=string, span=span) + + if not iterative: + found_guess(node, guess, logger=self.logger) + else: + absolute_span = (span[0] + node.offset, span[1] + node.offset) + node.partition(span) + + if node.is_leaf(): + # FIXME: this seems like it is dead code... + found_guess(node, guess, logger=self.logger) + + else: + found_child = None + + for child in node.children: + if child.span == absolute_span: + # if we have a match on one of our children, mark it as such... + found_guess(child, guess, logger=self.logger) + found_child = child + break + + # ...and only then recurse on the other children + for child in node.children: + if child is not found_child: + self.process_node(child) + diff --git a/lib/guessit/matchtree.py b/lib/guessit/matchtree.py index c4b3a3d6f822412f5313326f5edb1ac5a4d63c37..4b6d85e5c3d7f12579c9dbe6e50d2449263985f3 100644 --- a/lib/guessit/matchtree.py +++ b/lib/guessit/matchtree.py @@ -147,6 +147,10 @@ class BaseMatchTree(UnicodeMixin): string defined by splitting this node at the given indices (relative to this node)""" indices = sorted(indices) + if indices[-1] > len(self.value): + log.error('Filename: {}'.format(self.string)) + log.error('Invalid call to get_partitions_spans, indices are too high: {}, len({}) == {:d}' + .format(indices, self.value, len(self.value))) if indices[0] != 0: indices.insert(0, 0) if indices[-1] != len(self.value): @@ -155,7 +159,8 @@ class BaseMatchTree(UnicodeMixin): spans = [] for start, end in zip(indices[:-1], indices[1:]): spans.append((self.offset + start, - self.offset + end)) + self.offset + end)) + return spans def partition(self, indices): diff --git a/lib/guessit/patterns/extension.py b/lib/guessit/patterns/extension.py index 40a576b677d4cd7a811e9e5f0da67b68731794f2..c78f1f8bfbab603eb2e5711294eab06493adf49e 100644 --- a/lib/guessit/patterns/extension.py +++ b/lib/guessit/patterns/extension.py @@ -29,4 +29,4 @@ info_exts = ['nfo'] video_exts = ['3g2', '3gp', '3gp2', 'asf', 'avi', 'divx', 'flv', 'm4v', 'mk2', 'mka', 'mkv', 'mov', 'mp4', 'mp4a', 'mpeg', 'mpg', 'ogg', 'ogm', 'ogv', 'qt', 'ra', 'ram', 'rm', 'ts', 'wav', 'webm', 'wma', 'wmv', - 'iso'] + 'iso', 'vob'] diff --git a/lib/guessit/slogging.py b/lib/guessit/slogging.py index 00fb80f7a5fa868aede139f04424c5e901e333d7..da0b2f8abeab1ca2d179af6c854aea6bd40da87b 100644 --- a/lib/guessit/slogging.py +++ b/lib/guessit/slogging.py @@ -19,11 +19,14 @@ # from __future__ import absolute_import, division, print_function, unicode_literals +from functools import wraps import logging import sys import os +log = logging.getLogger(__name__) + GREEN_FONT = "\x1B[0;32m" YELLOW_FONT = "\x1B[0;33m" BLUE_FONT = "\x1B[0;34m" @@ -87,3 +90,27 @@ def setup_logging(colored=True, with_time=False, with_thread=False, filename=Non ch.setFormatter(SimpleFormatter(with_time, with_thread)) logging.getLogger().addHandler(ch) + + +def trace_func_call(f): + @wraps(f) + def wrapper(*args, **kwargs): + is_method = (f.__name__ != f.__qualname__) # method is still not bound, we need to get around it + if is_method: + no_self_args = args[1:] + else: + no_self_args = args + + args_str = ', '.join(repr(arg) for arg in no_self_args) + kwargs_str = ', '.join('{}={}'.format(k, v) for k, v in kwargs.items()) + if not args_str: + args_str = kwargs_str + elif not kwargs_str: + args_str = args_str + else: + args_str = '{}, {}'.format(args_str, kwargs_str) + + log.debug('Calling {}({})'.format(f.__name__, args_str)) + return f(*args, **kwargs) + + return wrapper diff --git a/lib/guessit/test/__main__.py b/lib/guessit/test/__main__.py deleted file mode 100644 index 32b8dd1001bbbf692d94434545b1fe6825e4a549..0000000000000000000000000000000000000000 --- a/lib/guessit/test/__main__.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# GuessIt - A library for guessing information from filenames -# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> -# -# GuessIt is free software; you can redistribute it and/or modify it under -# the terms of the Lesser GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# GuessIt is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# Lesser GNU General Public License for more details. -# -# You should have received a copy of the Lesser GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# - -from __future__ import absolute_import, division, print_function, unicode_literals -from guessit.test import (test_api, test_autodetect, test_autodetect_all, test_doctests, - test_episode, test_hashes, test_language, test_main, - test_matchtree, test_movie, test_quality, test_utils) -from unittest import TextTestRunner - - -import logging - -def main(): - for suite in [test_api.suite, test_autodetect.suite, - test_autodetect_all.suite, test_doctests.suite, - test_episode.suite, test_hashes.suite, test_language.suite, - test_main.suite, test_matchtree.suite, test_movie.suite, - test_quality.suite, test_utils.suite]: - TextTestRunner(verbosity=2).run(suite) - - -if __name__ == '__main__': - main() diff --git a/lib/guessit/test/autodetect.yaml b/lib/guessit/test/autodetect.yaml index ea17db0caf87f60a1af4b4a65762b549e9dae57e..7689e91acfa2f6c61dea1dda70f4918c262f833a 100644 --- a/lib/guessit/test/autodetect.yaml +++ b/lib/guessit/test/autodetect.yaml @@ -525,3 +525,29 @@ screenSize: 720p season: 5 series: Game of Thrones + +? Parks and Recreation - [04x12] - Ad Campaign.avi +: type: episode + series: Parks and Recreation + season: 4 + episodeNumber: 12 + title: Ad Campaign + +? Star Trek Into Darkness (2013)/star.trek.into.darkness.2013.720p.web-dl.h264-publichd.mkv +: type: movie + title: Star Trek Into Darkness + year: 2013 + screenSize: 720p + format: WEB-DL + videoCodec: h264 + releaseGroup: PublicHD + +? /var/medias/series/The Originals/Season 02/The.Originals.S02E15.720p.HDTV.X264-DIMENSION.mkv +: type: episode + series: The Originals + season: 2 + episodeNumber: 15 + screenSize: 720p + format: HDTV + videoCodec: h264 + releaseGroup: DIMENSION diff --git a/lib/guessit/test/episodes.yaml b/lib/guessit/test/episodes.yaml index 7fb092e4b7f36553898d46b596d4f221218c9510..2542a7dbefdad51d68343479abf46ca85f3bd33f 100644 --- a/lib/guessit/test/episodes.yaml +++ b/lib/guessit/test/episodes.yaml @@ -282,12 +282,6 @@ episodeNumber: 1 title: The Impossible Astronaut -? Parks and Recreation - [04x12] - Ad Campaign.avi -: series: Parks and Recreation - season: 4 - episodeNumber: 12 - title: Ad Campaign - ? The Sopranos - [05x07] - In Camelot.mp4 : series: The Sopranos season: 5 @@ -1186,3 +1180,10 @@ videoCodec: h264 releaseGroup: BS format: WEB-DL + +? How to Make It in America - S02E06 - I'm Sorry, Who's Yosi?.mkv +: series: How to Make It in America + season: 2 + episodeNumber: 6 + title: I'm Sorry, Who's Yosi? + diff --git a/lib/guessit/test/test_doctests.py b/lib/guessit/test/test_doctests.py deleted file mode 100644 index 9fedeb0f3f9809cfbfe4eb2eb610c11639e87c3d..0000000000000000000000000000000000000000 --- a/lib/guessit/test/test_doctests.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# GuessIt - A library for guessing information from filenames -# Copyright (c) 2014 Nicolas Wack <wackou@gmail.com> -# -# GuessIt is free software; you can redistribute it and/or modify it under -# the terms of the Lesser GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# GuessIt is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# Lesser GNU General Public License for more details. -# -# You should have received a copy of the Lesser GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# - -from __future__ import absolute_import, division, print_function, unicode_literals - -from guessit.test.guessittest import * -import guessit -import guessit.hash_ed2k -import unittest -import doctest - - -def load_tests(loader, tests, ignore): - tests.addTests(doctest.DocTestSuite(guessit)) - tests.addTests(doctest.DocTestSuite(guessit.date)) - tests.addTests(doctest.DocTestSuite(guessit.fileutils)) - tests.addTests(doctest.DocTestSuite(guessit.guess)) - tests.addTests(doctest.DocTestSuite(guessit.hash_ed2k)) - tests.addTests(doctest.DocTestSuite(guessit.language)) - tests.addTests(doctest.DocTestSuite(guessit.matchtree)) - tests.addTests(doctest.DocTestSuite(guessit.textutils)) - return tests - -suite = unittest.TestSuite() -load_tests(None, suite, None) - -if __name__ == '__main__': - TextTestRunner(verbosity=2).run(suite) diff --git a/lib/guessit/test/test_matchtree.py b/lib/guessit/test/test_matchtree.py index 7dcded18db1e59063313e58c5f58d9bb1224994d..1b8742d910f29ff6969f9d8efdc8ed1159ff3660 100644 --- a/lib/guessit/test/test_matchtree.py +++ b/lib/guessit/test/test_matchtree.py @@ -31,10 +31,12 @@ keywords = yaml.load(""" ? Xvid PROPER : videoCodec: Xvid other: PROPER + properCount: 1 ? PROPER-Xvid : videoCodec: Xvid other: PROPER + properCount: 1 """) diff --git a/lib/guessit/textutils.py b/lib/guessit/textutils.py index 822139cfaf1ff0df3f603a51f25139bda7218d0e..453c586f230f7a06ead3316b5652ac51efc3501f 100644 --- a/lib/guessit/textutils.py +++ b/lib/guessit/textutils.py @@ -247,8 +247,8 @@ def find_first_level_groups(string, enclosing, blank_sep=None): return split_on_groups(string, groups) -_camel_word2_set = set(('is', 'to')) -_camel_word3_set = set(('the')) +_camel_word2_set = {'is', 'to'} +_camel_word3_set = {'the'} def _camel_split_and_lower(string, i): diff --git a/lib/guessit/transfo/guess_language.py b/lib/guessit/transfo/guess_language.py index 42ce72bec4049dfa34f228910e10e7a3bce9fb1c..666b41b00c89b00fae7cf5985d91e6ec65cfb842 100644 --- a/lib/guessit/transfo/guess_language.py +++ b/lib/guessit/transfo/guess_language.py @@ -68,8 +68,10 @@ class GuessLanguage(Transformer): title_ends = {} for unidentified_node in mtree.unidentified_leaves(): - unidentified_starts[unidentified_node.span[0]] = unidentified_node - unidentified_ends[unidentified_node.span[1]] = unidentified_node + if len(unidentified_node.clean_value) > 1: + # only consider unidentified leaves that have some meaningful content + unidentified_starts[unidentified_node.span[0]] = unidentified_node + unidentified_ends[unidentified_node.span[1]] = unidentified_node for property_node in mtree.leaves_containing('year'): property_starts[property_node.span[0]] = property_node @@ -79,19 +81,20 @@ class GuessLanguage(Transformer): title_starts[title_node.span[0]] = title_node title_ends[title_node.span[1]] = title_node - return node.span[0] in title_ends.keys() and (node.span[1] in unidentified_starts.keys() or node.span[1] + 1 in property_starts.keys()) or\ - node.span[1] in title_starts.keys() and (node.span[0] == node.group_node().span[0] or node.span[0] in unidentified_ends.keys() or node.span[0] in property_ends.keys()) + return (node.span[0] in title_ends.keys() and (node.span[1] in unidentified_starts.keys() or + node.span[1] + 1 in property_starts.keys()) or + node.span[1] in title_starts.keys() and (node.span[0] == node.group_node().span[0] or + node.span[0] in unidentified_ends.keys() or + node.span[0] in property_ends.keys())) def second_pass_options(self, mtree, options=None): m = mtree.matched() - to_skip_language_nodes = [] + to_skip_langs = set() for lang_key in ('language', 'subtitleLanguage'): - langs = {} lang_nodes = set(mtree.leaves_containing(lang_key)) for lang_node in lang_nodes: - lang = lang_node.guess.get(lang_key, None) if self._skip_language_on_second_pass(mtree, lang_node): # Language probably split the title. Add to skip for 2nd pass. @@ -99,38 +102,19 @@ class GuessLanguage(Transformer): # the extension, then it is likely a subtitle language parts = mtree.clean_string(lang_node.root.value).split() if m.get('type') in ['moviesubtitle', 'episodesubtitle']: - if lang_node.value in parts and \ - (parts.index(lang_node.value) == len(parts) - 2): + if (lang_node.value in parts and parts.index(lang_node.value) == len(parts) - 2): continue - to_skip_language_nodes.append(lang_node) - elif lang not in langs: - langs[lang] = lang_node - else: - # The same language was found. Keep the more confident one, - # and add others to skip for 2nd pass. - existing_lang_node = langs[lang] - to_skip = None - if (existing_lang_node.guess.confidence('language') >= - lang_node.guess.confidence('language')): - # lang_node is to remove - to_skip = lang_node - else: - # existing_lang_node is to remove - langs[lang] = lang_node - to_skip = existing_lang_node - to_skip_language_nodes.append(to_skip) - - if to_skip_language_nodes: + + to_skip_langs.add(lang_node.value) + + if to_skip_langs: # Also skip same value nodes - skipped_values = [skip_node.value for skip_node in to_skip_language_nodes] + lang_nodes = (set(mtree.leaves_containing('language')) | + set(mtree.leaves_containing('subtitleLanguage'))) - for lang_key in ('language', 'subtitleLanguage'): - lang_nodes = set(mtree.leaves_containing(lang_key)) + to_skip = [node for node in lang_nodes if node.value in to_skip_langs] + return {'skip_nodes': to_skip} - for lang_node in lang_nodes: - if lang_node not in to_skip_language_nodes and lang_node.value in skipped_values: - to_skip_language_nodes.append(lang_node) - return {'skip_nodes': to_skip_language_nodes} return None def should_process(self, mtree, options=None): diff --git a/lib/guessit/transfo/guess_properties.py b/lib/guessit/transfo/guess_properties.py index 8c08d20df5e5ab6ba23d9aefb6dc7e0e541bbd90..c66b02d5d513d9f046159d9ec9beeb82bce3c6de 100644 --- a/lib/guessit/transfo/guess_properties.py +++ b/lib/guessit/transfo/guess_properties.py @@ -74,11 +74,11 @@ class GuessProperties(Transformer): 'TV': ['SD-TV', 'SD-TV-Rip', 'Rip-SD-TV', 'TV-Rip', 'Rip-TV'], 'DVB': ['DVB-Rip', 'DVB', 'PD-TV'], 'DVD': ['DVD', 'DVD-Rip', 'VIDEO-TS', 'DVD-R', 'DVD-9', 'DVD-5'], - 'HDTV': ['HD-TV', 'TV-RIP-HD', 'HD-TV-RIP'], + 'HDTV': ['HD-TV', 'TV-RIP-HD', 'HD-TV-RIP', 'HD-RIP'], 'VOD': ['VOD', 'VOD-Rip'], 'WEBRip': ['WEB-Rip'], 'WEB-DL': ['WEB-DL', 'WEB-HD', 'WEB'], - 'HD-DVD': ['HD-(?:DVD)?-Rip', 'HD-DVD'], + 'HD-DVD': ['HD-DVD-Rip', 'HD-DVD'], 'BluRay': ['Blu-ray(?:-Rip)?', 'B[DR]', 'B[DR]-Rip', 'BD[59]', 'BD25', 'BD50'] }) diff --git a/lib/guessit/transfo/guess_year.py b/lib/guessit/transfo/guess_year.py index e4eb8bb8c4e83658d3f034d3367ef37a32b75e05..b7710e97f5603008c7814edaf2435cc402a45273 100644 --- a/lib/guessit/transfo/guess_year.py +++ b/lib/guessit/transfo/guess_year.py @@ -42,8 +42,13 @@ class GuessYear(Transformer): def second_pass_options(self, mtree, options=None): year_nodes = list(mtree.leaves_containing('year')) - if len(year_nodes) > 1: - return {'skip_nodes': year_nodes[:len(year_nodes) - 1]} + # if we found a year, let's try by ignoring all instances of that year + # as a candidate, let's take the one that appears last in the filename + if year_nodes: + year_candidate = year_nodes[-1].guess['year'] + year_nodes = [year for year in year_nodes if year.guess['year'] != year_candidate] + if year_nodes: + return {'skip_nodes': year_nodes} return None def process(self, mtree, options=None): diff --git a/sickbeard/databases/mainDB.py b/sickbeard/databases/mainDB.py index 2a09c9ad10355469d3bbe4894db7b1f289c7e75f..b329762722ff529d3d6816e4826afdc5cb60294b 100644 --- a/sickbeard/databases/mainDB.py +++ b/sickbeard/databases/mainDB.py @@ -128,7 +128,7 @@ class MainSanityCheck(db.DBSanityCheck): curDate = datetime.date.today() sqlResults = self.connection.select( - "SELECT episode_id FROM tv_episodes WHERE (airdate > ? or airdate = 1) AND status in (?,?)", + "SELECT episode_id FROM tv_episodes WHERE (airdate > ? or airdate = 1) AND status in (?,?) AND season > 0", [curDate.toordinal(), common.SKIPPED, common.WANTED]) for cur_unaired in sqlResults: diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index 7f7daf1f7e2880b6f58e5d84b0c20152963466b9..53d973c22a1caf36f39345ea8556c9f938cc8791 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -1153,7 +1153,7 @@ def extractZip(archive, targetDir): if not os.path.exists(targetDir): os.mkdir(targetDir) - zip_file = zipfile.ZipFile(archive, 'r') + zip_file = zipfile.ZipFile(archive, 'r', allowZip64=True) for member in zip_file.namelist(): filename = os.path.basename(member) # skip directories @@ -1175,7 +1175,7 @@ def extractZip(archive, targetDir): def backupConfigZip(fileList, archive, arcname = None): try: - a = zipfile.ZipFile(archive, 'w', zipfile.ZIP_DEFLATED) + a = zipfile.ZipFile(archive, 'w', zipfile.ZIP_DEFLATED, allowZip64=True) for f in fileList: a.write(f, os.path.relpath(f, arcname)) a.close() @@ -1197,7 +1197,7 @@ def restoreConfigZip(archive, targetDir): bakFilename = '{0}-{1}'.format(path_leaf(targetDir), datetime.datetime.strftime(datetime.datetime.now(), '%Y%m%d_%H%M%S')) shutil.move(targetDir, os.path.join(ntpath.dirname(targetDir), bakFilename)) - zip_file = zipfile.ZipFile(archive, 'r') + zip_file = zipfile.ZipFile(archive, 'r', allowZip64=True) for member in zip_file.namelist(): zip_file.extract(member, targetDir) zip_file.close() diff --git a/sickbeard/logger.py b/sickbeard/logger.py index a1c620cc7cca127f48cd11a94da22d86a7bd24c1..a5d1b42bc5c20b311b5a29bd71379cefdd573841 100644 --- a/sickbeard/logger.py +++ b/sickbeard/logger.py @@ -152,9 +152,22 @@ class Logger(object): sys.exit(1) def submit_errors(self): - if not (sickbeard.GIT_USERNAME and sickbeard.GIT_PASSWORD and len(classes.ErrorViewer.errors) > 0): - self.log('Please set your GitHub username and password in the config, unable to submit issue ticket to GitHub!') + if not (sickbeard.GIT_USERNAME and sickbeard.GIT_PASSWORD and sickbeard.DEBUG and len(classes.ErrorViewer.errors) > 0): + self.log('Please set your GitHub username and password in the config and enable debug. Unable to submit issue ticket to GitHub!') return + + try: + from versionChecker import CheckVersion + checkversion = CheckVersion() + needs_update = checkversion.check_for_new_version() + commits_behind = checkversion.updater.get_num_commits_behind() + except: + self.log('Could not check if your SickRage is updated, unable to submit issue ticket to GitHub!') + return + + if commits_behind is None or commits_behind > 0: + self.log('Please update SickRage, unable to submit issue ticket to GitHub with an outdated version!') + return if self.submitter_running: return 'RUNNING' diff --git a/sickbeard/properFinder.py b/sickbeard/properFinder.py index fc217b9b9a75dd708f89c6121b93e4f4121fa6df..1d66ba6aaacbb70e33cc1e6f0a3d8ab368794459 100644 --- a/sickbeard/properFinder.py +++ b/sickbeard/properFinder.py @@ -21,6 +21,8 @@ import datetime import operator import threading import traceback +import re + from search import pickBestResult import sickbeard diff --git a/sickbeard/scene_exceptions.py b/sickbeard/scene_exceptions.py index b75c2ace421fa41d27c246bda252bd6d9d91f55e..88ca2a4030911e0a9a972afb7b3aa574ac18421c 100644 --- a/sickbeard/scene_exceptions.py +++ b/sickbeard/scene_exceptions.py @@ -297,7 +297,7 @@ def _xem_exceptions_fetcher(): url = "http://thexem.de/map/allNames?origin=%s&seasonNumbers=1" % sickbeard.indexerApi(indexer).config[ 'xem_origin'] - parsedJSON = helpers.getURL(url, session=xem_session, json=True) + parsedJSON = helpers.getURL(url, session=xem_session, timeout = 90, json=True) if not parsedJSON: logger.log(u"Check scene exceptions update failed for " + sickbeard.indexerApi( indexer).name + ", Unable to get URL: " + url, logger.ERROR) diff --git a/sickbeard/traktChecker.py b/sickbeard/traktChecker.py index cfe667cfe67ab3105ff5c99ca0350029c3b9c822..de4b1b1f4086f922180b95923784021f999ebd14 100644 --- a/sickbeard/traktChecker.py +++ b/sickbeard/traktChecker.py @@ -324,7 +324,7 @@ class TraktChecker(): logger.log(u"Could not connect to Trakt service: %s" % ex(e), logger.WARNING) return - if progress['aired'] == progress['completed']: + if 'aired' in progress and 'completed' in progress and progress['aired'] == progress['completed']: show.deleteShow(full=True) logger.log(u"Show: " + show.name + " has been removed from SickRage", logger.DEBUG) diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 12c67056c4f0d119bb5ee755b5df447779874b0e..32b1e6b3fa8e9d865c7851934521c3739eb30c59 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -1779,7 +1779,7 @@ class TVEpisode(object): if not ek.ek(os.path.isfile, self.location): if self.airdate >= datetime.date.today() or self.airdate == datetime.date.fromordinal(1): logger.log(u"Episode airs in the future or has no airdate, marking it %s" % statusStrings[UNAIRED], logger.DEBUG) - self.status = UNAIRED if self.season > 0 else SKIPPED # Some specials have no airdate + self.status = UNAIRED elif self.status in [UNAIRED, UNKNOWN]: # Only do UNAIRED/UNKNOWN, it could already be snatched/ignored/skipped, or downloaded/archived to disconnected media logger.log(u"Episode has already aired, marking it %s" % statusStrings[self.show.default_ep_status], logger.DEBUG) diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index d7c90d58cad7049504230deacc58b77ce0d4d1b4..733661f563c8c20114ea2cd45e054467ac29fc90 100644 --- a/sickbeard/webapi.py +++ b/sickbeard/webapi.py @@ -1100,7 +1100,7 @@ class CMD_SubtitleSearch(ApiCall): return _responds(RESULT_FAILURE, msg='Unable to find subtitles') # return the correct json value - newSubtitles = frozenset(ep_obj.subtitles).difference(previous_subtitles) + newSubtitles = frozenset(epObj.subtitles).difference(previous_subtitles) if newSubtitles: newLangs = [subtitles.fromietf(newSub) for newSub in newSubtitles] status = 'New subtitles downloaded: %s' % ', '.join([newLang.name for newLang in newLangs])