mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
autoProcessMovie now gets downloader info from matched release and uses that to send to CouchPotato along with download_id instead of using clientAgent, this fixes an issue with incorrect downloader being sent during manual runs.
This commit is contained in:
parent
29c03bb871
commit
1f48c59960
1 changed files with 5 additions and 4 deletions
|
@ -20,7 +20,7 @@ class autoProcessMovie:
|
|||
release_id = None
|
||||
media_id = None
|
||||
release_status = None
|
||||
matched_release = None
|
||||
downloader = None
|
||||
|
||||
while(True):
|
||||
# find imdbid in nzbName
|
||||
|
@ -90,9 +90,10 @@ class autoProcessMovie:
|
|||
media_id = matched_release['media_id']
|
||||
release_status = matched_release['status']
|
||||
download_id = matched_release['download_info']['id']
|
||||
downloader = matched_release['download_info']['downloader']
|
||||
except:pass
|
||||
|
||||
return media_id, download_id, release_id, release_status
|
||||
return media_id, download_id, release_id, release_status, downloader
|
||||
|
||||
def get_status(self, baseURL, media_id, release_id):
|
||||
logger.debug("Attempting to get current status for movie:%s", media_id)
|
||||
|
@ -164,7 +165,7 @@ class autoProcessMovie:
|
|||
|
||||
baseURL = protocol + host + ":" + port + web_root + "/api/" + apikey
|
||||
|
||||
media_id, download_id, release_id, release_status = self.find_release_info(baseURL, download_id, dirName, nzbName, clientAgent)
|
||||
media_id, download_id, release_id, release_status, downloader = self.find_release_info(baseURL, download_id, dirName, nzbName, clientAgent)
|
||||
|
||||
if release_status:
|
||||
if release_status != "snatched":
|
||||
|
@ -192,7 +193,7 @@ class autoProcessMovie:
|
|||
|
||||
params = {}
|
||||
if download_id:
|
||||
params['downloader'] = nzbtomedia.CLIENTAGENT
|
||||
params['downloader'] = downloader
|
||||
params['download_id'] = download_id
|
||||
|
||||
params['media_folder'] = urllib.quote(dirName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue