mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Merge pull request #1068 from clinton-hall/issue-1064
Apply dict type-casting to section[usercat] in TorrentToMedia.py
This commit is contained in:
commit
f3552edbba
1 changed files with 3 additions and 4 deletions
|
@ -90,13 +90,12 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
||||||
(inputCategory))
|
(inputCategory))
|
||||||
return [-1, ""]
|
return [-1, ""]
|
||||||
|
|
||||||
|
section = dict(section) # Type cast to dict() to allow effective usage of .get()
|
||||||
|
|
||||||
Torrent_NoLink = int(section[usercat].get("Torrent_NoLink", 0))
|
Torrent_NoLink = int(section[usercat].get("Torrent_NoLink", 0))
|
||||||
keep_archive = int(section[usercat].get("keep_archive", 0))
|
keep_archive = int(section[usercat].get("keep_archive", 0))
|
||||||
extract = int(section[usercat].get('extract', 0))
|
extract = int(section[usercat].get('extract', 0))
|
||||||
try:
|
|
||||||
uniquePath = int(section[usercat].get("unique_path", 1))
|
uniquePath = int(section[usercat].get("unique_path", 1))
|
||||||
except TypeError:
|
|
||||||
uniquePath = 1
|
|
||||||
|
|
||||||
if clientAgent != 'manual':
|
if clientAgent != 'manual':
|
||||||
core.pause_torrent(clientAgent, inputHash, inputID, inputName)
|
core.pause_torrent(clientAgent, inputHash, inputID, inputName)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue