mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Fixed inital scene numbering database check to look for a value of -1 before updating to insure this record gets done at startup once and once only
This commit is contained in:
parent
b6f7753ec7
commit
c2e79bf031
1 changed files with 3 additions and 3 deletions
|
@ -129,7 +129,7 @@ class MainSanityCheck(db.DBSanityCheck):
|
||||||
ql = []
|
ql = []
|
||||||
|
|
||||||
sqlResults = self.connection.select(
|
sqlResults = self.connection.select(
|
||||||
"SELECT showid, indexerid, indexer, episode_id, season, episode FROM tv_episodes WHERE scene_season = 0 OR scene_episode = 0")
|
"SELECT showid, indexerid, indexer, episode_id, season, episode FROM tv_episodes WHERE scene_season = -1 OR scene_episode = -1")
|
||||||
|
|
||||||
for epResult in sqlResults:
|
for epResult in sqlResults:
|
||||||
indexerid = int(str(epResult["showid"]).encode('UTF-8'))
|
indexerid = int(str(epResult["showid"]).encode('UTF-8'))
|
||||||
|
@ -785,9 +785,9 @@ class AddSceneNumberingToTvEpisodes(AddSportsOption):
|
||||||
|
|
||||||
logger.log(u"Adding column scene_season and scene_episode to tvepisodes")
|
logger.log(u"Adding column scene_season and scene_episode to tvepisodes")
|
||||||
if not self.hasColumn("tv_episodes", "scene_season"):
|
if not self.hasColumn("tv_episodes", "scene_season"):
|
||||||
self.addColumn("tv_episodes", "scene_season", "NUMERIC", "0")
|
self.addColumn("tv_episodes", "scene_season", "NUMERIC", -1)
|
||||||
|
|
||||||
if not self.hasColumn("tv_episodes", "scene_episode"):
|
if not self.hasColumn("tv_episodes", "scene_episode"):
|
||||||
self.addColumn("tv_episodes", "scene_episode", "NUMERIC", "0")
|
self.addColumn("tv_episodes", "scene_episode", "NUMERIC", -1)
|
||||||
|
|
||||||
self.incDBVersion()
|
self.incDBVersion()
|
Loading…
Reference in a new issue