mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
autoProcessMovie will not automatically ignore failed releases and try next release in CouchPotato's list.
This commit is contained in:
parent
9157309131
commit
a96bbeea5e
1 changed files with 22 additions and 1 deletions
|
@ -224,7 +224,6 @@ class autoProcessMovie:
|
|||
|
||||
else:
|
||||
logger.postprocess("Download of %s has failed.", nzbName)
|
||||
logger.postprocess("Trying to re-cue the next highest ranked release")
|
||||
|
||||
if not download_id:
|
||||
logger.warning("Cound not find a movie in the database for release %s", nzbName)
|
||||
|
@ -232,9 +231,31 @@ class autoProcessMovie:
|
|||
logger.error("Exiting autoProcessMovie script")
|
||||
return 1 # failure
|
||||
|
||||
logger.postprocess("Ignoring current failed release %s ...", nzbName)
|
||||
|
||||
url = baseURL + "/release.ignore"
|
||||
logger.debug("Opening URL: %s", url)
|
||||
|
||||
try:
|
||||
r = requests.get(url, params={'id':release_id})
|
||||
except requests.ConnectionError:
|
||||
logger.error("Unable to open URL")
|
||||
return 1 # failure
|
||||
|
||||
result = r.json()
|
||||
if result['success']:
|
||||
logger.postprocess("%s has been set to ignored on CouchPotato", nzbName)
|
||||
else:
|
||||
logger.warning("Failed to ignore %s on CouchPotato ...", nzbName)
|
||||
|
||||
logger.postprocess("Snatching next highest ranked release on CouchPotato ...")
|
||||
|
||||
url = baseURL + "/movie.searcher.try_next"
|
||||
logger.debug("Opening URL: %s", url)
|
||||
|
||||
for line in r.iter_lines():
|
||||
if line: logger.postprocess("%s", line)
|
||||
|
||||
try:
|
||||
r = requests.get(url, params={'media_id':media_id}, stream=True)
|
||||
except requests.ConnectionError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue