Double Artist Removal


#1

Not that great at mp3 tag. I have a lot of files that are formated as such %artist%/%artist% and would like them to be only %artist%

E.g.
Chicago/Chicago
changed to
Chicago

How would i do this? Thanks


#2

Have a look at the actions.
Ther is one that removes duplicate fields.


#3

the "remove duplicate fields" removes multivalue tags. they have to be seperated by \\ and it doesn't matter if they actually have the same value.

for
Chicago/Chicago
to
Chicago
i would use:

Action: Format Value
Field: %artist%
Formatstring: $regexp(%artist%,(.+)/.+,$1)

that removes everything from the frist "/" to the end.

or, maybe easier because without regular expressions:

Action: Guess Values
Sourceformat: %artist%
Guessing pattern: %artist%/%dummy%


#4

Tried both of your strings and they do infact remove everything after / but some artist are written like this t-pain/jay-z/50 cent and i want to keep those ones. How do i make it for exactly the same before and after /?


#5

or even better (and more complicated)

Action: Format Value
Field: ARTIST
Formatstring: $if($eql($regexp(%artist%,^(.+)/(.+)$,$1),$regexp(%artist%,^(.+)/(.+)$,$2)),$regexp(%artist%,^(.+)/(.+)$,$1),%artist%)

That only removes what comes after "/" if it is exactly the same as befor the "/"

So:
Chicago/Chicago to Chicago
but
AC/DC stays AC/DC

by this, you can use this for a mass renaming without checking every file for it's content.


#6

@pone: you are right of course in repect to mp3tag that you would need a double backslash.
In WMP, though, the slash is interpreted as separator and you will get a group AC and one called DC.
So my advice would be to eliminate all slashs completely and replace them with similar looking character but one with a completely different one like ⁄ (U+2044).
Does not help a lot with the basic problem but should dampen any enthusiasm.


#7

Apply the filter expression:

ARTIST MATCHES "(.+?)/\1"

This should display only those files having ARTIST content like 'Chicago/Chicago'.

To change an ARTIST content like 'Chicago/Chicago' to 'Chicago' apply an action:
Action: Format value
Field: ARTIST
Formatstring: $regexp(%ARTIST%,'(.+?)/\1','$1')

DD.20111018.1414.CEST


#8

thanks Detlev, a good one to know. i alread stumbled about the \1 somewhere, but I thought it's the same as $1 . now i see the difference.