1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 11:32:20 -05:00

Fix for scene numbering during post-processing

This commit is contained in:
echel0n 2014-05-03 04:10:20 -07:00
parent c2e79bf031
commit dfd6f38cfe
2 changed files with 10 additions and 5 deletions

View File

@ -626,7 +626,7 @@ class PostProcessor(object):
# now that we've figured out which episode this file is just load it manually
try:
# convert scene numbered release and load episode from database
curEp = show_obj.getEpisode(scene_season=season, scene_episode=cur_episode)
curEp = show_obj.getEpisode(season, cur_episode, scene=True)
except exceptions.EpisodeNotFoundException, e:
self._log(u"Unable to create episode: " + ex(e), logger.DEBUG)
raise exceptions.PostProcessingFailed()

View File

@ -182,7 +182,7 @@ class TVShow(object):
return ep_list
def getEpisode(self, season, episode, file=None, noCreate=False):
def getEpisode(self, season, episode, file=None, noCreate=False, scene=False):
if not season in self.episodes:
self.episodes[season] = {}
@ -197,10 +197,15 @@ class TVShow(object):
episode) + " didn't exist in the cache, trying to create it", logger.DEBUG)
if file != None:
ep = TVEpisode(self, season, episode, file)
if scene:
ep = TVEpisode(self, scene_season=season, scene_episode=episode, file=file)
else:
ep = TVEpisode(self, season, episode, file)
else:
ep = TVEpisode(self, season, episode)
if scene:
ep = TVEpisode(self, scene_season=season, scene_episode=episode)
else:
ep = TVEpisode(self, season, episode, file)
if ep != None:
self.episodes[season][episode] = ep