$if($lt(%originaldate%,%date%),$set(alert,TRUE),$set(alert,FALSE))
This gives FALSE to me if originaldate is 1955 and date is 1953. Can you share the full script?
$if($lt(%originaldate%,%date%),$set(alert,TRUE),$set(alert,FALSE))
This gives FALSE to me if originaldate is 1955 and date is 1953. Can you share the full script?
I don’t have anything that touches dates except the four lines above. There’s an $if that runs only on .m4a files, but it gets rid of originaldate completely, so that’s not in effect here.
I have originaldate listed under “Preserve these tags” if that matters. It gets added if blank, but otherwise it keeps the value in the file.
Update: sorry, I muddied the waters. I had the values backwards, above. $eq returns TRUE and the others return FALSE. That makes sense if the script is checking the “real” value and not the value in the file. AHA.
So false alarm on the script problem. I was gonna be surprised if I’d found a problem like that which no one else had.
Hi all,
Trying to remove variations of official music video or just official audio/video from song titles. Any opening “(” encountered is not removed from the title and I am very new to regex so any help would be greatly appreciated!
$set(title,$rreplace(%title%,\\\([Oo][Ff][Ff][Ii][Cc][Ii][Aa][Ll]\(?:\\s*[mM][uU][sS][iI][cC]\)?\\s*[Vv][Ii][Dd][Ee][Oo]|\(?:[Oo][Ff][Ff][Ii][Cc][Ii]?[Aa][Ll]\\s*\(?:[aA][Uu][Dd][Ii][Oo]|[vV][Ii][Dd][Ee][Oo]\)\)?\\\),))```
edit: it seems the snippet works as intended, the opening "(" is remains for text wrapped inside parentheses that is not "official music video" or "official audio" or "official video"
I am trying to append a genre if the genre isn’t already contained inside %genre% the current snippet I have will append the genre whether it is inside or not. What am I doing wrong?
$if($not($in($getmulti(%genre%,-1), Lo-Fi)),$setmulti(genre,%genre%; Lo-Fi),)```
Try removing the space before “Lo-Fi” in your check and try using $inmulti() so that the line looks like:
$if($inmulti(%genre%,Lo-Fi),,$setmulti(genre,%genre%; Lo-Fi))
Is it possible to add line breaks to scripts to make them easier to read?
The answer to that is… sometimes.
It really depends on the type of script (tagging or file naming) and where the breaks are entered. For example, you need to be careful not to break the lines such that values used for comparisons, tests or assignments are accidentally altered. Generally, breaking lines between true and false sections of things like $if() are safe, unless the result is fed to another comparison or $if() command. You might have to experiment to see if the added line breaks (and indenting) have an undesired impact on the output.
Some things like $set() and $setmulti() are pretty much always safe to start on a new line (even indented).