diff --git a/gui/slick/interfaces/default/editShow.tmpl b/gui/slick/interfaces/default/editShow.tmpl
index 58509352..11481434 100644
--- a/gui/slick/interfaces/default/editShow.tmpl
+++ b/gui/slick/interfaces/default/editShow.tmpl
@@ -144,7 +144,7 @@ Results without one of these words in the title will be filtered out
Separate words with a comma, e.g. "word1,word2,word3"
-#if $show.is_anime
+#if $show.is_anime:
#from sickbeard.blackandwhitelist import *
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_blackwhitelist.tmpl")
#end if
diff --git a/lib/adba/.gitignore b/lib/adba/.gitignore
new file mode 100644
index 00000000..6722cd96
--- /dev/null
+++ b/lib/adba/.gitignore
@@ -0,0 +1 @@
+*.xml
diff --git a/sickbeard/generic_queue.py b/sickbeard/generic_queue.py
index 92018ea6..67e95df1 100644
--- a/sickbeard/generic_queue.py
+++ b/sickbeard/generic_queue.py
@@ -31,15 +31,15 @@ class QueuePriorities:
class GenericQueue(object):
def __init__(self):
+ self.queueItem = None
self.currentItem = None
+
self.queue = []
self.queue_name = "QUEUE"
self.min_priority = 0
- self.currentItem = None
-
self.lock = threading.Lock()
def pause(self):
@@ -58,13 +58,14 @@ class GenericQueue(object):
def run(self, force=False):
- # if the thread is dead then the current item should be finished
- if self.currentItem is not None:
- self.currentItem.finish()
- self.currentItem = None
-
# only start a new task if one isn't already going
- if not self.currentItem or not self.currentItem.isAlive():
+ if self.queueItem is None or not self.queueItem.isAlive():
+
+ # if the thread is dead then the current item should be finished
+ if self.currentItem != None:
+ self.currentItem.finish()
+ self.currentItem = None
+
# if there's something in the queue then run it in a thread and take it out of the queue
if len(self.queue) > 0:
@@ -109,13 +110,13 @@ class QueueItem(threading.Thread):
self.priority = QueuePriorities.NORMAL
self.action_id = action_id
self.added = None
- self.alive = True
self.stop = threading.Event()
def run(self):
"""Implementing classes should call this"""
self.inProgress = True
+ self.alive = True
def finish(self):
"""Implementing Classes should call this"""
diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py
index f2d00ab7..00940669 100644
--- a/sickbeard/webserve.py
+++ b/sickbeard/webserve.py
@@ -3659,31 +3659,34 @@ class Home(MainHandler):
t = PageTemplate(headers=self.request.headers, file="editShow.tmpl")
t.submenu = HomeMenu()
- if showObj.is_anime:
- bwl = BlackAndWhiteList(showObj.indexerid)
- t.whiteWords = ""
- if "global" in bwl.whiteDict:
- t.whiteWords = ", ".join(bwl.whiteDict["global"])
- t.blackWords = ""
- if "global" in bwl.blackDict:
- t.blackWords = ", ".join(bwl.blackDict["global"])
-
- t.whitelist = []
- if bwl.whiteDict.has_key("release_group"):
- t.whitelist = bwl.whiteDict["release_group"]
-
- t.blacklist = []
- if bwl.blackDict.has_key("release_group"):
- t.blacklist = bwl.blackDict["release_group"]
-
- t.groups = []
- if helpers.set_up_anidb_connection():
- anime = adba.Anime(sickbeard.ADBA_CONNECTION, name=showObj.name)
- t.groups = anime.get_groups()
-
with showObj.lock:
t.show = showObj
+ if showObj.is_anime:
+ t.whiteWords = ""
+ t.whitelist = []
+
+ t.blackWords = ""
+ t.blacklist = []
+
+ t.groups = []
+
+ bwl = BlackAndWhiteList(showObj.indexerid)
+ if "global" in bwl.whiteDict:
+ t.whiteWords = ", ".join(bwl.whiteDict["global"])
+ if "global" in bwl.blackDict:
+ t.blackWords = ", ".join(bwl.blackDict["global"])
+
+ if bwl.whiteDict.has_key("release_group"):
+ t.whitelist = bwl.whiteDict["release_group"]
+
+ if bwl.blackDict.has_key("release_group"):
+ t.blacklist = bwl.blackDict["release_group"]
+
+ if helpers.set_up_anidb_connection():
+ anime = adba.Anime(sickbeard.ADBA_CONNECTION, name=showObj.name)
+ t.groups = anime.get_groups()
+
t.scene_exceptions = get_scene_exceptions(showObj.indexerid)
return _munge(t)