1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 11:32:20 -05:00

Fixed scene exceptions issue when editing shows.

This commit is contained in:
echel0n 2014-07-27 07:14:41 -07:00
parent 9493a8f7e5
commit b5e0282942
2 changed files with 6 additions and 6 deletions

View File

@ -252,7 +252,7 @@ def retrieve_exceptions():
anidb_exception_dict.clear()
xem_exception_dict.clear()
def update_scene_exceptions(indexer_id, scene_exceptions):
def update_scene_exceptions(indexer_id, scene_exceptions, season=-1):
"""
Given a indexer_id, and a list of all show scene exceptions, update the db.
"""
@ -267,7 +267,7 @@ def update_scene_exceptions(indexer_id, scene_exceptions):
cur_exception = unicode(cur_exception, 'utf-8', 'replace')
myDB.action("INSERT INTO scene_exceptions (indexer_id, show_name, season) VALUES (?,?,?)",
[indexer_id, cur_exception, -1])
[indexer_id, cur_exception, season])
def _anidb_exceptions_fetcher():
global anidb_exception_dict

View File

@ -3631,14 +3631,15 @@ class Home(MainHandler):
return self._genericMessage("Error", errString)
showObj = sickbeard.helpers.findCertainShow(sickbeard.showList, int(show))
if showObj is None:
if not showObj:
errString = "Unable to find the specified show: " + str(show)
if directCall:
return [errString]
else:
return self._genericMessage("Error", errString)
showObj.exceptions = scene_exceptions.get_scene_exceptions(showObj.indexerid)
if not location and not anyQualities and not bestQualities and not flatten_folders:
t = PageTemplate(headers=self.request.headers, file="editShow.tmpl")
t.submenu = HomeMenu()
@ -3855,8 +3856,7 @@ class Home(MainHandler):
if do_update_exceptions:
try:
scene_exceptions.update_scene_exceptions(showObj.indexerid, exceptions_list) # @UndefinedVariable
showObj.exceptions = scene_exceptions.get_scene_exceptions(showObj.indexerid)
scene_exceptions.update_scene_exceptions(showObj.indexerid, exceptions_list) # @UndefinedVdexerid)
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
except exceptions.CantUpdateException, e:
errors.append("Unable to force an update on scene exceptions of the show.")