From c3b47bec47eda2f3f3799d04d2ab2c87cf420178 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Wed, 5 Nov 2014 13:45:46 +1030 Subject: [PATCH] improve Drone exit conditions. --- nzbtomedia/autoProcess/autoProcessTV.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nzbtomedia/autoProcess/autoProcessTV.py b/nzbtomedia/autoProcess/autoProcessTV.py index 2ae9ebcb..29b4d34b 100644 --- a/nzbtomedia/autoProcess/autoProcessTV.py +++ b/nzbtomedia/autoProcess/autoProcessTV.py @@ -317,15 +317,12 @@ class autoProcessTV: return [0, "%s: Successfully post-processed %s" % (section, inputName) ] elif command_status and command_status in ['failed']: logger.debug("The Scan command has failed. Renaming was not successful.", section) - return [1, "%s: Failed to post-process %s" % (section, inputName) ] - elif command_status and command_status in ['pending', 'running']: - logger.warning("The Scan has not finished after %s minutes. Renaming was not successful." % wait_for , section) - return [1, "%s: Failed to post-process %s" % (section, inputName) ] - elif self.CDH(url2, headers) and clientAgent in ['sabnzbd', 'nzbget']: - logger.debug("Commadn Processing failed, but complete DownLoad Handling is enabled. Passing back to %s." % (section), section) + #return [1, "%s: Failed to post-process %s" % (section, inputName) ] + if self.CDH(url2, headers) and clientAgent in ['sabnzbd', 'nzbget']: + logger.debug("The Scan command did not return status completed, but complete Download Handling is enabled. Passing back to %s." % (section), section) return [status, "%s: Complete DownLoad Handling is enabled. Passing back to %s" % (section, section) ] else: - logger.warning("The Scan did not return a valid status. Renaming was not successful.", section) + logger.warning("The Scan command did not return a valid status. Renaming was not successful.", section) return [1, "%s: Failed to post-process %s" % (section, inputName) ] else: return [1, "%s: Failed to post-process - Returned log from %s was not as expected." % (section, section) ] # We did not receive Success confirmation.