After using a $copymerge script, I end up with a tag that contains duplicates:
Is there a script function to remove all duplicates from a tag?
After using a $copymerge script, I end up with a tag that contains duplicates:
Is there a script function to remove all duplicates from a tag?
That sounds like a bug. According to the documentation, $copymerge()
is supposed to remove duplicates. Can you please share the script snippet that you’re using. I’m wondering if you are using $copymerge()
on strings which might be causing the problem. You might have to use $setmulti()
on the inputs first.
It looks like it isn’t $copymerge failing to remove duplicates.
I think there are two things going on here:
I’ll try to do some more testing later on to make sure this is not because of something I am doing wrong myself.
Ah, yes. That is a little bit better and prevented some of the duplicates. Thanks.
To take care of that, process each of the input variables through $title()
before using them in the $setmulti()
. Something like:
$setmulti(genre and type,$title(%genre%))
$setmulti(type,$title(%type%))
$copymerge(genre and type,type)
Great, I have gotten rid of all duplicates, things looking Hunky Dory now.
Thanks rdwsift.
where do i enter these stripts please
The tagging scripts are entered in the Scripting Options section of the options, while the file naming script is entered in the File Naming Options section. For more information about scripting in Picard, please see the Scripting section in the Picard User Guide.