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

Fix for scene numbering manually when show has incomplete xem mapping.

Fix for displaying shows scene numbering when show does not exist on xem.
This commit is contained in:
echel0n 2014-05-13 03:03:11 -07:00
parent 9301d29433
commit 2318e43e89
3 changed files with 8 additions and 7 deletions

View File

@ -248,8 +248,10 @@
#if int($show.air_by_date) != 1 and int($show.sports) != 1
#if (epResult["season"], epResult["episode"]) in $xem_numbering:
#set ($dfltSeas, $dfltEpis) = $xem_numbering[(epResult["season"], epResult["episode"])]
#else
#elif $xem_numbering and (epResult["season"], epResult["episode"]) not in $xem_numbering:
#set ($dfltSeas, $dfltEpis) = (0,0)
#else:
#set ($dfltSeas, $dfltEpis) = (epResult["season"], epResult["episode"])
#end if
#if (epResult["season"], epResult["episode"]) in $scene_numbering:
#set ($scSeas, $scEpis) = $scene_numbering[(epResult["season"], epResult["episode"])]

View File

@ -27,7 +27,7 @@ from sickbeard.exceptions import ex
class Scheduler:
def __init__(self, action, cycleTime=datetime.timedelta(minutes=10), runImmediately=True,
threadName="ScheduledThread", silent=False, runOnce=False):
threadName="ScheduledThread", silent=False):
if runImmediately:
self.lastRun = datetime.datetime.fromordinal(1)
@ -44,7 +44,6 @@ class Scheduler:
self.initThread()
self.abort = False
self.runOnce = runOnce
def initThread(self):
if self.thread == None or not self.thread.isAlive():
@ -76,7 +75,7 @@ class Scheduler:
logger.log(u"Exception generated in thread " + self.threadName + ": " + ex(e), logger.ERROR)
logger.log(repr(traceback.format_exc()), logger.DEBUG)
if self.abort or self.runOnce:
if self.abort:
self.abort = False
self.thread = None
return

View File

@ -205,7 +205,9 @@ class TVShow(object):
if ep != None:
self.episodes[season][episode] = ep
return self.episodes[season][episode]
epObj = self.episodes[season][episode]
epObj.convertToSceneNumbering()
return epObj
def should_update(self, update_date=datetime.date.today()):
@ -1158,8 +1160,6 @@ class TVEpisode(object):
self.specifyEpisode(self.season, self.episode)
self.convertToSceneNumbering()
self.relatedEps = []
self.checkForMetaFiles()