Change improve indication of abandoned IDs.

Add warn icon indicator of abandoned IDs to "Manage" menu bar and "Manage/Show Processes" menu item.
Add shows that have no replacement ID can be ignored at "Manage/Show Processes", the menu bar warn icon hides if all are ignored.
This commit is contained in:
JackDandy 2017-09-06 10:08:31 +01:00
parent 75f59d717e
commit b203fb588e
11 changed files with 339 additions and 245 deletions

View file

@ -107,6 +107,8 @@
different default TV info source different default TV info source
* Add shows not found at a TV info source for over 7 days will only be retried once a week * Add shows not found at a TV info source for over 7 days will only be retried once a week
* Change prevent showing 'Mark download as bad and retry?' dialog when status doesn't require it * Change prevent showing 'Mark download as bad and retry?' dialog when status doesn't require it
* Add warn icon indicator of abandoned IDs to "Manage" menu bar and "Manage/Show Processes" menu item
* Add shows that have no replacement ID can be ignored at "Manage/Show Processes", the menu bar warn icon hides if all are ignored
[develop changelog] [develop changelog]
@ -121,6 +123,7 @@
* Update unidecode library 0.04.18 to 0.04.20 (1e18d98) * Update unidecode library 0.04.18 to 0.04.20 (1e18d98)
* Fix image not loaded from tvdb_api if there is only one poster/banner * Fix image not loaded from tvdb_api if there is only one poster/banner
* Change prevent setting show/episode attr to None from indexer data * Change prevent setting show/episode attr to None from indexer data
* Fix article link color on some page were changed blue
### 0.12.28 (2017-08-26 18:15:00 UTC) ### 0.12.28 (2017-08-26 18:15:00 UTC)

View file

@ -1,21 +1,25 @@
/* ======================================================================= /* =======================================================================
inc_top.tmpl inc_top.tmpl
========================================================================== */ ========================================================================== */
.shows-not-found.n .snf .sgicon-warning,
.navbar-default .navbar-nav .logger.errors.n, .navbar-default .navbar-nav .logger.errors.n,
pre .prelight{ pre .prelight{
color:#c3ed9b color:#c3ed9b
} }
.shows-not-found.nn .snf .sgicon-warning,
.navbar-default .navbar-nav .logger.errors.nn, .navbar-default .navbar-nav .logger.errors.nn,
pre .prelight2{ pre .prelight2{
color:#f6ff41 color:#f6ff41
} }
.shows-not-found.nnn .snf .sgicon-warning,
.navbar-default .navbar-nav .logger.errors.nnn, .navbar-default .navbar-nav .logger.errors.nnn,
pre .prelight-num{ pre .prelight-num{
color:#ffba57 color:#ffba57
} }
.shows-not-found.nnnn .snf .sgicon-warning,
.navbar-default .navbar-nav .logger.errors.nnnn{ .navbar-default .navbar-nav .logger.errors.nnnn{
color:#ff6d5e color:#ff6d5e
} }

View file

@ -1,21 +1,25 @@
/* ======================================================================= /* =======================================================================
inc_top.tmpl inc_top.tmpl
========================================================================== */ ========================================================================== */
.shows-not-found.n .snf .sgicon-warning,
.navbar-default .navbar-nav .logger.errors.n, .navbar-default .navbar-nav .logger.errors.n,
pre .prelight{ pre .prelight{
color:#6f8c53 color:#6f8c53
} }
.shows-not-found.nn .snf .sgicon-warning,
.navbar-default .navbar-nav .logger.errors.nn, .navbar-default .navbar-nav .logger.errors.nn,
pre .prelight2{ pre .prelight2{
color:#b7b82c color:#b7b82c
} }
.shows-not-found.nnn .snf .sgicon-warning,
.navbar-default .navbar-nav .logger.errors.nnn, .navbar-default .navbar-nav .logger.errors.nnn,
pre .prelight-num{ pre .prelight-num{
color:#eaab52 color:#eaab52
} }
.shows-not-found.nnnn .snf .sgicon-warning,
.navbar-default .navbar-nav .logger.errors.nnnn{ .navbar-default .navbar-nav .logger.errors.nnnn{
color:#ff6d5e color:#ff6d5e
} }

View file

@ -161,6 +161,7 @@ inc_top.tmpl
margin-bottom:-15px margin-bottom:-15px
} }
.navbar-default .navbar-nav .snf.bar,
.navbar-default .navbar-nav .logger.bar{ .navbar-default .navbar-nav .logger.bar{
position: absolute; position: absolute;
display:none; display:none;
@ -169,18 +170,32 @@ inc_top.tmpl
right:12px right:12px
} }
.navbar-default .navbar-nav .item .sgicon-showqueue,
.shows-not-found .navbar-default .navbar-nav .snf.item .sgicon-warning,
.shows-not-found.n .navbar-default .navbar-nav .snf.bar, .shows-not-found.nn .navbar-default .navbar-nav .snf.bar,
.shows-not-found.nnn .navbar-default .navbar-nav .snf.bar, .shows-not-found.nnnn .navbar-default .navbar-nav .snf.bar,
.n .navbar-default .navbar-nav .snf.item .sgicon-showqueue, .nn .navbar-default .navbar-nav .snf.item .sgicon-showqueue,
.nnn .navbar-default .navbar-nav .snf.item .sgicon-showqueue, .nnnn .navbar-default .navbar-nav .snf.item .sgicon-showqueue,
.navbar-default .navbar-nav .logger.errors{ .navbar-default .navbar-nav .logger.errors{
display:block; display:block;
} }
.navbar-default .navbar-nav .snf.item,
.navbar-default .navbar-nav .logger.errors.item{ .navbar-default .navbar-nav .logger.errors.item{
display:inline-block display:inline-block
} }
.navbar-default .navbar-nav .snf,
.navbar-default .navbar-nav .logger{ .navbar-default .navbar-nav .logger{
height:14px height:14px
} }
.shows-not-found .navbar-default .navbar-nav .snf.bar,
.shows-not-found .navbar-default .navbar-nav .snf.item .sgicon-showqueue,
.navbar-default .navbar-nav .snf.item .sgicon-warning{
display:none
}
[class^="icon-"], [class^="icon-"],
[class*=" icon-"]{ [class*=" icon-"]{
background-image:url("../images/glyphicons-halflings.png") background-image:url("../images/glyphicons-halflings.png")
@ -1131,8 +1146,8 @@ div.formpaginate{
margin-right:6px margin-right:6px
} }
a span.article, #addShowForm a span.article,
a:hover span.article{ #addShowForm a:hover span.article{
color:#2f4799 color:#2f4799
} }

View file

@ -335,7 +335,7 @@
<span class="component-desc"> <span class="component-desc">
#set $current_showid = $show.ids.get($src_id, {'id': 0}).get('id') #set $current_showid = $show.ids.get($src_id, {'id': 0}).get('id')
<input type="text" data-maybe-master="#echo ('0', '1')[bool($maybe_master)]#" name="mid-$src_id" id="#echo ('mid-%s' % $src_id, 'source-id')[$src_id == $show.indexer]#" value="#echo ($current_showid, $srcid)[$expand_ids and ($src_id == $tvsrc)]#" class="form-control form-control-inline input-sm#if $src_id == $show.indexer and $unlock_master_id# warning#end if#" #echo ('', $html_disabled)[$src_id == $show.indexer and not $unlock_master_id]#> <input type="text" data-maybe-master="#echo ('0', '1')[bool($maybe_master)]#" name="mid-$src_id" id="#echo ('mid-%s' % $src_id, 'source-id')[$src_id == $show.indexer]#" value="#echo ($current_showid, $srcid)[$expand_ids and ($src_id == $tvsrc)]#" class="form-control form-control-inline input-sm#if $src_id == $show.indexer and $unlock_master_id# warning" title="Abandoned master ID#end if#" #echo ('', $html_disabled)[$src_id == $show.indexer and not $unlock_master_id]#>
#if $src_id == $show.indexer #if $src_id == $show.indexer
<label for="the-master"> <label for="the-master">

View file

@ -94,6 +94,13 @@
#set $parts = $body_attr.split('class="') #set $parts = $body_attr.split('class="')
#set $body_attr = ('class="%s '.join($parts), $parts[0] + ' class="%s"')[1 == len($parts)] % {0: '', 1: 'pro', 2: 'pro ii'}.get(getattr($sickbeard, 'DISPLAY_SHOW_VIEWMODE', 0)) #set $body_attr = ('class="%s '.join($parts), $parts[0] + ' class="%s"')[1 == len($parts)] % {0: '', 1: 'pro', 2: 'pro ii'}.get(getattr($sickbeard, 'DISPLAY_SHOW_VIEWMODE', 0))
#end if #end if
#set $classes = ' '.join(([], ['shows-not-found'])[any([$getVar('log_num_not_found_shows_all', 0)])] \
+ ([], [($getVar('log_num_not_found_shows', 0) * 'n')[0:4]])[any([$getVar('log_num_not_found_shows', 0)])])
#if any($classes)
#set $body_attr = $body_attr.rstrip('"') + (' class="%s"', ' %s"')['class=' in $body_attr] % $classes
#end if
<body$body_attr> <body$body_attr>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid"> <div class="container-fluid">
@ -143,14 +150,14 @@
</li> </li>
<li id="NAVmanage" class="dropdown"> <li id="NAVmanage" class="dropdown">
<a href="$sbRoot/manage/" class="dropdown-toggle" data-toggle="dropdown" $hover_dropdown tabindex="$tab#set $tab += 1#">Manage <b class="caret"></b></a> <a href="$sbRoot/manage/" class="dropdown-toggle" data-toggle="dropdown" $hover_dropdown tabindex="$tab#set $tab += 1#">Manage <b class="caret"></b><span class="snf bar"><i class="sgicon-warning"></i></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="$sbRoot/home/postprocess/" tabindex="$tab#set $tab += 1#"><i class="sgicon-postprocess"></i>Process Media</a></li> <li><a href="$sbRoot/home/postprocess/" tabindex="$tab#set $tab += 1#"><i class="sgicon-postprocess"></i>Process Media</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="$sbRoot/manage/" tabindex="$tab#set $tab += 1#"><i class="sgicon-bulk-change"></i>Bulk Change</a></li> <li><a href="$sbRoot/manage/" tabindex="$tab#set $tab += 1#"><i class="sgicon-bulk-change"></i>Bulk Change</a></li>
<li><a href="$sbRoot/manage/backlogOverview/" tabindex="$tab#set $tab += 1#"><i class="sgicon-backlog"></i>Backlog Overview</a></li> <li><a href="$sbRoot/manage/backlogOverview/" tabindex="$tab#set $tab += 1#"><i class="sgicon-backlog"></i>Backlog Overview</a></li>
<li><a href="$sbRoot/manage/manageSearches/" tabindex="$tab#set $tab += 1#"><i class="sgicon-search"></i>Media Search</a></li> <li><a href="$sbRoot/manage/manageSearches/" tabindex="$tab#set $tab += 1#"><i class="sgicon-search"></i>Media Search</a></li>
<li><a href="$sbRoot/manage/showProcesses/" tabindex="$tab#set $tab += 1#"><i class="sgicon-showqueue"></i>Show Processes</a></li> <li><a href="$sbRoot/manage/showProcesses/" tabindex="$tab#set $tab += 1#"><span class="snf item"><i class="sgicon-warning"></i><i class="sgicon-showqueue"></i></span>Show Processes</a></li>
<li><a href="$sbRoot/manage/episodeStatuses/" tabindex="$tab#set $tab += 1#"><i class="sgicon-episodestatus"></i>Episode Status</a></li> <li><a href="$sbRoot/manage/episodeStatuses/" tabindex="$tab#set $tab += 1#"><i class="sgicon-episodestatus"></i>Episode Status</a></li>
#if hasattr($sickbeard, 'USE_EMBY') and $sg_var('USE_EMBY') and $sg_str('EMBY_HOST') != '' and $sg_str('EMBY_APIKEY') != '' #if hasattr($sickbeard, 'USE_EMBY') and $sg_var('USE_EMBY') and $sg_str('EMBY_HOST') != '' and $sg_str('EMBY_APIKEY') != ''
<li><a href="$sbRoot/home/updateEMBY/" tabindex="$tab#set $tab += 1#"><i class="sgicon-emby"></i>Update Emby</a></li> <li><a href="$sbRoot/home/updateEMBY/" tabindex="$tab#set $tab += 1#"><i class="sgicon-emby"></i>Update Emby</a></li>

View file

@ -19,19 +19,19 @@
<div id="summary2" class="align-left"> <div id="summary2" class="align-left">
<h3>Backlog Search:</h3> <h3>Backlog Search:</h3>
<a id="forcebacklog" class="btn#if $standardBacklogRunning or $backlogIsActive# disabled#end if#" href="$sbRoot/manage/manageSearches/forceBacklog"><i class="sgicon-play"></i> Force</a> <a id="forcebacklog" class="btn#if $standard_backlog_running or $backlog_is_active# disabled#end if#" href="$sbRoot/manage/manageSearches/forceBacklog"><i class="sgicon-play"></i> Force</a>
<a id="pausebacklog" class="btn" href="$sbRoot/manage/manageSearches/pauseBacklog?paused=#if $backlogPaused then "0" else "1"#"><i class="#if $backlogPaused then "sgicon-play" else "sgicon-pause"#"></i> #if $backlogPaused then "Unpause" else "Pause"#</a> <a id="pausebacklog" class="btn" href="$sbRoot/manage/manageSearches/pauseBacklog?paused=#if $backlog_paused then "0" else "1"#"><i class="#if $backlog_paused then "sgicon-play" else "sgicon-pause"#"></i> #if $backlog_paused then "Unpause" else "Pause"#</a>
#if $backlogPaused then 'Paused: ' else ''# #if $backlog_paused then 'Paused: ' else ''#
#if not $backlogRunning and not $backlogIsActive: #if not $backlog_running and not $backlog_is_active:
Not in progress<br /> Not in progress<br />
#else #else
Currently running#if $backlogRunningType != "None"# ($backlogRunningType)#end if#<br /> Currently running#if $backlog_running_type != "None"# ($backlog_running_type)#end if#<br />
#end if #end if
<br /> <br />
<h3>Recent Search:</h3> <h3>Recent Search:</h3>
<a id="recentsearch" class="btn#if $recentSearchStatus# disabled#end if#" href="$sbRoot/manage/manageSearches/forceSearch"><i class="sgicon-play"></i> Force</a> <a id="recentsearch" class="btn#if $recent_search_status# disabled#end if#" href="$sbRoot/manage/manageSearches/forceSearch"><i class="sgicon-play"></i> Force</a>
#if not $recentSearchStatus #if not $recent_search_status
Not in progress<br /> Not in progress<br />
#else #else
In Progress<br /> In Progress<br />
@ -39,8 +39,8 @@
<br /> <br />
<h3>Find Propers Search:</h3> <h3>Find Propers Search:</h3>
<a id="propersearch" class="btn#if $findPropersStatus# disabled#end if#" href="$sbRoot/manage/manageSearches/forceFindPropers"><i class="sgicon-play"></i> Force</a> <a id="propersearch" class="btn#if $find_propers_status# disabled#end if#" href="$sbRoot/manage/manageSearches/forceFindPropers"><i class="sgicon-play"></i> Force</a>
#if not $findPropersStatus #if not $find_propers_status
Not in progress<br /> Not in progress<br />
#else #else
In Progress<br /> In Progress<br />
@ -50,20 +50,20 @@
<br /><br /> <br /><br />
<h3>Search Queue:</h3> <h3>Search Queue:</h3>
#if $queueLength['backlog'] or $queueLength['manual'] or $queueLength['failed'] #if $queue_length['backlog'] or $queue_length['manual'] or $queue_length['failed']
<input type="button" class="show-all-more btn" id="all-btn-more" value="Expand All"><input type="button" class="show-all-less btn" id="all-btn-less" value="Collapse All"><br> <input type="button" class="show-all-more btn" id="all-btn-more" value="Expand All"><input type="button" class="show-all-less btn" id="all-btn-less" value="Collapse All"><br>
#end if #end if
<br> <br>
Recent: <i>$queueLength['recent'] item$sickbeard.helpers.maybe_plural($queueLength['recent'])</i><br><br> Recent: <i>$queue_length['recent'] item$sickbeard.helpers.maybe_plural($queue_length['recent'])</i><br><br>
Proper: <i>$queueLength['proper'] item$sickbeard.helpers.maybe_plural($queueLength['proper'])</i><br><br> Proper: <i>$queue_length['proper'] item$sickbeard.helpers.maybe_plural($queue_length['proper'])</i><br><br>
Backlog: <i>$len($queueLength['backlog']) item$sickbeard.helpers.maybe_plural($len($queueLength['backlog']))</i> Backlog: <i>$len($queue_length['backlog']) item$sickbeard.helpers.maybe_plural($len($queue_length['backlog']))</i>
#if $queueLength['backlog'] #if $queue_length['backlog']
<input type="button" class="shows-more btn" id="backlog-btn-more" value="Expand" #if not $queueLength['backlog']# style="display:none" #end if#><input type="button" class="shows-less btn" id="backlog-btn-less" value="Collapse" style="display:none"><br> <input type="button" class="shows-more btn" id="backlog-btn-more" value="Expand" #if not $queue_length['backlog']# style="display:none" #end if#><input type="button" class="shows-less btn" id="backlog-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none"> <table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead> <thead></thead>
<tbody> <tbody>
#set $row = 0 #set $row = 0
#for $cur_item in $queueLength['backlog']: #for $cur_item in $queue_length['backlog']:
#set $search_type = 'On Demand' #set $search_type = 'On Demand'
#if $cur_item['standard_backlog']: #if $cur_item['standard_backlog']:
#if $cur_item['forced']: #if $cur_item['forced']:
@ -93,14 +93,14 @@ Backlog: <i>$len($queueLength['backlog']) item$sickbeard.helpers.maybe_plural($l
<br> <br>
#end if #end if
<br> <br>
Manual: <i>$len($queueLength['manual']) item$sickbeard.helpers.maybe_plural($len($queueLength['manual']))</i> Manual: <i>$len($queue_length['manual']) item$sickbeard.helpers.maybe_plural($len($queue_length['manual']))</i>
#if $queueLength['manual'] #if $queue_length['manual']
<input type="button" class="shows-more btn" id="manual-btn-more" value="Expand" #if not $queueLength['manual']# style="display:none" #end if#><input type="button" class="shows-less btn" id="manual-btn-less" value="Collapse" style="display:none"><br> <input type="button" class="shows-more btn" id="manual-btn-more" value="Expand" #if not $queue_length['manual']# style="display:none" #end if#><input type="button" class="shows-less btn" id="manual-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none"> <table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead> <thead></thead>
<tbody> <tbody>
#set $row = 0 #set $row = 0
#for $cur_item in $queueLength['manual']: #for $cur_item in $queue_length['manual']:
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#"> <tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="width:100%;text-align:left;color:white"> <td style="width:100%;text-align:left;color:white">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_item['indexerid']">$cur_item['name']</a> - $sickbeard.helpers.make_search_segment_html_string($cur_item['segment']) <a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_item['indexerid']">$cur_item['name']</a> - $sickbeard.helpers.make_search_segment_html_string($cur_item['segment'])
@ -113,14 +113,14 @@ Manual: <i>$len($queueLength['manual']) item$sickbeard.helpers.maybe_plural($len
<br> <br>
#end if #end if
<br> <br>
Failed: <i>$len($queueLength['failed']) item$sickbeard.helpers.maybe_plural($len($queueLength['failed']))</i> Failed: <i>$len($queue_length['failed']) item$sickbeard.helpers.maybe_plural($len($queue_length['failed']))</i>
#if $queueLength['failed'] #if $queue_length['failed']
<input type="button" class="shows-more btn" id="failed-btn-more" value="Expand" #if not $queueLength['failed']# style="display:none" #end if#><input type="button" class="shows-less btn" id="failed-btn-less" value="Collapse" style="display:none"><br> <input type="button" class="shows-more btn" id="failed-btn-more" value="Expand" #if not $queue_length['failed']# style="display:none" #end if#><input type="button" class="shows-less btn" id="failed-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none"> <table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead> <thead></thead>
<tbody> <tbody>
#set $row = 0 #set $row = 0
#for $cur_item in $queueLength['failed']: #for $cur_item in $queue_length['failed']:
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#"> <tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="width:100%;text-align:left;color:white"> <td style="width:100%;text-align:left;color:white">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_item['indexerid']">$cur_item['name']</a> - $sickbeard.helpers.make_search_segment_html_string($cur_item['segment']) <a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_item['indexerid']">$cur_item['name']</a> - $sickbeard.helpers.make_search_segment_html_string($cur_item['segment'])

View file

@ -1,5 +1,5 @@
#import sickbeard #import sickbeard
#from sickbeard.helpers import findCertainShow #from sickbeard.helpers import findCertainShow, maybe_plural
## ##
#set global $title = 'Show Processes' #set global $title = 'Show Processes'
#set global $header = 'Show Processes' #set global $header = 'Show Processes'
@ -17,201 +17,222 @@
<h1 class="title">$title</h1> <h1 class="title">$title</h1>
#end if #end if
<div id="summary2" class="align-left"> <div id="summary2" class="align-left">
<h3> Daily show update:</h3> <h3>Daily show update:</h3>
<a id="showupdatebutton" class="btn#if $ShowUpdateRunning# disabled#end if#" href="$sbRoot/manage/showProcesses/forceShowUpdate"><i class="sgicon-play"></i> Force</a> <a id="showupdatebutton" class="btn#if $show_update_running# disabled#end if#" href="$sbRoot/manage/showProcesses/forceShowUpdate"><i class="sgicon-play"></i> Force</a>
#if not $ShowUpdateRunning: #if not $show_update_running:
Not in progress<br /> Not in progress<br />
#else: #else:
Currently running<br /> Currently running<br />
#end if #end if
<br> <br>
#if $NotFoundShows #if $not_found_shows
<h3>Shows with abandoned master IDs:</h3> #set $num_errors = $len($not_found_shows)
<input type="button" class="shows-more btn" id="notfound-btn-more" value="Expand" style="display:none"><input type="button" class="shows-less btn" id="notfound-btn-less" value="Collapse"><br> #set $err_class = ('', ' errors ' + ($num_errors * 'n')[0:4])[any([$num_errors])]
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0"> <h3>$num_errors Show$maybe_plural($num_errors) with abandoned master ID$maybe_plural($num_errors):</h3>
<thead></thead> <p>List of show(s) with changed ID at the TV info source. Click show name to get new ID, so that episode info updates may continue</p>
<tbody> <input type="button" class="shows-more btn" id="notfound-btn-more" value="Expand" style="display:none"><input type="button" class="shows-less btn" id="notfound-btn-less" value="Collapse"><br>
<tr> <table class="sickbeardTable tablesorter manageTable" cellspacing="1" border="0" cellpadding="0">
<th style="text-align:left">Show name</th> <thead>
<th>Last found</th> <tr>
<th>No warn icon</th> <th style="text-align:left">Show name</th>
</tr> <th style="width:20%;white-space:nowrap">Last found</th>
#set $row = 0 <th style="width:10%;white-space:nowrap">Ignore Warn</th>
#for $cur_show in $NotFoundShows: </tr>
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#"> </thead>
<td style="width:80%;text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexer_id']">$cur_show['show_name']</a>
</td>
<td style="width:20%;text-align:center;color:white">$cur_show['last_success']</td>
<td>
<input type="checkbox" #if $cur_show['ignore_warning'] then 'checked="checked"' else ''#>
</td>
</tr>
#end for
</tbody>
</table>
#end if
#if $DefunctIndexer
<h3>Shows from defunct TV info sources:</h3>
<input type="button" class="shows-more btn" id="defunct-btn-more" value="Expand" style="display:none"><input type="button" class="shows-less btn" id="defunct-btn-less" value="Collapse"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0">
<thead></thead>
<tbody>
<tr>
<th style="text-align:left">Show name</th>
</tr>
#set $row = 0
#for $cur_show in $DefunctIndexer:
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="width:80%;text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexer_id']">$cur_show['show_name']</a>
</td>
</tr>
#end for
</tbody>
</table>
#end if
<h3>Show queue:</h3>
<br>
#if $queueLength['add'] or $queueLength['update'] or $queueLength['refresh'] or $queueLength['rename'] or $queueLength['subtitle']
<input type="button" class="show-all-more btn" id="all-btn-more" value="Expand All"><input type="button" class="show-all-less btn" id="all-btn-less" value="Collapse All"><br>
#end if
<br>
Add: <i>$len($queueLength['add']) show$sickbeard.helpers.maybe_plural($len($queueLength['add']))</i>
#if $queueLength['add']
<input type="button" class="shows-more btn" id="add-btn-more" value="Expand" #if not $queueLength['add']# style="display:none" #end if#><input type="button" class="shows-less btn" id="add-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead>
<tbody>
<tr>
<th>Show name</th>
<th></th>
</tr>
#set $row = 0
#for $cur_show in $queueLength['add']:
#set $show_name = str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="width:80%;text-align:left;color:white">$show_name</td>
<td style="width:20%;text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled#end if#</td>
</tr>
#end for
</tbody>
</table>
#else
<br>
#end if
<br>
Update <span class="grey-text">(Forced / Forced Web)</span>: <i>$len($queueLength['update']) <span class="grey-text">($len($queueLength['forceupdate']) / $len($queueLength['forceupdateweb']))</span> show$sickbeard.helpers.maybe_plural($len($queueLength['update']))</i>
#if $queueLength['update']
<input type="button" class="shows-more btn" id="update-btn-more" value="Expand" #if not $queueLength['update']# style="display:none" #end if#><input type="button" class="shows-less btn" id="update-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead>
<tbody>
<tr>
<th>Show name</th>
<th>Schedule type</th>
</tr>
#set $row = 0
#for $cur_show in $queueLength['update']:
#set $show = $findCertainShow($showList, $cur_show['indexerid'])
#set $show_name = $show.name if $show else str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="width:80%;text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexerid']">$show_name</a>
</td>
<td style="width:20%;text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled, #end if#$cur_show['update_type']</td>
</tr>
#end for
</tbody>
</table>
#else
<br>
#end if
<br>
Refresh: <i>$len($queueLength['refresh']) show$sickbeard.helpers.maybe_plural($len($queueLength['refresh']))</i>
#if $queueLength['refresh']
<input type="button" class="shows-more btn" id="refresh-btn-more" value="Expand" #if not $queueLength['refresh']# style="display:none" #end if#><input type="button" class="shows-less btn" id="refresh-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead>
<tbody>
<tr>
<th>Show name</th>
<th>Schedule type</th>
</tr>
#set $row = 0
#for $cur_show in $queueLength['refresh']:
#set $show = $findCertainShow($showList, $cur_show['indexerid'])
#set $show_name = $show.name if $show else str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="width:80%;text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexerid']">$show_name</a>
</td>
<td style="width:20%;text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled#end if#</td>
</tr>
#end for
</tbody>
</table>
#else
<br>
#end if
<br>
Rename: <i>$len($queueLength['rename']) show$sickbeard.helpers.maybe_plural($len($queueLength['rename']))</i>
#if $queueLength['rename']
<input type="button" class="shows-more btn" id="rename-btn-more" value="Expand" #if not $queueLength['rename']# style="display:none" #end if#><input type="button" class="shows-less btn" id="rename-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead>
<tbody>
<tr>
<th>Show name</th>
<th>Schedule type</th>
</tr>
#set $row = 0
#for $cur_show in $queueLength['rename']:
#set $show = $findCertainShow($showList, $cur_show['indexerid'])
#set $show_name = $show.name if $show else str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="width:80%;text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexerid']">$show_name</a>
</td>
<td style="width:20%;text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled#end if#</td>
</tr>
#end for
</tbody>
</table>
#else
<br>
#end if
#if $sickbeard.USE_SUBTITLES
<br>
Subtitle: <i>$len($queueLength['subtitle']) show$sickbeard.helpers.maybe_plural($len($queueLength['subtitle']))</i>
#if $queueLength['subtitle']
<input type="button" class="shows-more btn" id="subtitle-btn-more" value="Expand" #if not $queueLength['subtitle']# style="display:none" #end if#><input type="button" class="shows-less btn" id="subtitle-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead>
<tbody> <tbody>
<tr> #set $row = 0
<th>Show name</th> #for $cur_show in $not_found_shows:
<th>Schedule type</th>
</tr>
#set $row = 0
#for $cur_show in $queueLength['subtitle']:
#set $show = $findCertainShow($showList, $cur_show['indexerid'])
#set $show_name = $show.name if $show else str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#"> <tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="width:80%;text-align:left"> <td style="text-align:left">
<span style="padding-right:5px" class="logger item snf"><i class="sgicon-warning"></i></span><a class="whitelink" href="$sbRoot/home/editShow?show=$cur_show['indexer_id']&tvsrc=0&srcid=$cur_show['indexer_id']#core-component-group3">$cur_show['show_name']</a>
</td>
<td style="text-align:center;color:white">
$cur_show['last_success']</td>
<td>
<input class="nowarnicon" type="checkbox" #if $cur_show['ignore_warning'] then 'checked="checked"' else ''# data-indexer="$cur_show['indexer']" data-indexer-id="$cur_show['indexer_id']">
</td>
</tr>
#end for
</tbody>
<tfoot>
<tr>
<td colspan="2" style="text-align:right"><span>Note: Ignored shows will still not get updates unless edited</span></td>
<td>
<input id="save-nowarnicon" type="button" class="btn" value="Save">
</td>
</tr>
</tfoot>
</table>
#end if
#if $defunct_indexer
<h3>Shows from defunct TV info sources:</h3>
<input type="button" class="shows-more btn" id="defunct-btn-more" value="Expand" style="display:none"><input type="button" class="shows-less btn" id="defunct-btn-less" value="Collapse"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0">
<thead>
<tr>
<th style="text-align:left">Show name</th>
</tr>
</thead>
<tbody>
#set $row = 0
#for $cur_show in $defunct_indexer:
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexer_id']">$cur_show['show_name']</a>
</td>
</tr>
#end for
</tbody>
</table>
#end if
<h3>Show queue:</h3>
#if $queue_length['add'] or $queue_length['update'] or $queue_length['refresh'] or $queue_length['rename'] or $queue_length['subtitle']
<br>
<input type="button" class="show-all-more btn" id="all-btn-more" value="Expand All"><input type="button" class="show-all-less btn" id="all-btn-less" value="Collapse All"><br>
#end if
<br>
Add: <i>$len($queue_length['add']) show$sickbeard.helpers.maybe_plural($len($queue_length['add']))</i>
#if $queue_length['add']
<input type="button" class="shows-more btn" id="add-btn-more" value="Expand" #if not $queue_length['add']# style="display:none" #end if#><input type="button" class="shows-less btn" id="add-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead>
<tr>
<th style="width:80%;text-align:left">Show name</th>
<th style="width:20%">&nbsp;</th>
</tr>
</thead>
<tbody>
#set $row = 0
#for $cur_show in $queue_length['add']:
#set $show_name = str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="text-align:left;color:white">$show_name</td>
<td style="text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled#end if#</td>
</tr>
#end for
</tbody>
</table>
#else
<br>
#end if
<br>
Update <span class="grey-text">(Forced / Forced Web)</span>: <i>$len($queue_length['update']) <span class="grey-text">($len($queue_length['forceupdate']) / $len($queue_length['forceupdateweb']))</span> show$sickbeard.helpers.maybe_plural($len($queue_length['update']))</i>
#if $queue_length['update']
<input type="button" class="shows-more btn" id="update-btn-more" value="Expand" #if not $queue_length['update']# style="display:none" #end if#><input type="button" class="shows-less btn" id="update-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead>
<tr>
<th style="width:80%;text-align:left">Show name</th>
<th style="width:20%">Schedule type</th>
</tr>
</thead>
<tbody>
#set $row = 0
#for $cur_show in $queue_length['update']:
#set $show = $findCertainShow($show_list, $cur_show['indexerid'])
#set $show_name = $show.name if $show else str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexerid']">$show_name</a> <a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexerid']">$show_name</a>
</td> </td>
<td style="width:20%;text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled#end if#</td> <td style="text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled, #end if#$cur_show['update_type']</td>
</tr> </tr>
#end for #end for
</tbody>
</table>
#else
<br>
#end if
<br>
Refresh: <i>$len($queue_length['refresh']) show$sickbeard.helpers.maybe_plural($len($queue_length['refresh']))</i>
#if $queue_length['refresh']
<input type="button" class="shows-more btn" id="refresh-btn-more" value="Expand" #if not $queue_length['refresh']# style="display:none" #end if#><input type="button" class="shows-less btn" id="refresh-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead>
<tr>
<th style="width:80%;text-align:left">Show name</th>
<th style="width:20%">Schedule type</th>
</tr>
</thead>
<tbody>
#set $row = 0
#for $cur_show in $queue_length['refresh']:
#set $show = $findCertainShow($show_list, $cur_show['indexerid'])
#set $show_name = $show.name if $show else str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexerid']">$show_name</a>
</td>
<td style="text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled#end if#</td>
</tr>
#end for
</tbody>
</table>
#else
<br>
#end if
<br>
Rename: <i>$len($queue_length['rename']) show$sickbeard.helpers.maybe_plural($len($queue_length['rename']))</i>
#if $queue_length['rename']
<input type="button" class="shows-more btn" id="rename-btn-more" value="Expand" #if not $queue_length['rename']# style="display:none" #end if#><input type="button" class="shows-less btn" id="rename-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead>
<tr>
<th style="width:80%;text-align:left">Show name</th>
<th style="width:20%">Schedule type</th>
</tr>
</thead>
<tbody>
#set $row = 0
#for $cur_show in $queue_length['rename']:
#set $show = $findCertainShow($show_list, $cur_show['indexerid'])
#set $show_name = $show.name if $show else str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexerid']">$show_name</a>
</td>
<td style="text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled#end if#</td>
</tr>
#end for
</tbody>
</table>
#else
<br>
#end if
#if $sickbeard.USE_SUBTITLES
<br>
Subtitle: <i>$len($queue_length['subtitle']) show$sickbeard.helpers.maybe_plural($len($queue_length['subtitle']))</i>
#if $queue_length['subtitle']
<input type="button" class="shows-more btn" id="subtitle-btn-more" value="Expand" #if not $queue_length['subtitle']# style="display:none" #end if#><input type="button" class="shows-less btn" id="subtitle-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead>
<tr>
<th style="width:80%;text-align:left">Show name</th>
<th style="width:20%">Schedule type</th>
</tr>
</thead>
<tbody>
#set $row = 0
#for $cur_show in $queue_length['subtitle']:
#set $show = $findCertainShow($show_list, $cur_show['indexerid'])
#set $show_name = $show.name if $show else str($cur_show['name'])
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
<td style="text-align:left">
<a class="whitelink" href="$sbRoot/home/displayShow?show=$cur_show['indexerid']">$show_name</a>
</td>
<td style="text-align:center;color:white">#if $cur_show['scheduled_update']#Scheduled#end if#</td>
</tr>
#end for
</tbody> </tbody>
</table> </table>
#else #else
<br> <br>
#end if #end if
#end if #end if
</div> </div>
</div> </div>
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')

View file

@ -160,12 +160,20 @@ $(document).ready(function () {
elService.attr(attr, elService.attr(search + '-' + attr)); elService.attr(attr, elService.attr(search + '-' + attr));
elService.attr(search, linkOnly ? 'y' : 'n') elService.attr(search, linkOnly ? 'y' : 'n')
}); });
var title;
if (('' === Off) && !linkOnly) { if (('' === Off) && !linkOnly) {
preventSave = !0; preventSave = !0;
title = elSelected.attr('title');
if (!/undefined/.test(title))
elSelected.attr({'data-title': title});
elSelected.addClass('warning').attr({title: 'Use digits (0-9)'}); elSelected.addClass('warning').attr({title: 'Use digits (0-9)'});
elLock.prop('disabled', !0); elLock.prop('disabled', !0);
} else { } else {
elSelected.removeClass('warning').removeAttr('title'); title = elSelected.attr('data-title');
if (!/undefined/.test(title))
elSelected.attr({'title': title}).removeAttr('data-title');
else
elSelected.removeClass('warning').removeAttr('title');
elLock.prop('disabled', !1); elLock.prop('disabled', !1);
if (!undef(elService.attr('href'))) { if (!undef(elService.attr('href'))) {
if (!undef(elService.attr('data-href')) && linkOnly) { if (!undef(elService.attr('data-href')) && linkOnly) {

View file

@ -1,26 +1,47 @@
$(document).ready(function() { /* globals sbRoot */
$(document).ready(function() {
$('#showupdatebutton').click(function(){ $('#showupdatebutton').click(function(){
$(this).addClass('disabled'); $(this).addClass('disabled');
}) });
$('.show-all-less').click(function(){ $('.show-all-less').click(function(){
$(this).nextAll('table').hide(); $(this).nextAll('table').hide();
$(this).nextAll('input.shows-more').show(); $(this).nextAll('input.shows-more').show();
$(this).nextAll('input.shows-less').hide(); $(this).nextAll('input.shows-less').hide();
}) });
$('.show-all-more').click(function(){ $('.show-all-more').click(function(){
$(this).nextAll('table').show(); $(this).nextAll('table').show();
$(this).nextAll('input.shows-more').hide(); $(this).nextAll('input.shows-more').hide();
$(this).nextAll('input.shows-less').show(); $(this).nextAll('input.shows-less').show();
}) });
$('.shows-less').click(function(){ $('.shows-less').click(function(){
$(this).nextAll('table:first').hide(); $(this).nextAll('table:first').hide();
$(this).hide(); $(this).hide();
$(this).prevAll('input:first').show(); $(this).prevAll('input:first').show();
}) });
$('.shows-more').click(function(){ $('.shows-more').click(function(){
$(this).nextAll('table:first').show(); $(this).nextAll('table:first').show();
$(this).hide(); $(this).hide();
$(this).nextAll('input:first').show(); $(this).nextAll('input:first').show();
}) });
});
function disableSaveBtn(state){
$('#save-nowarnicon').prop('disabled', state)
}
$('#save-nowarnicon').click(function(){
disableSaveBtn(!0);
var param = {};
$('.nowarnicon').each(function(i, selected){
param[$(selected).data('indexer-id') + '|' + $(selected).prop('checked')] = $(selected).data('indexer');
});
$.getJSON(sbRoot + '/manage/showProcesses/switch_ignore_warning', param)
.done(function(){
var body$ = $('body'), nNotChecked = $('.nowarnicon').not(':checked').length;
body$.removeClass('n nn nnn nnnn');
if (nNotChecked){
body$.addClass(1 === nNotChecked ? 'n' : 2 === nNotChecked ? 'nn' : 3 === nNotChecked ? 'nnn' : 'nnnn');
}
disableSaveBtn(!1);
}).fail(function(){disableSaveBtn(!1);});
});
});

View file

@ -97,6 +97,7 @@ class PageTemplate(Template):
self.log_num_errors = len(classes.ErrorViewer.errors) self.log_num_errors = len(classes.ErrorViewer.errors)
self.log_num_not_found_shows = len([x for x in sickbeard.showList if 0 < x.not_found_count]) self.log_num_not_found_shows = len([x for x in sickbeard.showList if 0 < x.not_found_count])
self.log_num_not_found_shows_all = len([x for x in sickbeard.showList if 0 != x.not_found_count])
self.sbPID = str(sickbeard.PID) self.sbPID = str(sickbeard.PID)
self.menu = [ self.menu = [
{'title': 'Home', 'key': 'home'}, {'title': 'Home', 'key': 'home'},
@ -3650,7 +3651,7 @@ class NewHomeAddShows(Home):
if None is not return_to: if None is not return_to:
indexer, void, indexer_id, show_name = self.split_extra_show(whichSeries) indexer, void, indexer_id, show_name = self.split_extra_show(whichSeries)
if bool(helpers.tryInt(cancel_form)): if bool(helpers.tryInt(cancel_form)):
indexer = indexer or providedIndexer or '1' indexer = indexer or providedIndexer or '0'
indexer_id = re.findall('show=([\d]+)', return_to)[0] indexer_id = re.findall('show=([\d]+)', return_to)[0]
return self.redirect(return_to % (indexer, indexer_id)) return self.redirect(return_to % (indexer, indexer_id))
@ -4543,15 +4544,15 @@ class Manage(MainHandler):
class ManageSearches(Manage): class ManageSearches(Manage):
def index(self, *args, **kwargs): def index(self, *args, **kwargs):
t = PageTemplate(headers=self.request.headers, file='manage_manageSearches.tmpl') t = PageTemplate(headers=self.request.headers, file='manage_manageSearches.tmpl')
# t.backlogPI = sickbeard.backlogSearchScheduler.action.get_progress_indicator() # t.backlog_pi = sickbeard.backlogSearchScheduler.action.get_progress_indicator()
t.backlogPaused = sickbeard.searchQueueScheduler.action.is_backlog_paused() t.backlog_paused = sickbeard.searchQueueScheduler.action.is_backlog_paused()
t.backlogRunning = sickbeard.searchQueueScheduler.action.is_backlog_in_progress() t.backlog_running = sickbeard.searchQueueScheduler.action.is_backlog_in_progress()
t.backlogIsActive = sickbeard.backlogSearchScheduler.action.am_running() t.backlog_is_active = sickbeard.backlogSearchScheduler.action.am_running()
t.standardBacklogRunning = sickbeard.searchQueueScheduler.action.is_standard_backlog_in_progress() t.standard_backlog_running = sickbeard.searchQueueScheduler.action.is_standard_backlog_in_progress()
t.backlogRunningType = sickbeard.searchQueueScheduler.action.type_of_backlog_in_progress() t.backlog_running_type = sickbeard.searchQueueScheduler.action.type_of_backlog_in_progress()
t.recentSearchStatus = sickbeard.searchQueueScheduler.action.is_recentsearch_in_progress() t.recent_search_status = sickbeard.searchQueueScheduler.action.is_recentsearch_in_progress()
t.findPropersStatus = sickbeard.searchQueueScheduler.action.is_propersearch_in_progress() t.find_propers_status = sickbeard.searchQueueScheduler.action.is_propersearch_in_progress()
t.queueLength = sickbeard.searchQueueScheduler.action.queue_length() t.queue_length = sickbeard.searchQueueScheduler.action.queue_length()
t.submenu = self.ManageMenu('Search') t.submenu = self.ManageMenu('Search')
@ -4610,9 +4611,9 @@ class ManageSearches(Manage):
class showProcesses(Manage): class showProcesses(Manage):
def index(self, *args, **kwargs): def index(self, *args, **kwargs):
t = PageTemplate(headers=self.request.headers, file='manage_showProcesses.tmpl') t = PageTemplate(headers=self.request.headers, file='manage_showProcesses.tmpl')
t.queueLength = sickbeard.showQueueScheduler.action.queue_length() t.queue_length = sickbeard.showQueueScheduler.action.queue_length()
t.showList = sickbeard.showList t.show_list = sickbeard.showList
t.ShowUpdateRunning = sickbeard.showQueueScheduler.action.isShowUpdateRunning() or sickbeard.showUpdateScheduler.action.amActive t.show_update_running = sickbeard.showQueueScheduler.action.isShowUpdateRunning() or sickbeard.showUpdateScheduler.action.amActive
myDb = db.DBConnection(row_type='dict') myDb = db.DBConnection(row_type='dict')
sql_results = myDb.select('SELECT n.indexer, n.indexer_id, n.last_success, n.fail_count, s.show_name FROM tv_shows_not_found as n INNER JOIN tv_shows as s ON (n.indexer == s.indexer AND n.indexer_id == s.indexer_id)') sql_results = myDb.select('SELECT n.indexer, n.indexer_id, n.last_success, n.fail_count, s.show_name FROM tv_shows_not_found as n INNER JOIN tv_shows as s ON (n.indexer == s.indexer AND n.indexer_id == s.indexer_id)')
@ -4624,8 +4625,8 @@ class showProcesses(Manage):
sql_r = None sql_r = None
if defunct_indexer: if defunct_indexer:
sql_r = myDb.select('SELECT indexer, indexer_id, show_name FROM tv_shows WHERE indexer IN (%s)' % ','.join(['?'] * len(defunct_indexer)), defunct_indexer) sql_r = myDb.select('SELECT indexer, indexer_id, show_name FROM tv_shows WHERE indexer IN (%s)' % ','.join(['?'] * len(defunct_indexer)), defunct_indexer)
t.DefunctIndexer = sql_r t.defunct_indexer = sql_r
t.NotFoundShows = sql_results t.not_found_shows = sql_results
t.submenu = self.ManageMenu('Processes') t.submenu = self.ManageMenu('Processes')
@ -4641,17 +4642,27 @@ class showProcesses(Manage):
time.sleep(5) time.sleep(5)
self.redirect('/manage/showProcesses/') self.redirect('/manage/showProcesses/')
def switchIgnoreWarning(self, indexer=None, indexer_id=None, *args, **kwargs): @staticmethod
indexer = helpers.tryInt(indexer) def switch_ignore_warning(*args, **kwargs):
indexer_id = helpers.tryInt(indexer_id)
showObj = helpers.find_show_by_id(sickbeard.showList, {indexer: indexer_id})
if not showObj: for k, v in kwargs.iteritems():
return json.dumps({'indexer': indexer, 'indexer_id': indexer_id, 'error': 'Show not found'}) try:
indexer_id, state = k.split('|')
except ValueError:
continue
indexer, indexer_id = helpers.tryInt(v), helpers.tryInt(indexer_id)
if 0 < indexer and 0 < indexer_id:
show_obj = helpers.find_show_by_id(sickbeard.showList, {indexer: indexer_id})
if show_obj:
change = -1
if 'true' == state:
if 0 > show_obj.not_found_count:
change = 1
elif 0 < show_obj.not_found_count:
change = 1
show_obj.not_found_count *= change
showObj.not_found_count *= -1 return json.dumps({})
return json.dumps({'indexer': indexer, 'indexer_id': indexer_id, 'ignore_warning': 0 > showObj.not_found_count})
class History(MainHandler): class History(MainHandler):