From 78ba855c68995b0992a1742dc3a12a8c52bd5689 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 4 Oct 2014 14:33:51 +0200 Subject: [PATCH] Add CP tag only when renamer or unique tag is enabled. --- couchpotato/core/plugins/base.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 2e993715..704aa62c 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -370,14 +370,16 @@ class Plugin(object): def cpTag(self, media, unique_tag = False): - identifier = getIdentifier(media) or '' - unique_tag = ', ' + randomString() if unique_tag else '' + tag = '' + if Env.setting('enabled', 'renamer') or unique_tag: + identifier = getIdentifier(media) or '' + unique_tag = ', ' + randomString() if unique_tag else '' - tag = '.cp(' - tag += identifier - tag += ', ' if unique_tag and identifier else '' - tag += randomString() if unique_tag else '' - tag += ')' + tag = '.cp(' + tag += identifier + tag += ', ' if unique_tag and identifier else '' + tag += randomString() if unique_tag else '' + tag += ')' return tag if len(tag) > 7 else ''