1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 03:22:22 -05:00

Merge branch 'origin/dev'

This commit is contained in:
echel0n 2014-04-21 22:56:40 -07:00
commit 423cbf4b84
2 changed files with 3 additions and 11 deletions

View File

@ -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")

View File

@ -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)