mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
Apply dict type-casting to section[usercat] in TorrentToMedia.py
* Fixes #1064
This commit is contained in:
parent
e05f429641
commit
390b401ee2
1 changed files with 3 additions and 4 deletions
|
@ -90,13 +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()
|
||||
|
||||
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))
|
||||
try:
|
||||
uniquePath = int(section[usercat].get("unique_path", 1))
|
||||
except TypeError:
|
||||
uniquePath = 1
|
||||
uniquePath = int(section[usercat].get("unique_path", 1))
|
||||
|
||||
if clientAgent != 'manual':
|
||||
core.pause_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue