mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Fixed issue with scene exception updating for custom names.
This commit is contained in:
parent
9b78e3dc5e
commit
78c4211925
@ -73,4 +73,11 @@ class AddSceneExceptionsSeasons(AddSceneNameCache):
|
|||||||
return self.hasColumn("scene_exceptions", "season")
|
return self.hasColumn("scene_exceptions", "season")
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
self.addColumn("scene_exceptions", "season", "NUMERIC", -1)
|
self.addColumn("scene_exceptions", "season", "NUMERIC", -1)
|
||||||
|
|
||||||
|
class AddSceneExceptionsCustom(AddSceneExceptionsSeasons):
|
||||||
|
def test(self):
|
||||||
|
return self.hasColumn("scene_exceptions", "custom")
|
||||||
|
|
||||||
|
def execute(self):
|
||||||
|
self.addColumn("scene_exceptions", "custom", "NUMERIC", 0)
|
@ -216,13 +216,14 @@ def update_scene_exceptions(indexer_id, scene_exceptions):
|
|||||||
|
|
||||||
myDB = db.DBConnection("cache.db")
|
myDB = db.DBConnection("cache.db")
|
||||||
|
|
||||||
myDB.action('DELETE FROM scene_exceptions WHERE indexer_id=?', [indexer_id])
|
myDB.action('DELETE FROM scene_exceptions WHERE indexer_id=? and custom=1', [indexer_id])
|
||||||
|
|
||||||
logger.log(u"Updating internal scene name cache", logger.MESSAGE)
|
logger.log(u"Updating internal scene name cache", logger.MESSAGE)
|
||||||
for cur_exception, cur_season in scene_exceptions:
|
for cur_season in [-1] + sickbeard.scene_exceptions.get_scene_seasons(indexer_id):
|
||||||
exceptionIndexerCache[helpers.full_sanitizeSceneName(cur_exception)] = indexer_id
|
for cur_exception in scene_exceptions:
|
||||||
myDB.action("INSERT INTO scene_exceptions (indexer_id, show_name, season) VALUES (?,?,?)",
|
exceptionIndexerCache[helpers.full_sanitizeSceneName(cur_exception)] = indexer_id
|
||||||
[indexer_id, cur_exception, cur_season])
|
myDB.action("INSERT INTO scene_exceptions (indexer_id, show_name, season, custom) VALUES (?,?,?,?)",
|
||||||
|
[indexer_id, cur_exception, cur_season, 1])
|
||||||
|
|
||||||
name_cache.clearCache()
|
name_cache.clearCache()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user