Add CP tag only when renamer or unique tag is enabled.
This commit is contained in:
1 parent
158f638fb9
commit
78ba855c68
1 file changed
+9
-7
@@ -370,14 +370,16 @@ class Plugin(object):
|
|||||||
|
|
||||||
def cpTag(self, media, unique_tag = False):
|
def cpTag(self, media, unique_tag = False):
|
||||||
|
|
||||||
identifier = getIdentifier(media) or ''
|
tag = ''
|
||||||
unique_tag = ', ' + randomString() if unique_tag else ''
|
if Env.setting('enabled', 'renamer') or unique_tag:
|
||||||
|
identifier = getIdentifier(media) or ''
|
||||||
|
unique_tag = ', ' + randomString() if unique_tag else ''
|
||||||
|
|
||||||
tag = '.cp('
|
tag = '.cp('
|
||||||
tag += identifier
|
tag += identifier
|
||||||
tag += ', ' if unique_tag and identifier else ''
|
tag += ', ' if unique_tag and identifier else ''
|
||||||
tag += randomString() if unique_tag else ''
|
tag += randomString() if unique_tag else ''
|
||||||
tag += ')'
|
tag += ')'
|
||||||
|
|
||||||
return tag if len(tag) > 7 else ''
|
return tag if len(tag) > 7 else ''
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user