Fixed issue #321

This commit is contained in:
echel0n 2014-04-14 09:59:39 -07:00
commit 0e8bc50f14

View file

@ -89,11 +89,7 @@ class autoProcessMusic:
release_status = self.get_status(url, apikey, dirName) release_status = self.get_status(url, apikey, dirName)
if release_status is None: if release_status not in ["Unprocessed", "Snatched"]:
logger.error("Could not find a current status for %s on HeadPhones", nzbName)
return 1
if release_status != "Unprocessed":
logger.error("%s is marked with a status of %s on HeadPhones, skipping ...", nzbName, release_status) logger.error("%s is marked with a status of %s on HeadPhones, skipping ...", nzbName, release_status)
return 0 return 0
@ -116,6 +112,10 @@ class autoProcessMusic:
logger.postprocess("The download failed. Nothing to process") logger.postprocess("The download failed. Nothing to process")
return 0 # Success (as far as this script is concerned) return 0 # Success (as far as this script is concerned)
if release_status is None:
logger.error("Could not find a current status for %s on HeadPhones", nzbName)
return 1
# we will now wait 1 minutes for this album to be processed before returning to TorrentToMedia and unpausing. # we will now wait 1 minutes for this album to be processed before returning to TorrentToMedia and unpausing.
timeout = time.time() + 60 * 2 timeout = time.time() + 60 * 2
while (time.time() < timeout): # only wait 2 (default) minutes, then return. while (time.time() < timeout): # only wait 2 (default) minutes, then return.