mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
autoProcessMovie will now confirm if imdbid only releases are added into database
This commit is contained in:
parent
7ba71fcd3a
commit
dc536448b1
1 changed files with 19 additions and 2 deletions
|
@ -272,8 +272,25 @@ class autoProcessMovie:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if not (download_id or media_id or release_id) and imdbid:
|
if not (download_id or media_id or release_id) and imdbid:
|
||||||
logger.postprocess("Release not found on CouchPotato but is being manually post-processed, Please check CouchPotato to confirm status manually with imdbID %s...", imdbid)
|
url = baseURL + "/media.get"
|
||||||
|
logger.debug("Opening URL: %s", url)
|
||||||
|
|
||||||
|
# we will now check to see if CPS has finished renaming before returning to TorrentToMedia and unpausing.
|
||||||
|
timeout = time.time() + 60 * int(wait_for)
|
||||||
|
while (time.time() < timeout): # only wait 2 (default) minutes, then return.
|
||||||
|
try:
|
||||||
|
r = requests.get(url, params={id:imdbid})
|
||||||
|
except requests.ConnectionError:
|
||||||
|
logger.error("Unable to open URL")
|
||||||
|
return 1 # failure
|
||||||
|
|
||||||
|
result = r.json()
|
||||||
|
if result['success']:
|
||||||
|
logger.postprocess("CouchPotato successfully added %s to it's database ...", nzbName)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
logger.postprocess("CouchPotato was unable to add %s to its database ...", nzbName)
|
||||||
|
return 1
|
||||||
elif not (download_id or media_id or release_id):
|
elif not (download_id or media_id or release_id):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue