From 910393d00ec083b250672bcff2f530ab6053a315 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 26 Sep 2014 15:33:38 +0200 Subject: [PATCH 1/2] Allow original without cd name --- couchpotato/core/plugins/renamer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index aeeb3542..a4abeb4d 100755 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -220,7 +220,7 @@ class Renamer(Plugin): nfo_name = self.conf('nfo_name') separator = self.conf('separator') - cd_keys = ['',''] + cd_keys = ['','', ''] if not any(x in folder_name for x in cd_keys) and not any(x in file_name for x in cd_keys): log.error('Missing `cd` or `cd_nr` in the renamer. This will cause multi-file releases of being renamed to the same file.' 'Force adding it') From 5bea9dd04f2f576f633a2381688b58fae23669de Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 29 Sep 2014 16:24:57 +0200 Subject: [PATCH 2/2] Always return safestring on renamer replace --- couchpotato/core/plugins/renamer.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index a4abeb4d..f6e4248f 100755 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -377,9 +377,6 @@ class Renamer(Plugin): if separator: final_file_name = final_file_name.replace(' ', separator) - final_folder_name = ss(final_folder_name) - final_file_name = ss(final_file_name) - # Move DVD files (no structure renaming) if group['is_dvd'] and file_type is 'movie': found = False @@ -878,7 +875,7 @@ Remove it if you want it to be renamed (again, or at least let it try again) replaced = re.sub(r"[\x00:\*\?\"<>\|]", '', replaced) sep = self.conf('foldersep') if folder else self.conf('separator') - return replaced.replace(' ', ' ' if not sep else sep) + return ss(replaced.replace(' ', ' ' if not sep else sep)) def replaceDoubles(self, string):