1
0
mirror of https://github.com/moparisthebest/SickRage synced 2025-01-05 19:08:02 -05:00

Fxi for failed downloads

This commit is contained in:
echel0n 2014-05-19 10:53:47 -07:00
parent 854de69683
commit a12085cbfc
2 changed files with 18 additions and 19 deletions

View File

@ -53,6 +53,7 @@ class FailedProcessor(object):
raise exceptions.FailedProcessingFailed()
parser = NameParser(False)
try:
parsed = parser.parse(releaseName)
except InvalidNameException:
@ -75,7 +76,9 @@ class FailedProcessor(object):
logger.WARNING)
raise exceptions.FailedProcessingFailed()
# scene -> indexer numbering
parsed = parsed.convert(self._show_obj)
segment = {parsed.season_number:[]}
for episode in parsed.episode_numbers:
epObj = self._show_obj.getEpisode(parsed.season_number, episode)

View File

@ -212,7 +212,6 @@ class FailedQueueItem(generic_queue.QueueItem):
def execute(self):
generic_queue.QueueItem.execute(self)
failed_episodes = []
for season in self.segment:
epObj = self.segment[season]
@ -223,14 +222,11 @@ class FailedQueueItem(generic_queue.QueueItem):
failed_history.logFailed(release)
history.logFailed(epObj, release, provider)
failed_history.revertEpisode(epObj)
failed_episodes.append(epObj)
logger.log(
"Beginning failed download search for [" + epObj.prettyName() + "]")
if len(failed_episodes):
try:
searchResult = search.searchProviders(self.show, failed_episodes[0].season, failed_episodes, True)
searchResult = search.searchProviders(self.show, season, [epObj], True)
# reset thread back to original name
threading.currentThread().name = self.thread_name