This fixes all failed download issues

This commit is contained in:
echel0n 2014-05-19 12:20:33 -07:00
parent a12085cbfc
commit d616ca2298
2 changed files with 32 additions and 28 deletions

View file

@ -393,6 +393,8 @@ def delete_dir(processPath):
def get_path_dir_files(dirName, nzbName, type):
path, dirs, files = None
if dirName == sickbeard.TV_DOWNLOAD_DIR and not nzbName or type == "manual": #Scheduled Post Processing Active
#Get at first all the subdir in the dirName
for path, dirs, files in ek.ek(os.walk, dirName):
@ -416,6 +418,8 @@ def process_failed(dirName, nzbName):
global returnStr
if sickbeard.USE_FAILED_DOWNLOADS:
processor = None
try:
processor = failedProcessor.FailedProcessor(dirName, nzbName)
process_result = processor.process()
@ -424,6 +428,7 @@ def process_failed(dirName, nzbName):
process_result = False
process_fail_message = ex(e)
if processor:
returnStr += processor.log
if sickbeard.DELETE_FAILED and process_result:

View file

@ -212,9 +212,8 @@ class FailedQueueItem(generic_queue.QueueItem):
def execute(self):
generic_queue.QueueItem.execute(self)
for season in self.segment:
epObj = self.segment[season]
for season, episodes in self.segment.items():
for epObj in episodes:
(release, provider) = failed_history.findRelease(epObj)
if release:
logger.log(u"Marking release as bad: " + release)
@ -241,7 +240,7 @@ class FailedQueueItem(generic_queue.QueueItem):
time.sleep(2)
else:
logger.log(u"No episodes found to retry for failed downloads return from providers!")
logger.log(u"No valid episode found to retry for [" + epObj.prettyName() + "]")
except Exception, e:
logger.log(traceback.format_exc(), logger.DEBUG)