Regex help - retain only the first artist

Some of my tracks have multiple album artists (separated by \\), e.g., Lata Mangeshkar\\Kishore Kumar. I would like to replace the same with only the first artist, i.e., Lata Mangeshkar.

I tried the following regular expression (.*)(\\), which worked on online regex testing websites, but is doing nothing in mp3tag.

image

Can someone please help me out with removing everything after a separator (\\ in this case from the ALBUMARTIST field)...thanks!

Looks like Format Value works. Here's what worked for me:

image

There is also Remove Duplicate Fields which leaves the first field from the tag.

@arsaboo Did you have any need to keep the additional text that is being removed in another tag? In your example this would be the artist Kishore Kumar info. You would have to address this prior to removing it from the AlbumArtist tag field, or it will be unrecoverable.

Ideally, it would be useful to retain the information, but Plexamp does not work with multiple album artists and it creates more problems.

You could move the additional details to the Artist field if this does not create any issues with your software. Typically when multiple Artist tag fields are used, only the first one is used for apps that don't support the extra ones. That way you at least have the data remaining in case you want to put it back in the future. Do this action before you delete it from the AlbumArtist field.

Unfortunately, Plex does not quite work that way. It will use all the artists:

I like the suggestion of moving the extra information to the artist field. So, now need to figure that out.

You can use Artist, or any other field including a "Custom" personal field if you like. It is highly unlikely that a player will use this info except for a select few that may let you use it in the Artist field. My point above was more to make sure you keep that data somewhere, as once it is gone it is much more difficult to restore it in the future.

There are plenty of other threads here that can give you guidance on moving data from one field to another. Most will involve the Format or Guess Value actions.

1 Like

Or you could try other separators like the semicolon or the simple slash and see what your player makes of them.
To me it looks like your player can actually read all the fields. So it would be worth investigating whether the same track also appears for the other artists.

(And in general: before I throw way information only because a particular player cannot cope with it but it would take ages to get it back, I would change the player and not the data)

2 Likes

A personal note regarding the options for separators:
The semicolon ; is the one I have found in my experience is most accepted on Android (GameMAD and Poweramp* both support this) and on the Windows platform as well with WMP, MusicBee, and Asset uPnP.
*Poweramp can actually use any user defined separator character or string!

Unfortunately the same can’t be said for any of the iStuff from Apple, iTunes has no support whatsoever for any multiple fields.

Indeed - perhaps this discussion on separators sheds some more light on the topic:

1 Like

Plexamp does not seem to like ;. Weirdly enough, \\ works as a separator in Plexamp for the genre field.

I wish there is some standardization on these basic things.

This is strange, but perhaps a topic to raise at Plex. I do use Plex myself (not Plexamp though). And the main server does seem to use the semicolon effectively. Perhaps it is just a miss on the Plexamp development side?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.