From 1fc8e89aeeeb5e4039c8df889b2b76ecb1ef616c Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 11 May 2014 07:56:23 -0700 Subject: [PATCH] Fix for _getLoadingShowList errors --- sickbeard/show_queue.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sickbeard/show_queue.py b/sickbeard/show_queue.py index 7a6a37f8..1070c1f5 100644 --- a/sickbeard/show_queue.py +++ b/sickbeard/show_queue.py @@ -43,7 +43,7 @@ class ShowQueue(generic_queue.GenericQueue): self.queue = show_queue def _isInQueue(self, show, actions): - return show in [x.show for x in self.queue.get() if x.action_id in actions] if not self.queue.empty() else [] + return show in [x.show for x in self.queue.queue if x.action_id in actions] if not self.queue.empty() else [] def _isBeingSomethinged(self, show, actions): return self.currentItem != None and show == self.currentItem.show and \ @@ -77,7 +77,11 @@ class ShowQueue(generic_queue.GenericQueue): return self._isBeingSomethinged(show, (ShowQueueActions.SUBTITLE,)) def _getLoadingShowList(self): - return [x for x in self.queue.get() if x != None and x.isLoading] + [self.currentItem] if not self.queue.empty() else [] + queue = [] + while not self.queue.empty(): + queueItem = self.queue.get() + queue.append(queueItem) + return [x for x in queue if x != None and x.isLoading] if not self.queue.empty() else [] loadingShowList = property(_getLoadingShowList)