From 2639c5e9ad23004d5f1506d65d83884d093b9af4 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 21 Sep 2014 10:40:29 +0200 Subject: [PATCH] Force add if not set fix #1811 --- couchpotato/core/plugins/renamer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index af39aa32..a2d993ed 100755 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -219,6 +219,12 @@ class Renamer(Plugin): nfo_name = self.conf('nfo_name') separator = self.conf('separator') + 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') + file_name = '%s %s' % ('', file_name) + # Tag release folder as failed_rename in case no groups were found. This prevents check_snatched from removing the release from the downloader. if not groups and self.statusInfoComplete(release_download): self.tagRelease(release_download = release_download, tag = 'failed_rename')