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"

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))
1 Like