Hello there, I've got a lot of albums to fix. One of them is duplicated artists.
Current:
01 This Is What You Came For (Calvin Harris feat. Rihanna) (Calvin Harris feat. Rihanna).mp3
Need:
01 This Is What You Came For (Calvin Harris feat. Rihanna).mp3
Is there a regex that can check for text duplicates from the file extension backwards and remove one of the duplicates found from the filename and title?
Remove " (Calvin Harris feat. Rihanna)"
I need to avoid it removing any other content in brackets, which isn't duplicated (like "(EP)" or "(Acoustic)" for example). The album artist, artist and album are all "Now That's What I Call Music!", so can't just reset from other tags.
It will always be (ARTIST) (DUPLICATE).mp3 that needs changing to (ARTIST).mp3.
You could filter for ) ( in a filename and then remove 1 pair of brackets.
and if this is a problem of the album
then I would use that also as filter criterion.
You can then use Convert>Filename-Filename to streamline the filename.
This may be an example why the initial choice to put structured data from fields into an unstructured string has its drawbacks, esp. if this information is not separated from the rest of the data by a uniqe separator. And brackets are usually not unique. Better choices are chevrons, curvy brackets, underscores.
If you have to change it for one album only, I would just filter for "Now That's What I Call Music!" and then change these TITLE manually. You need about 5 Minutes in Mp3tag to check for duplicated text visually and change/fix 20 tracks.
If you need to change many more albums, I would have a look if online sources like MusicBrainz or Discogs could help you to fix all your wrong ALBUM, ARTIST, ALBUMARTIST content.
For example MB lists many different series for NTWICM.
For example if you own the USA version click on this and have a look if your specific # is available.
WebSource Scripts can then help you to get the correct tag content.
Thanks both. I wanted to know if there was essentially regex that can fix the problem when it happens occasionally. If I take the data from another source, I lose some of the changes I have made like who the artist should be (then I end up with tracks being moved into individual artist folders, instead of being in one folder for each disc).
Using Convert → Filename - Filename, you can rearrange parts of file names by marking up to nine parts using a pattern over the file name and rearrange them using a new file name pattern.
The Old filename pattern splits the file name in several parts. It is built of standard text (e.g., Music and delimiters like -, _) and by placeholders that denote the reusable parts, starting at %1, %2, up to %9.
You can mark directories via the backslash character \ within the pattern string.
The New filename pattern uses the previously defined parts (accompanied by optional standard text) to resemble the target file name.
If you use the backslash character \ within the new filename pattern, Mp3tag creates new directories below the current working directory for relative paths or at the at an absolute folder location if it starts with a drive specification, e.g., D:\Music.
You can use Scripting Functions when defining the new filename, e.g., $upper(%1).
As the function also has a preview, I do not think that it would be too much of a trouble to at least try it and then, if you really cannot make any sense of it, show us your attempts so that we can build on it.
So far I cannot not add anything more to the - what you call "brief" - 165 words as this is about the description that I also would have thought of.
I did already try and it didn't provide a preview as I am clearly doing something wrong and don't understand from the documentation what that is. I'd really need an example to understand.
I am missing the %1, %2 etc. in your attempt.
Please note that it does not say anything about field variables in the whole description of the function.
How often in the life of a filename will this procedure be necessary?
With regard to the unwanted duplication of the ARTIST data (which looks like a filename with the preferred data got treated again) I think that the converter gives more control as you can see the result immediately.
Perhaps a search of the forum for a routine that removes a second pair of brackets helps.
Based on your reply, I understand that whilst it worked in the example, it wouldn't always work as expected.
My concern with that is as outlined in my original post, a second pair of brackets may contain other text. I only want it to remove anything duplicated. If the subsequent brackets contained anything else, I wouldn't want them to be removed.
Exactly - but mainily due to too little overview of the real data: the GIGO principle cannot be overruled.
The function itself works excatly as set - it is only the treated data that does not always match the assumption.
The song TITLE is just called "This Girl".
This one is remixed by ARTIST "Kungs".
The original song was made by "Cookin' on 3 Burners".
There is no need to repeat (Kungs) once or twice in brackets.
Additional info:
"This Girl" is a song by Australian funk trio "Cookin' on 3 Burners" from 2009.
French DJ "Kungs" remixed and released the above track 2016.
He made 3 more remixes called "Extended Mix", "Fabich Remix" and "Betical Remix".
It depends on your current naming scheme how you want to rename all variants.
What happened to the initial suggestion to filter for ) (.
Thenyou select files that need treatment and apply the converter. Much faster than renamng the files manually.
you could expand the filter expression witn AND NOT %_filename% HAS "Remix) ("
to leave ot these files.