1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-14 03:52:22 -05:00

Fix for managing searches

This commit is contained in:
echel0n 2014-05-11 07:25:46 -07:00
parent f8035e800e
commit f7ded2a4ed
2 changed files with 3 additions and 15 deletions

View File

@ -24,15 +24,6 @@ Not in progress<br />
#if $backlogPaused then "Paused: " else ""# #if $backlogPaused then "Paused: " else ""#
Currently running<br /> Currently running<br />
#end if #end if
<br />
<h3>Daily Episode Search:</h3>
<a class="btn" href="$sbRoot/manage/manageSearches/forceSearch"><i class="icon-exclamation-sign"></i> Force</a>
#if not $searchStatus:
Not in progress<br />
#else:
In Progress<br />
#end if
<br /> <br />
<h3>Version Check:</h3> <h3>Version Check:</h3>

View File

@ -30,8 +30,6 @@ from sickbeard import generic_queue, scheduler
from sickbeard import search, failed_history, history from sickbeard import search, failed_history, history
from sickbeard import ui from sickbeard import ui
from sickbeard.snatch_queue import SnatchQueue from sickbeard.snatch_queue import SnatchQueue
from lib.concurrent.futures import as_completed
from lib.concurrent.futures.thread import ThreadPoolExecutor
search_queue_lock = threading.Lock() search_queue_lock = threading.Lock()
@ -72,10 +70,9 @@ class SearchQueue(generic_queue.GenericQueue):
return self.min_priority >= generic_queue.QueuePriorities.NORMAL return self.min_priority >= generic_queue.QueuePriorities.NORMAL
def is_backlog_in_progress(self): def is_backlog_in_progress(self):
for cur_item in self.queue.queue + [self.currentItem]: for cur_item in self.queue.queue:
with search_queue_lock: if isinstance(cur_item, BacklogQueueItem):
if isinstance(cur_item, BacklogQueueItem): return True
return True
return False return False
def add_item(self, item): def add_item(self, item):