mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 03:22:22 -05:00
Fix for managing searches
This commit is contained in:
parent
f8035e800e
commit
f7ded2a4ed
@ -24,15 +24,6 @@ Not in progress<br />
|
||||
#if $backlogPaused then "Paused: " else ""#
|
||||
Currently running<br />
|
||||
#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 />
|
||||
|
||||
<h3>Version Check:</h3>
|
||||
|
@ -30,8 +30,6 @@ from sickbeard import generic_queue, scheduler
|
||||
from sickbeard import search, failed_history, history
|
||||
from sickbeard import ui
|
||||
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()
|
||||
|
||||
@ -72,10 +70,9 @@ class SearchQueue(generic_queue.GenericQueue):
|
||||
return self.min_priority >= generic_queue.QueuePriorities.NORMAL
|
||||
|
||||
def is_backlog_in_progress(self):
|
||||
for cur_item in self.queue.queue + [self.currentItem]:
|
||||
with search_queue_lock:
|
||||
if isinstance(cur_item, BacklogQueueItem):
|
||||
return True
|
||||
for cur_item in self.queue.queue:
|
||||
if isinstance(cur_item, BacklogQueueItem):
|
||||
return True
|
||||
return False
|
||||
|
||||
def add_item(self, item):
|
||||
|
Loading…
Reference in New Issue
Block a user