mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Fixed issue with columns not being unique for xem_numbering table.
This commit is contained in:
parent
ea38289dd8
commit
b30ef51b22
2 changed files with 3 additions and 11 deletions
|
@ -68,11 +68,7 @@ class AddXemNumbering(AddNetworkTimezones):
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
self.connection.action(
|
self.connection.action(
|
||||||
"CREATE TABLE xem_numbering (indexer TEXT, indexer_id INTEGER PRIMARY KEY, season INTEGER, episode INTEGER, scene_season INTEGER, scene_episode INTEGER)")
|
"CREATE TABLE xem_numbering (indexer TEXT, indexer_id INTEGER, season INTEGER, episode INTEGER, scene_season INTEGER, scene_episode INTEGER)")
|
||||||
|
|
||||||
self.connection.action(
|
|
||||||
"CREATE UNIQUE INDEX idx_xem_numbering_indexer_id ON xem_numbering (indexer_id);")
|
|
||||||
|
|
||||||
class AddXemRefresh(AddXemNumbering):
|
class AddXemRefresh(AddXemNumbering):
|
||||||
def test(self):
|
def test(self):
|
||||||
return self.hasTable("xem_refresh")
|
return self.hasTable("xem_refresh")
|
||||||
|
@ -81,10 +77,6 @@ class AddXemRefresh(AddXemNumbering):
|
||||||
self.connection.action(
|
self.connection.action(
|
||||||
"CREATE TABLE xem_refresh (indexer TEXT, indexer_id INTEGER PRIMARY KEY, last_refreshed INTEGER)")
|
"CREATE TABLE xem_refresh (indexer TEXT, indexer_id INTEGER PRIMARY KEY, last_refreshed INTEGER)")
|
||||||
|
|
||||||
self.connection.action(
|
|
||||||
"CREATE INDEX idx_xem_refresh_indexer_id ON xem_refresh (indexer_id);")
|
|
||||||
|
|
||||||
|
|
||||||
class ConvertSceneExceptionsToIndexerID(AddXemRefresh):
|
class ConvertSceneExceptionsToIndexerID(AddXemRefresh):
|
||||||
def test(self):
|
def test(self):
|
||||||
return self.hasColumn("scene_exceptions", "indexer_id")
|
return self.hasColumn("scene_exceptions", "indexer_id")
|
||||||
|
|
|
@ -299,10 +299,10 @@ def _xem_refresh(indexer_id):
|
||||||
entry['scene_2']['season'], entry['scene_2']['episode']])
|
entry['scene_2']['season'], entry['scene_2']['episode']])
|
||||||
else:
|
else:
|
||||||
logger.log(u'Failed to get XEM scene data for show %s from %s because "%s"' % (
|
logger.log(u'Failed to get XEM scene data for show %s from %s because "%s"' % (
|
||||||
indexer_id, sickbeard.indexerApi(indexer).name, result['message']), logger.MESSAGE)
|
indexer_id, sickbeard.indexerApi(indexer).name, result['message']), logger.DEBUG)
|
||||||
else:
|
else:
|
||||||
logger.log(u"Empty lookup result - no XEM data for show %s on %s" % (
|
logger.log(u"Empty lookup result - no XEM data for show %s on %s" % (
|
||||||
indexer_id, sickbeard.indexerApi(indexer).name,), logger.MESSAGE)
|
indexer_id, sickbeard.indexerApi(indexer).name,), logger.DEBUG)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logger.log(u"Exception while refreshing XEM data for show " + str(indexer_id) + " on " + sickbeard.indexerApi(
|
logger.log(u"Exception while refreshing XEM data for show " + str(indexer_id) + " on " + sickbeard.indexerApi(
|
||||||
indexer).name + ": " + ex(e), logger.WARNING)
|
indexer).name + ": " + ex(e), logger.WARNING)
|
||||||
|
|
Loading…
Reference in a new issue