Plugin to put & artist in the title

Tags: #<Tag:0x00007f050cbb8178> #<Tag:0x00007f050cbbfea0> #<Tag:0x00007f050cbbfc70>


Hey :slight_smile:

(I’m french so i will do my best to speak well english ;))

I am not very good at computing and even less at coding. I’m using MusicBrainz Picard since a long time now, and I love it, it’s very useful.
The only problem is that I would heave preferred if the “feat.” and the “&” are in the title rather than in the name of the artist.
Then, i discovered the plugins, i was happy, there was a plugin to put the feat. in the title, but it unfortunately doesn’t exist for the “&”, so i tried to change the codage of the plugin, but i’m really bad at coding so I modified some things at random… And I knew it but it didn’t worked.
So, can anybody help me to create a plugin for that or does anybody have already create it.
The plugin that I used was “Feat. Artists in Titles” on this link
And some precision: I would like that the artist who is with a “&” become enter bracket with a “feat.” for exemple: Michael Jackson & Rihanna becomes in the title: Name of the song (Feat. Rihanna).

I hope that I have made it clear :slight_smile:

Thank a lot


Can anybody help me ? :blush:


I have made some modifications to the original plugin, so that you can specify a list of Words (feat., with, & etc.) which should be used as split.

I also made a check so it only splits if there is more than one ArtistID assigned to the track/album to avoid it splitting

It should be possibly to modify my modification to always replace the spilt Words with an & in the brackets.

I will post my version of the plugin when I come home.


This is the modified version af “Feat. artist in title”-plugin.

You can specify a list of words you want to split on and it only do the split if there is more than one artistid.

PLUGIN_NAME = 'Feat. Artists & More in Titles'
PLUGIN_AUTHOR = 'Lukas Lalinsky, Michael Wiencek, Bryan Toth, Brian Altenburg'
PLUGIN_DESCRIPTION = 'Move "feat.", "with" etc. from artist names to album and track titles. Match is case insensitive.'
PLUGIN_API_VERSIONS = ["0.9.0", "0.10", "0.15", "0.16"]

from picard.metadata import register_album_metadata_processor, register_track_metadata_processor
import re

list = ['feat.', 'with']

def move_album_featartists(album, metadata, release):
    if metadata["musicbrainz_albumartistid"].count(";") > 0:
        for item in list:
            _item_re = re.compile(r"([\s\S]+) "+item+" ([\s\S]+)", re.IGNORECASE)
            match = _item_re.match(metadata["albumartist"])
            if match:
                metadata["albumartist"] =
                metadata["album"] += " ("+item+" %s)" %

def move_track_featartists(album, metadata, release, track):
    if metadata["musicbrainz_artistid"].count(";") > 0:
        for item in list:
            _item_re = re.compile(r"([\s\S]+) "+item+" ([\s\S]+)", re.IGNORECASE)
            match = _item_re.match(metadata["artist"])
            if match:
                metadata["artist"] =
                metadata["title"] += " ("+item+" %s)" %


If you want it to always be “feat.” instead of “&” or “with” or whatever you specified in the list-variable, you should change the following line:

metadata["title"] += " ("+item+" %s)" %


metadata["title"] += " (feat. %s)" %


Hi :slight_smile:
Sorry , i didn’t see that you answered to me.
Thank you very much for taking time to resolve my wish ! :smiley:
I would never have been able to make what you made :open_mouth:
But unfortunately, it did not work, when I add the plugin on MusicBrainz, nothing happens, nothing is added in the list of plugins.
Did you tried it with your computer ? I tried to change things, but I didn’t succeed. Maybe I did a mistake when I created the file, so for the file that I made you can download it here and maybe i have done a mistake:!EwtwGJYD!WjxlRDlABafFK9IzRtnQNHlG8-v_0-N49_bwVDdoiVQ
Thank you very much again :stuck_out_tongue:


The formatting in the original post by @Gitrian was broken. I took the freedom to edit the post and fix the code formatting, so now you should be able to copy and paste it properly :slight_smile:


Thank you very muuuch !
Everything’s working :slight_smile:
Thank you to Gitrian for making the plugin and thank you to outsidecontext for correcting problems :smiley:
It works exactly like I wanted
I put a download link here, I don’t know if it will help anyone, but maybe it will be easier like this :wink:!J1VARagI!9pKS7sXiXjrDNoc-gW6tPA2E1ITdK8QBb7xg9p_cFmA

And I have a last questionn it has not relevance but, it’s something I would like too, I don’t know if we have to create a plugin to do that, because it’s only a little thing:
When an artist is called by his first name and surname (exemple: Michael Jackson), the album artist sort order and the artist order is “surname, first name” (exemple: Jackson, Michael), but I would prefer if the first name was before the surname, is there any way to change it ? If someone know can he told me ? But if it’s too complicated I will create a new topic :wink:

Thank you again for the other problem you two :wink:


See this thread.

And yeah, in general please start a new topic when you have a new question. It helps other people with the same question find the answer :slight_smile:


Ok ! :smiley: Next time I will create a new topic :wink:
Thank you for the link, I didn’t find it when I searched… and it work, thank you :slight_smile:


I really like this, good work all :heart_eyes:


Hi team, thanks for taking the time to post your code, this place is awesome!!

I’m wanting to achieve the same thing as the original poster however when I tried to copy the code into the scripting area of MusicBrain but getting “Unexpected character ‘s’ at position 41, line 15.”

Any help is apprecieated as I’d love to get this working soon :slight_smile:

FYI - using Mac OSX 10.1.3 with version 1.4.1


The code is a plugin and not a tagger script. You have to put the code into a file with the .py extension, e.g., and put that file in Picard’s plugin folder. If everything went fine you will see the plugin in Picard’s options where you can enable it.


I found this very useful. I have only one problem in renaming the ones with ‘&’. If the artists are two it works fine. If the artists are more than two they come with ‘,’ Here’s an example:
Beyoncé, Missy Elliott, MC Lyte & Free - Fighting Temptation becomes
Beyoncé, Missy Elliott, MC Lyte - Fighting Temptations (Feat. Free)
Is there any chance to have
Beyoncé - Fighting Temptations (Feat. Missy Elliott, MC Lyte & Free)?
Thank you