Browse Source

Py3: Pre-queue parameters need to be strings

On WIndows this always happened due to list2command, so I never noticed. In Py2 version this used the unicoder() function, so also on other platforms it was fixed.
Closes #1344
pull/1346/head
Safihre 6 years ago
parent
commit
5df525ce6b
  1. 3
      sabnzbd/newsunpack.py

3
sabnzbd/newsunpack.py

@ -2302,9 +2302,10 @@ def pre_queue(nzo, pp, cat):
pp and cat are supplied seperate since they can change.
"""
def fix(p):
# If added via API, some items can still be "None" (as a string)
if not p or str(p).lower() == 'none':
return ''
return p
return str(p)
values = [1, nzo.final_name_pw_clean, pp, cat, nzo.script, nzo.priority, None]
script_path = make_script_path(cfg.pre_script())

Loading…
Cancel
Save