mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Fix for missing column 'subtitles' during migration from other forks.
Fix for invalid literals when searching for episodes
This commit is contained in:
parent
886753b766
commit
ee6e55aa88
2 changed files with 16 additions and 18 deletions
|
@ -181,7 +181,7 @@ class AddSizeAndSceneNameFields(InitialSchema):
|
|||
|
||||
def execute(self):
|
||||
|
||||
backupDatabase(11)
|
||||
backupDatabase(10)
|
||||
|
||||
if not self.hasColumn("tv_episodes", "file_size"):
|
||||
self.addColumn("tv_episodes", "file_size")
|
||||
|
@ -307,19 +307,6 @@ class RenameSeasonFolders(AddSizeAndSceneNameFields):
|
|||
|
||||
self.incDBVersion()
|
||||
|
||||
|
||||
class AddSubtitlesSupport(RenameSeasonFolders):
|
||||
def test(self):
|
||||
return self.checkDBVersion() >= 12
|
||||
|
||||
def execute(self):
|
||||
self.addColumn("tv_shows", "subtitles")
|
||||
self.addColumn("tv_episodes", "subtitles", "TEXT", "")
|
||||
self.addColumn("tv_episodes", "subtitles_searchcount")
|
||||
self.addColumn("tv_episodes", "subtitles_lastsearch", "TIMESTAMP", str(datetime.datetime.min))
|
||||
self.incDBVersion()
|
||||
|
||||
|
||||
class AddIMDbInfo(RenameSeasonFolders):
|
||||
def test(self):
|
||||
return self.checkDBVersion() >= 13
|
||||
|
@ -547,6 +534,17 @@ class AddDvdOrderOption(AddProperSearch):
|
|||
|
||||
self.incDBVersion()
|
||||
|
||||
class AddSubtitlesSupport(RenameSeasonFolders):
|
||||
def test(self):
|
||||
return self.hasColumn("tv_shows", "subtitles")
|
||||
|
||||
def execute(self):
|
||||
self.addColumn("tv_shows", "subtitles")
|
||||
self.addColumn("tv_episodes", "subtitles", "TEXT", "")
|
||||
self.addColumn("tv_episodes", "subtitles_searchcount")
|
||||
self.addColumn("tv_episodes", "subtitles_lastsearch", "TIMESTAMP", str(datetime.datetime.min))
|
||||
self.incDBVersion()
|
||||
|
||||
class ConvertTVShowsToIndexerScheme(AddDvdOrderOption):
|
||||
def test(self):
|
||||
return self.checkDBVersion() >= 22
|
||||
|
|
|
@ -1849,13 +1849,13 @@ class TVEpisode(object):
|
|||
'%Q.N': dot(Quality.qualityStrings[epQual]),
|
||||
'%Q_N': us(Quality.qualityStrings[epQual]),
|
||||
'%S': str(self.season),
|
||||
'%0S': '%02d' % self.season,
|
||||
'%0S': '%02d' % int(self.season) if not self.show.air_by_date else self.season,
|
||||
'%E': str(self.episode),
|
||||
'%0E': '%02d' % self.episode,
|
||||
'%0E': '%02d' % int(self.episode)if not self.show.air_by_date else self.episode,
|
||||
'%XS': str(self.scene_season),
|
||||
'%0XS': '%02d' % self.scene_season,
|
||||
'%0XS': '%02d' % int(self.scene_season),
|
||||
'%XE': str(self.scene_episode),
|
||||
'%0XE': '%02d' % self.scene_episode,
|
||||
'%0XE': '%02d' % int(self.scene_episode),
|
||||
'%RN': release_name(self.release_name),
|
||||
'%RG': release_group(self.release_name),
|
||||
'%AD': str(self.airdate).replace('-', ' '),
|
||||
|
|
Loading…
Reference in a new issue