From 663cd22934cad1b3ac68ba35d6e6f6208d70ae4e Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sun, 6 Jul 2014 06:44:30 +0930 Subject: [PATCH] wrap paths and names in quotes. Fixes #461 --- nzbtomedia/nzbToMediaUserScript.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nzbtomedia/nzbToMediaUserScript.py b/nzbtomedia/nzbToMediaUserScript.py index 3ce83d77..211b00c4 100644 --- a/nzbtomedia/nzbToMediaUserScript.py +++ b/nzbtomedia/nzbToMediaUserScript.py @@ -59,22 +59,22 @@ def external_script(outputDestination, torrentName, torrentLabel, settings): command = [nzbtomedia.USER_SCRIPT] for param in nzbtomedia.USER_SCRIPT_PARAM: if param == "FN": - command.append(file) + command.append('%s' % file) continue elif param == "FP": - command.append(filePath) + command.append('%s' % filePath) continue elif param == "TN": - command.append(torrentName) + command.append('%s' % torrentName) continue elif param == "TL": - command.append(torrentLabel) + command.append('%s' % torrentLabel) continue elif param == "DN": if nzbtomedia.USER_SCRIPT_RUNONCE == 1: - command.append(outputDestination) + command.append('%s' % outputDestination) else: - command.append(dirpath) + command.append('%s' % dirpath) continue else: command.append(param)