mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-05 19:08:02 -05:00
Fix for adding new and existing shows not showing up in show list
This commit is contained in:
parent
3ad6bf38b5
commit
f742f8a51a
@ -33,17 +33,19 @@ from sickbeard import name_cache
|
|||||||
from sickbeard.exceptions import ex
|
from sickbeard.exceptions import ex
|
||||||
|
|
||||||
show_queue_lock = threading.Lock()
|
show_queue_lock = threading.Lock()
|
||||||
show_queue = Queue.Queue()
|
|
||||||
|
|
||||||
class ShowQueue(generic_queue.GenericQueue):
|
class ShowQueue(generic_queue.GenericQueue):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
generic_queue.GenericQueue.__init__(self)
|
generic_queue.GenericQueue.__init__(self)
|
||||||
self.queue_name = "SHOWQUEUE"
|
self.queue_name = "SHOWQUEUE"
|
||||||
self.queue = show_queue
|
|
||||||
|
|
||||||
def _isInQueue(self, show, actions):
|
def _isInQueue(self, show, actions):
|
||||||
return show in [x.show for x in self.queue.queue if x.action_id in actions] if not self.queue.empty() else []
|
shows = [x.show for x in self.queue.queue if x.action_id in actions] if not self.queue.empty() else []
|
||||||
|
if self.currentItem.action_id in actions:
|
||||||
|
shows.append(self.currentItem)
|
||||||
|
|
||||||
|
return show in shows
|
||||||
|
|
||||||
def _isBeingSomethinged(self, show, actions):
|
def _isBeingSomethinged(self, show, actions):
|
||||||
return self.currentItem != None and show == self.currentItem.show and \
|
return self.currentItem != None and show == self.currentItem.show and \
|
||||||
@ -77,11 +79,10 @@ class ShowQueue(generic_queue.GenericQueue):
|
|||||||
return self._isBeingSomethinged(show, (ShowQueueActions.SUBTITLE,))
|
return self._isBeingSomethinged(show, (ShowQueueActions.SUBTITLE,))
|
||||||
|
|
||||||
def _getLoadingShowList(self):
|
def _getLoadingShowList(self):
|
||||||
queue = []
|
shows = [x for x in self.queue.queue if x != None and x.isLoading] if not self.queue.empty() else []
|
||||||
while not self.queue.empty():
|
if self.currentItem != None and self.currentItem.isLoading:
|
||||||
queueItem = self.queue.get()
|
shows.append(self.currentItem)
|
||||||
queue.append(queueItem)
|
return shows
|
||||||
return [x for x in queue if x != None and x.isLoading] if not self.queue.empty() else []
|
|
||||||
|
|
||||||
|
|
||||||
loadingShowList = property(_getLoadingShowList)
|
loadingShowList = property(_getLoadingShowList)
|
||||||
@ -186,7 +187,9 @@ class ShowQueueItem(generic_queue.QueueItem):
|
|||||||
self.show = show
|
self.show = show
|
||||||
|
|
||||||
def isInQueue(self):
|
def isInQueue(self):
|
||||||
return self in sickbeard.showQueueScheduler.action.queue.queue + [sickbeard.showQueueScheduler.action.currentItem]
|
queue = [x for x in sickbeard.showQueueScheduler.action.queue.queue]
|
||||||
|
queue.append(sickbeard.showQueueScheduler.action.currentItem)
|
||||||
|
return self in queue
|
||||||
|
|
||||||
def _getName(self):
|
def _getName(self):
|
||||||
return str(self.show.indexerid)
|
return str(self.show.indexerid)
|
||||||
|
Loading…
Reference in New Issue
Block a user