mirror of
https://github.com/moparisthebest/SickRage
synced 2024-10-31 15:35:01 -04:00
Fixed whitelist error when editing shows, needs more code changes to fully function correctly.
Possible fix for threading exceptions.
This commit is contained in:
parent
546f7c00b4
commit
7f20f5e27f
@ -144,7 +144,7 @@ Results without one of these words in the title will be filtered out <br />
|
||||
Separate words with a comma, e.g. "word1,word2,word3"
|
||||
<br /><br />
|
||||
|
||||
#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
|
||||
|
1
lib/adba/.gitignore
vendored
Normal file
1
lib/adba/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.xml
|
@ -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):
|
||||
|
||||
# only start a new task if one isn't already going
|
||||
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 is not None:
|
||||
if self.currentItem != 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 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"""
|
||||
|
@ -3659,31 +3659,34 @@ class Home(MainHandler):
|
||||
t = PageTemplate(headers=self.request.headers, file="editShow.tmpl")
|
||||
t.submenu = HomeMenu()
|
||||
|
||||
with showObj.lock:
|
||||
t.show = showObj
|
||||
|
||||
if showObj.is_anime:
|
||||
bwl = BlackAndWhiteList(showObj.indexerid)
|
||||
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"])
|
||||
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
|
||||
|
||||
t.scene_exceptions = get_scene_exceptions(showObj.indexerid)
|
||||
|
||||
return _munge(t)
|
||||
|
Loading…
Reference in New Issue
Block a user