From 027ff43dfd3ea291bd5cce9c943db059e2224d4f Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 16 Feb 2014 14:55:35 +0100 Subject: [PATCH] Path encode files in rename. fix #2846 --- couchpotato/core/plugins/renamer/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index f86beba..1bf4ec9 100755 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -317,7 +317,7 @@ class Renamer(Plugin): cd = 1 if multiple else 0 for current_file in sorted(list(group['files'][file_type])): - current_file = toUnicode(current_file) + current_file = sp(current_file) # Original filename replacements['original'] = os.path.splitext(os.path.basename(current_file))[0] @@ -607,7 +607,7 @@ class Renamer(Plugin): rename_files = {} def test(s): - return current_file[:-len(replacements['ext'])] in s + return current_file[:-len(replacements['ext'])] in sp(s) for extra in set(filter(test, group['files'][extra_type])): replacements['ext'] = getExt(extra)