Splitting one field into new fields

I have some homemade compilations with artist: “various” and tracktitle: “%artist% / %title%”. anyone knows how I can parse the tracktitle into the artist and track fields?

Interesting problem! I think your best bet at the moment might be to write a (very simple) custom plugin. Any chance you know a little bit of Python?

You could loop over all the items, pull out the artist and title, and assign them back into the appropriate fields.

Thankfully, “a little bit” is the exact amount of Python I know, so I’ll give it a go! Thanks for the reply.

A related option, if you don’t want to create a custom plugin yourself (though it’s not as hard as one might think), would be to use inline to create fields that split the title, i.e. title_artist: title.split('/')[1] if '/' in title else '', then use my modifytmpl plugin to set the field with a format string, i.e. beet modifytmpl title:/ title='$title_artist'

1 Like

Aha, an array with splits was what I was hoping for! I’ll try this, thank you very much!