From 686761a7e475d4a6d1a9aed9aa5e5de7719b9bda Mon Sep 17 00:00:00 2001 From: JoopNL Date: Thu, 11 Feb 2016 23:18:27 +0100 Subject: [PATCH 1/2] Report Downloader failures to SickRage When extraction is done by SickRage, report failures from Downloader to SickRage. For example, when download fails in SAB because out of retention SAB reports failed status -1. Or when verification fails SAB reports failed status 1. In such cases also report failure to SickRage. Without this fix, this results in "Returned log from SickBeard was not as expected.!" --- core/autoProcess/autoProcessTV.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/autoProcess/autoProcessTV.py b/core/autoProcess/autoProcessTV.py index ed5e8da1..1880f840 100644 --- a/core/autoProcess/autoProcessTV.py +++ b/core/autoProcess/autoProcessTV.py @@ -176,9 +176,15 @@ class autoProcessTV: logger.warning("No media files found in directory %s to manually process." % (dirName), section) return [0, ""] # Success (as far as this script is concerned) elif nzbExtractionBy == "Destination": - logger.info("Check for media files ignored because nzbExtractionBy is set to Destination. Setting status Success.") - status = 0 - failed = 0 + logger.info("Check for media files ignored because nzbExtractionBy is set to Destination.") + if failed == 0: + logger.info("Setting Status Success.") + status = 0 + failed = 0 + else: + logger.info("Downloader reported an error during download or verification. Processing this as a failed download.") + status = 1 + failed = 1 else: logger.warning("No media files found in directory %s. Processing this as a failed download" % (dirName), section) status = 1 From 04de8aa2517c44b89f87fd840c28f824c7a77f75 Mon Sep 17 00:00:00 2001 From: JoopNL Date: Thu, 11 Feb 2016 23:53:11 +0100 Subject: [PATCH 2/2] Update autoProcessTV.py --- core/autoProcess/autoProcessTV.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autoProcess/autoProcessTV.py b/core/autoProcess/autoProcessTV.py index 1880f840..7912efa4 100644 --- a/core/autoProcess/autoProcessTV.py +++ b/core/autoProcess/autoProcessTV.py @@ -177,7 +177,7 @@ class autoProcessTV: return [0, ""] # Success (as far as this script is concerned) elif nzbExtractionBy == "Destination": logger.info("Check for media files ignored because nzbExtractionBy is set to Destination.") - if failed == 0: + if failed == "0": logger.info("Setting Status Success.") status = 0 failed = 0