Browse Source
* Add expandable search queue details on the Manage Searches page * Fix failed status episodes not included in next_episode search function * Change prevent another show update from running if one is already running * Change split Force backlog button on the Manage Searches page into: Force Limited, Force Full * Change refactor properFinder to be part of the search * Change improve threading of generic_queue, show_queue and search_queue * Change disable the Force buttons on the Manage Searches page while a search is running * Change disable the Pause buttons on the Manage Searches page if a search is not running * Change scheduler forceRun * Change staggered periods of testing and updating of all shows "ended" status up to 460 dayspull/348/head
21 changed files with 1114 additions and 615 deletions
@ -0,0 +1,151 @@ |
|||||
|
#import sickbeard |
||||
|
#from sickbeard.helpers import findCertainShow |
||||
|
## |
||||
|
#set global $title = 'Show Queue Overview' |
||||
|
#set global $header = 'Show Queue Overview' |
||||
|
#set global $sbPath = '..' |
||||
|
#set global $topmenu = 'manage' |
||||
|
## |
||||
|
#import os.path |
||||
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') |
||||
|
|
||||
|
<script type="text/javascript" src="$sbRoot/js/manageShowQueueOverview.js?$sbPID" xmlns="http://www.w3.org/1999/html"></script> |
||||
|
<div id="content800"> |
||||
|
#if $varExists('header') |
||||
|
<h1 class="header">$header</h1> |
||||
|
#else |
||||
|
<h1 class="title">$title</h1> |
||||
|
#end if |
||||
|
|
||||
|
<div id="summary2" class="align-left"> |
||||
|
<h3> Daily Show Update:</h3> |
||||
|
<a id="showupdatebutton" class="btn#if $ShowUpdateRunning# disabled#end if#" href="$sbRoot/manage/showQueueOverview/forceShowUpdate"><i class="sgicon-play"></i> Force</a> |
||||
|
#if not $ShowUpdateRunning: |
||||
|
Not in progress<br /> |
||||
|
#else: |
||||
|
Currently running<br /> |
||||
|
#end if |
||||
|
</br> |
||||
|
<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> |
||||
|
#set $row = 0 |
||||
|
#for $cur_show in $queueLength['add']: |
||||
|
#set $show_name = str($cur_show[0]) |
||||
|
<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[1]#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> |
||||
|
#set $row = 0 |
||||
|
#for $cur_show in $queueLength['update']: |
||||
|
#set $show = $findCertainShow($showList, $cur_show[0]) |
||||
|
#set $show_name = $show.name if $show else str($cur_show[0]) |
||||
|
<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[0]">$show_name</a> |
||||
|
</td> |
||||
|
<td style="width:20%;text-align:center;color:white">#if $cur_show[1]#Scheduled, #end if#$cur_show[2]</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> |
||||
|
#set $row = 0 |
||||
|
#for $cur_show in $queueLength['refresh']: |
||||
|
#set $show = $findCertainShow($showList, $cur_show[0]) |
||||
|
#set $show_name = $show.name if $show else str($cur_show[0]) |
||||
|
<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[0]">$show_name</a> |
||||
|
</td> |
||||
|
<td style="width:20%;text-align:center;color:white">#if $cur_show[1]#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> |
||||
|
#set $row = 0 |
||||
|
#for $cur_show in $queueLength['rename']: |
||||
|
#set $show = $findCertainShow($showList, $cur_show[0]) |
||||
|
#set $show_name = $show.name if $show else str($cur_show[0]) |
||||
|
<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[0]">$show_name</a> |
||||
|
</td> |
||||
|
<td style="width:20%;text-align:center;color:white">#if $cur_show[1]#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> |
||||
|
#set $row = 0 |
||||
|
#for $cur_show in $queueLength['subtitle']: |
||||
|
#set $show = $findCertainShow($showList, $cur_show[0]) |
||||
|
#set $show_name = $show.name if $show else str($cur_show[0]) |
||||
|
<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[0]">$show_name</a> |
||||
|
</td> |
||||
|
<td style="width:20%;text-align:center;color:white">#if $cur_show[1]#Scheduled#end if#</td> |
||||
|
</tr> |
||||
|
#end for |
||||
|
</tbody> |
||||
|
</table> |
||||
|
#else |
||||
|
</br> |
||||
|
#end if |
||||
|
#end if |
||||
|
</div> |
||||
|
</div> |
||||
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') |
@ -0,0 +1,33 @@ |
|||||
|
$(document).ready(function() { |
||||
|
$('#recentsearch,#propersearch').click(function(){ |
||||
|
$(this).addClass('disabled'); |
||||
|
}) |
||||
|
$('#forcebacklog,#forcefullbacklog').click(function(){ |
||||
|
$('#forcebacklog,#forcefullbacklog').addClass('disabled'); |
||||
|
$('#pausebacklog').removeClass('disabled'); |
||||
|
}) |
||||
|
$('#pausebacklog').click(function(){ |
||||
|
$(this).addClass('disabled'); |
||||
|
}) |
||||
|
$('.show-all-less').click(function(){ |
||||
|
$(this).nextAll('table').hide(); |
||||
|
$(this).nextAll('input.shows-more').show(); |
||||
|
$(this).nextAll('input.shows-less').hide(); |
||||
|
}) |
||||
|
$('.show-all-more').click(function(){ |
||||
|
$(this).nextAll('table').show(); |
||||
|
$(this).nextAll('input.shows-more').hide(); |
||||
|
$(this).nextAll('input.shows-less').show(); |
||||
|
}) |
||||
|
|
||||
|
$('.shows-less').click(function(){ |
||||
|
$(this).nextAll('table:first').hide(); |
||||
|
$(this).hide(); |
||||
|
$(this).prevAll('input:first').show(); |
||||
|
}) |
||||
|
$('.shows-more').click(function(){ |
||||
|
$(this).nextAll('table:first').show(); |
||||
|
$(this).hide(); |
||||
|
$(this).nextAll('input:first').show(); |
||||
|
}) |
||||
|
}); |
@ -0,0 +1,26 @@ |
|||||
|
$(document).ready(function() { |
||||
|
$('#showupdatebutton').click(function(){ |
||||
|
$(this).addClass('disabled'); |
||||
|
}) |
||||
|
$('.show-all-less').click(function(){ |
||||
|
$(this).nextAll('table').hide(); |
||||
|
$(this).nextAll('input.shows-more').show(); |
||||
|
$(this).nextAll('input.shows-less').hide(); |
||||
|
}) |
||||
|
$('.show-all-more').click(function(){ |
||||
|
$(this).nextAll('table').show(); |
||||
|
$(this).nextAll('input.shows-more').hide(); |
||||
|
$(this).nextAll('input.shows-less').show(); |
||||
|
}) |
||||
|
|
||||
|
$('.shows-less').click(function(){ |
||||
|
$(this).nextAll('table:first').hide(); |
||||
|
$(this).hide(); |
||||
|
$(this).prevAll('input:first').show(); |
||||
|
}) |
||||
|
$('.shows-more').click(function(){ |
||||
|
$(this).nextAll('table:first').show(); |
||||
|
$(this).hide(); |
||||
|
$(this).nextAll('input:first').show(); |
||||
|
}) |
||||
|
}); |
@ -0,0 +1,38 @@ |
|||||
|
# Author: Nic Wolfe <nic@wolfeden.ca> |
||||
|
# URL: http://code.google.com/p/sickbeard/ |
||||
|
# |
||||
|
# This file is part of SickGear. |
||||
|
# |
||||
|
# SickGear is free software: you can redistribute it and/or modify |
||||
|
# it under the terms of the GNU General Public License as published by |
||||
|
# the Free Software Foundation, either version 3 of the License, or |
||||
|
# (at your option) any later version. |
||||
|
# |
||||
|
# SickGear 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 |
||||
|
# GNU General Public License for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU General Public License |
||||
|
# along with SickGear. If not, see <http://www.gnu.org/licenses/>. |
||||
|
|
||||
|
from __future__ import with_statement |
||||
|
|
||||
|
import threading |
||||
|
|
||||
|
import sickbeard |
||||
|
|
||||
|
|
||||
|
class ProperSearcher(): |
||||
|
def __init__(self): |
||||
|
self.lock = threading.Lock() |
||||
|
self.amActive = False |
||||
|
|
||||
|
def run(self): |
||||
|
|
||||
|
self.amActive = True |
||||
|
|
||||
|
propersearch_queue_item = sickbeard.search_queue.ProperSearchQueueItem() |
||||
|
sickbeard.searchQueueScheduler.action.add_item(propersearch_queue_item) |
||||
|
|
||||
|
self.amActive = False |
Loading…
Reference in new issue