I want to rename my animes with the following script:
Everything works fine except for the very last line: for every file that has neither a 'censored' nor an 'uncensored' there are empty brackets added.IF I(eng) DO SET '%eng' #make sure there is an English title set
ELSE DO SET '%ann' #otherwise use the romaji
IF T(Movie) DO ADD ' - %epn' #If it is a movie use the epname (only!), generally would be 'Complete Movie', or 'Part X of Y'
ELSE IF T(!Movie);E(^Volume \d$) DO ADD ' - %enr' #just to avoid things like "animename - 1 - Volume 1 ..."
ELSE DO ADD ' - %enr - %epn' #in "normal case" use the epnumber and epname (if it is not a movie and epname does not include "Volume")
IF G(!unknown) DO ADD ' [%grp]' #use group short name if group exists
ELSE DO ADD ' [no group]' #otherwise mark so
IF D(japanese);D(english) DO ADD '(DUAL JAP+ENG)' #add (DUAL JAP+ENG) if the file is JAP+ENG audio
ELSE IF D(japanese);D(german) DO ADD '(DUAL JAP+GER)' #add (DUAL JAP+GER) if the file is JAP+GER audio
ELSE IF D(japanese);S(none) DO ADD '(RAW)' #Add (RAW) if the file is not subbed and with original japanese audio
ELSE IF D(english);D(!japanese) DO ADD '(ENG DUB)' #if file has english audio only mark it so
ELSE IF D(german);D(!japanese) DO ADD '(GER DUB)' #if file has german audio only mark it so
ELSE IF D(instrumental) DO ADD '(INST)' #mark as instrumental if necessary
ELSE DO ADD '(DUB %dub)' #if it is something else, list whatever the language is...
IF S(!english);S(!none) DO ADD '(SUB %sub)' #If it is subbed in another language than english, list the language (i.e. SUB GER)
IF I(cen) DO ADD '(%cen)' #add (cen) or (unc) - but how to avoid ()?
I'm not familiar with Java (I created the script above basically by copying from posts in this forum ).
Is there a possibility to check wether the cen-Tag contains explicitly "cen" or "unc", so the Tag is only added in those two cases?
PS: Does anyone know how to limit the categories added with the %gen-Tag? 10 or more categories per file is maybe a bit overdone ...