Picard Scripting Help Requests

$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?

1 Like

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.

2 Likes

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"