From b30ef51b22f38d1daa44b441f6eec6fedd3a1966 Mon Sep 17 00:00:00 2001 From: echel0n Date: Mon, 21 Apr 2014 22:56:30 -0700 Subject: [PATCH] Fixed issue with columns not being unique for xem_numbering table. --- sickbeard/databases/cache_db.py | 10 +--------- sickbeard/scene_numbering.py | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sickbeard/databases/cache_db.py b/sickbeard/databases/cache_db.py index a952d7fb..d5e23b80 100644 --- a/sickbeard/databases/cache_db.py +++ b/sickbeard/databases/cache_db.py @@ -68,11 +68,7 @@ class AddXemNumbering(AddNetworkTimezones): def execute(self): self.connection.action( - "CREATE TABLE xem_numbering (indexer TEXT, indexer_id INTEGER PRIMARY KEY, 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);") - + "CREATE TABLE xem_numbering (indexer TEXT, indexer_id INTEGER, season INTEGER, episode INTEGER, scene_season INTEGER, scene_episode INTEGER)") class AddXemRefresh(AddXemNumbering): def test(self): return self.hasTable("xem_refresh") @@ -81,10 +77,6 @@ class AddXemRefresh(AddXemNumbering): self.connection.action( "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): def test(self): return self.hasColumn("scene_exceptions", "indexer_id") diff --git a/sickbeard/scene_numbering.py b/sickbeard/scene_numbering.py index 6b9d29db..12be1153 100644 --- a/sickbeard/scene_numbering.py +++ b/sickbeard/scene_numbering.py @@ -299,10 +299,10 @@ def _xem_refresh(indexer_id): entry['scene_2']['season'], entry['scene_2']['episode']]) else: 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: 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: logger.log(u"Exception while refreshing XEM data for show " + str(indexer_id) + " on " + sickbeard.indexerApi( indexer).name + ": " + ex(e), logger.WARNING)