mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 01:43:37 +00:00
This fixes all failed download issues
This commit is contained in:
parent
a12085cbfc
commit
d616ca2298
2 changed files with 32 additions and 28 deletions
|
@ -393,6 +393,8 @@ def delete_dir(processPath):
|
||||||
|
|
||||||
|
|
||||||
def get_path_dir_files(dirName, nzbName, type):
|
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
|
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
|
#Get at first all the subdir in the dirName
|
||||||
for path, dirs, files in ek.ek(os.walk, dirName):
|
for path, dirs, files in ek.ek(os.walk, dirName):
|
||||||
|
@ -416,6 +418,8 @@ def process_failed(dirName, nzbName):
|
||||||
global returnStr
|
global returnStr
|
||||||
|
|
||||||
if sickbeard.USE_FAILED_DOWNLOADS:
|
if sickbeard.USE_FAILED_DOWNLOADS:
|
||||||
|
processor = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
processor = failedProcessor.FailedProcessor(dirName, nzbName)
|
processor = failedProcessor.FailedProcessor(dirName, nzbName)
|
||||||
process_result = processor.process()
|
process_result = processor.process()
|
||||||
|
@ -424,6 +428,7 @@ def process_failed(dirName, nzbName):
|
||||||
process_result = False
|
process_result = False
|
||||||
process_fail_message = ex(e)
|
process_fail_message = ex(e)
|
||||||
|
|
||||||
|
if processor:
|
||||||
returnStr += processor.log
|
returnStr += processor.log
|
||||||
|
|
||||||
if sickbeard.DELETE_FAILED and process_result:
|
if sickbeard.DELETE_FAILED and process_result:
|
||||||
|
|
|
@ -212,9 +212,8 @@ class FailedQueueItem(generic_queue.QueueItem):
|
||||||
def execute(self):
|
def execute(self):
|
||||||
generic_queue.QueueItem.execute(self)
|
generic_queue.QueueItem.execute(self)
|
||||||
|
|
||||||
for season in self.segment:
|
for season, episodes in self.segment.items():
|
||||||
epObj = self.segment[season]
|
for epObj in episodes:
|
||||||
|
|
||||||
(release, provider) = failed_history.findRelease(epObj)
|
(release, provider) = failed_history.findRelease(epObj)
|
||||||
if release:
|
if release:
|
||||||
logger.log(u"Marking release as bad: " + release)
|
logger.log(u"Marking release as bad: " + release)
|
||||||
|
@ -241,7 +240,7 @@ class FailedQueueItem(generic_queue.QueueItem):
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
else:
|
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:
|
except Exception, e:
|
||||||
logger.log(traceback.format_exc(), logger.DEBUG)
|
logger.log(traceback.format_exc(), logger.DEBUG)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue