remove duplicates from {tags}

All your suggestions, requests and ideas for future development
Post Reply
n1n1
Posts: 10
Joined: 08 Jan 2026, 12:57

remove duplicates from {tags}

Post by n1n1 »

Hello.
I'm using {tags} and I see tags is matching both infos from filename + title tag in mkv, which is pretty good (ref viewtopic.php?t=12668)
However it may result in having duplicate values
eg. assuming one of my movie is named "one great movie (1999) Imax.mkv" and also has a title named "one great movie (1999) IMAX version"
In that particular case {tags} displays [IMAX, Imax]

Is there any way to remove these duplicates ?

I already tried tags*.upper().unique() but then all values are set in upper.
For un unknown reason tags*.upperInital().unique() doest not work :'(

thank you for your help in finding any workaround

NB: my config is

Console Output: Select all

FileBot 5.2.1 (r10920)
JNA Native: 7.0.0
MediaInfo: 26.01
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2026-02-12 (r1026)
Groovy: 4.0.28
JRE: OpenJDK Runtime Environment 21.0.10
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 8 GB Max Memory / 444 MB Used Memory
OS: Windows 11 (amd64)
STORAGE: 
DATA: C:\Users\server\AppData\Roaming\FileBot
Package: MSI
License: FileBot License P77429855 (Valid-Until: 2027-01-05)
User avatar
rednoah
The Source
Posts: 24553
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: remove duplicates from {tags}

Post by rednoah »

:idea: {tags} does all of the above by default, except evidently not for Imax / IMAX which seems to be a corner case where default normalisation is not applied which then makes deduplication not work.


:arrow: You can fix the issue via your custom format code like so:

Format: Select all

{ tags.unique{ it.upper() } }
:idea: Please read the FAQ and How to Request Help.
n1n1
Posts: 10
Joined: 08 Jan 2026, 12:57

Re: remove duplicates from {tags}

Post by n1n1 »

Thank you for your answer.

I also noticed with happiness than Open Matte is also catched by {tags}, which is quite nice :-)

Many thanks
User avatar
rednoah
The Source
Posts: 24553
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: remove duplicates from {tags}

Post by rednoah »

FileBot r10975 fixes this issue internally as well so the custom code workaround above will no longer be necessary with upcoming releases.
:idea: Please read the FAQ and How to Request Help.
n1n1
Posts: 10
Joined: 08 Jan 2026, 12:57

Re: remove duplicates from {tags}

Post by n1n1 »

thank you for your prompt reactivity about this :)
Post Reply