mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Rewrite dictionary creation as a dictionary literal
This commit is contained in:
parent
a983c6c7be
commit
47c585d81c
2 changed files with 45 additions and 41 deletions
|
@ -870,11 +870,12 @@ def find_download(clientAgent, download_id):
|
|||
else:
|
||||
baseURL = "http://%s:%s/api" % (core.SABNZBDHOST, core.SABNZBDPORT)
|
||||
url = baseURL
|
||||
params = {}
|
||||
params['apikey'] = core.SABNZBDAPIKEY
|
||||
params['mode'] = "get_files"
|
||||
params['output'] = 'json'
|
||||
params['value'] = download_id
|
||||
params = {
|
||||
'apikey': core.SABNZBDAPIKEY,
|
||||
'mode': "get_files",
|
||||
'output': 'json',
|
||||
'value': download_id,
|
||||
}
|
||||
try:
|
||||
r = requests.get(url, params=params, verify=False, timeout=(30, 120))
|
||||
except requests.ConnectionError:
|
||||
|
@ -896,10 +897,11 @@ def get_nzoid(inputName):
|
|||
else:
|
||||
baseURL = "http://%s:%s/api" % (core.SABNZBDHOST, core.SABNZBDPORT)
|
||||
url = baseURL
|
||||
params = {}
|
||||
params['apikey'] = core.SABNZBDAPIKEY
|
||||
params['mode'] = "queue"
|
||||
params['output'] = 'json'
|
||||
params = {
|
||||
'apikey': core.SABNZBDAPIKEY,
|
||||
'mode': "queue",
|
||||
'output': 'json',
|
||||
}
|
||||
try:
|
||||
r = requests.get(url, params=params, verify=False, timeout=(30, 120))
|
||||
except requests.ConnectionError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue