mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
add download id. Fixes #583
Ref. https://github.com/Sonarr/Sonarr/pull/130
This commit is contained in:
parent
9b32b2bdcb
commit
13a45b6aab
4 changed files with 35 additions and 6 deletions
|
@ -506,6 +506,9 @@ def process(inputDirectory, inputName=None, status=0, clientAgent='manual', down
|
|||
inputDirectory))
|
||||
return [-1, ""]
|
||||
|
||||
if not download_id and clientAgent == 'sabnzbd':
|
||||
download_id = get_nzoid(inputName)
|
||||
|
||||
if clientAgent != 'manual' and not nzbtomedia.DOWNLOADINFO:
|
||||
logger.debug('Adding NZB download info for directory %s to database' % (inputDirectory))
|
||||
|
||||
|
@ -580,7 +583,7 @@ def process(inputDirectory, inputName=None, status=0, clientAgent='manual', down
|
|||
inputCategory, failureLink)
|
||||
elif sectionName in ["SickBeard", "NzbDrone"]:
|
||||
result = autoProcessTV().processEpisode(sectionName, inputDirectory, inputName, status, clientAgent,
|
||||
inputCategory, failureLink)
|
||||
download_id, inputCategory, failureLink)
|
||||
elif sectionName == "HeadPhones":
|
||||
result = autoProcessMusic().process(sectionName, inputDirectory, inputName, status, clientAgent, inputCategory)
|
||||
elif sectionName == "Mylar":
|
||||
|
@ -667,6 +670,8 @@ def main(args, section=None):
|
|||
failureLink = None
|
||||
if os.environ.has_key('NZBPR_COUCHPOTATO'):
|
||||
download_id = os.environ['NZBPR_COUCHPOTATO']
|
||||
elif os.environ.has_key('NZBPR_DRONE'):
|
||||
download_id = os.environ['NZBPR_DRONE']
|
||||
if os.environ.has_key('NZBPR__DNZB_FAILURE'):
|
||||
failureLink = os.environ['NZBPR__DNZB_FAILURE']
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue