IMP: Added nzo_id reference to on-snatch call for sabnzbd snatches

This commit is contained in:
evilhero 2018-03-16 14:15:45 -04:00
parent 4508f62b5b
commit 7fe9fa7e78
2 changed files with 5 additions and 0 deletions

View File

@ -3036,6 +3036,8 @@ def script_env(mode, vars):
os.environ['mylar_release_files'] = "|".join(json.dumps(vars['torrentinfo']['files']))
elif 'nzbinfo' in vars:
os.environ['mylar_release_id'] = vars['nzbinfo']['id']
if 'client_id' in vars['nzbinfo']:
os.environ['mylar_client_id'] = vars['nzbinfo']['client_id']
os.environ['mylar_release_nzbname'] = vars['nzbinfo']['nzbname']
os.environ['mylar_release_link'] = vars['nzbinfo']['link']
os.environ['mylar_release_nzbpath'] = vars['nzbinfo']['nzbpath']

View File

@ -2697,8 +2697,10 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
if mylar.CONFIG.ENABLE_SNATCH_SCRIPT:
if mylar.USE_NZBGET:
clientmode = 'nzbget'
client_id = None
elif mylar.USE_SABNZBD:
clientmode = 'sabnzbd'
client_id = sendtosab['nzo_id']
if comicinfo[0]['pack'] is False:
pnumbers = None
@ -2708,6 +2710,7 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
plist= '|'.join(comicinfo[0]['pack_issuelist'])
snatch_vars = {'nzbinfo': {'link': link,
'id': nzbid,
'client_id': client_id,
'nzbname': nzbname,
'nzbpath': nzbpath},
'comicinfo': {'comicname': comicinfo[0]['ComicName'],