Remove duplicate tags?

I have a weird way of doing things, but basically I created a tag for "original group" (I am using the ORIGLYRICIST tag to do this) so I can more easily find artists based on the group they are from, and their name.

So, a made up example, if the artist is "Beyonce", I will have it set the ORIGLYRICIST to "Beyonce" AND "Destiny's Child." This way if I am in the mood for Destiny's child, I will also see Beyonce in MusicBee and have the choice of listening to everything Destiny's Child adjacent, or just the group. (Basically, I like a lot of group's that have solo acts, and this keeps it easier to remember who has done what.)

The issue I am having is the way I do things is I add in "Destiny's Child" to ORIGLYRICIST first, while organizing things, and then I want to run a script on EVERYTHING, to then append "Beyonce" to the end, so I can still search musicbee for JUST Beyonce if I wish. This results in anything without a difference then being tagged "Taylor Swift; Taylor Swift," or if I run it twice, the example above would become "Destiny's Child, Beyonce; Beyonce;"

Is there a way to make it ignore adding the same thing twice so I don't have to meticulously one by one add this info?

I know this is a weird request, and I have been doing it by hand for years, but if there is an easier way to do this I figured I should just ask.

EDIT: I also have this issue with appending genres to stuff. I guess I just need a way to stop it from adding the same thing twice, or removing doubles after the fact.

You could filter for
NOT ORIGLYRICIST HAS ;
which would indicate that the additional enty is not there yet.
Then run the action

Here is a thread that deals with removing duplicate entries in a list:

The problem is if the entry is already there, so it is adding it twice. If I have the artist BTS, and run it, it becomes "BTS; BTS."

How would you know what to add to BTS?
How would you know whether you processed a file or not if the semicolon is missing?

That is a lot of stuff i can't even begin to understand how to implement...

So do I just add these somewhere (idk where to add them lol)
$regexp(%ITEMLIST%,'(?:^|,)([^,]*)(,\1)+(?=,|$)','$2')
$regexp(%ITEMLIST%,'(?:^|,)([^,]*)(.*)(,\1)+(?=,|$)',',$1$2')
$regexp(%LIST%,'(?i)(?:^|,)([^,]*)(,\1)+(?=,|$)','$2')
$regexp(%LIST%,'(?i)(?:^|,)([^,]*)(.*)(,\1)+(?=,|$)',',$1$2')
and then run then multiple times and pray? lmao or am I not understanding?

I think you have to read further:

You would have to enter the correct field name, bei it GENRE or ORIGLYRICIST

Okay thanks, let me try this.

Honestly, I think I am just stupid, sorry, but it isn't working. I did this and have no idea if its correct haha.

It looks like it filled the blank I left in REPLACE MATCHES WITH with the same thing that was in REGULAR EXPRESSION
image

Also just tried adding exactly this and got
image

Yes, that is what it more or less says in that thread.

The correct expression would be:
$regexp('Taylor Swift, Taylor Swift','(?:(?<=,)|(?<=\A)) ?([^,]*),(?=.*?(?<=,) ?\1(?=,|\z))',)
as said in the thread:
You can use it in Convert>Tag-Tag
Just replace 'Taylor Swift, Taylor Swift' with the correct field name.
grafik

So I would still have to manually do it and I can't just select 1000 songs and press one button?

I think what I am asking is I just want an action to remove duplicates in fields.

No. As I said already:

I think I am not understanding cause what you are saying is to use TAG-TAG which means I would have to manually select the thing I want to change, type what I want to change, then hit "OK" when I could just manually delete and retype what I want faster?

And even then I don't think I am understanding what you want me to do.
image

I want an ACTION if at all possible that I can apply to everything without having to edit it every time.

Also sorry, I appreciate your patience with me.

If it was all just so easy!:blush:

The reality is there are as many exceptions as there are genuine tags to edit. You may find using this "One ACTION To Rule Them All" causes more issues to resolve afterwards. Use of the filter function and an Action specific to each group will take some time to go through but the end result will be far more accurate.

Haha yea, I don't expect it to be perfect 100% of the time, but if there's something easy I could do that would work most of the time I would be happy haha.

Anyway, if I am asking too much that's fine. But I am about to "spring clean" my entire library and thought I would ask before hand, just in case I could save myself a few hours haha.

You do know that the equivalent to the converter>Tag-Tag is an action of the type "Format value"?
The converter has a preview so that you can check the expression for errors - like you had with the field name in apostrophes. The preview shows that.

If you have the list separated with semicolon then try:
$regexp(%origlyricist%,'(?:(?<=;)|(?<=\A)) ?([^;]*);(?=.*?(?<=;) ?\1(?=;|\z))',)

Ohhhhh I did not know that! Sorry for misunderstanding so much, but that's why I am here! And thanks for the tip, as now that I understand, that makes a lot of sense!

Also I finally understood what you wanted me to do and got it to work. Thank you so much!! It may not be perfect all the time, but this will deff save me hours.

Appreciate you!!!

I am sorry, i am back......

I am confused. It is working perfectly for ORIGLYRICIST, but I tried using it for genre and it just deletes all but the first one?

here is how my genres look:
image

And after I run that:
image

Sorry again... I feel so bad.

which program shows the genres like that?