mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 10:36:52 -07:00
Fix #1064: TypeError when key not found in config
This commit is contained in:
parent
6ec8025e67
commit
d2767292fc
1 changed files with 6 additions and 6 deletions
|
@ -90,12 +90,12 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
(inputCategory))
|
||||
return [-1, ""]
|
||||
|
||||
section = dict(section) # Type cast to dict() to allow effective usage of .get()
|
||||
section = dict(section[sectionName][usercat]) # Type cast to dict() to allow effective usage of .get()
|
||||
|
||||
Torrent_NoLink = int(section[usercat].get("Torrent_NoLink", 0))
|
||||
keep_archive = int(section[usercat].get("keep_archive", 0))
|
||||
extract = int(section[usercat].get('extract', 0))
|
||||
uniquePath = int(section[usercat].get("unique_path", 1))
|
||||
Torrent_NoLink = int(section.get("Torrent_NoLink", 0))
|
||||
keep_archive = int(section.get("keep_archive", 0))
|
||||
extract = int(section.get('extract', 0))
|
||||
uniquePath = int(section.get("unique_path", 1))
|
||||
|
||||
if clientAgent != 'manual':
|
||||
core.pause_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
|
@ -224,7 +224,7 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
|
||||
result = [0, ""]
|
||||
if sectionName == 'UserScript':
|
||||
result = external_script(outputDestination, inputName, inputCategory, section[usercat])
|
||||
result = external_script(outputDestination, inputName, inputCategory, section)
|
||||
|
||||
elif sectionName == 'CouchPotato':
|
||||
result = core.autoProcessMovie().process(sectionName, outputDestination, inputName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue