I would like to add a specific tag based on file title string or folder name string, but, avoiding it is duplicated.
In this case, sometimes the file has this tag, other times the folder has the tag or both might have the tag.
Groovy: Select all
{(fn.match(/Uncensored|Sin Censura|UNCEN/)) ? '[Uncensored]' : null}
{(folder.name.match(/Uncensored|Sin Censura|UNCEN/)) ? '[Uncensored]' : null}
Groovy: Select all
{(fn.match(/Uncensored|Sin Censura|UNCEN/)) ?
'[Uncensored]' :
(folder.name.match(/Uncensored|Sin Censura|UNCEN/)) ?
'[Uncensored]' :
null
'}
The fn.match() and folder.name.match() never enter to the else statement of the ternary operator.
Question:
Is there another approach I can get this result?