Ever since I started using beets I’ve struggled with the fact that it creates directories based on the entire artist/albumartist tag when there’s more than one artist specified. This means my filesystem looked like this:
Not desirable. I thought the ftintitle plugin would help me sort this out, but it only does what I expect for single tracks.
I tried a solution as outlined in this github issue, but it only catches the cases where the different artists is separated by a comma:
So, time to learn some python! Turns out there’s a very handy
re.split() method available, so here’s what I came up with:
This can handle not only comma delimiters, but also:
- Artist &
- Artist feat
- Artist feat.
- Artist featuring
- Artist ft.
- Artist vs
- Artist vs.
- Artist &
It will screw up things like Earth, Wind & Fire, but that’s not a major issue.
The idea is to use
$first_artist in the beginning of the path
format like so:
which will put
Jennifer Lopez feat. Pitbull inside the main Jennifer
Lopez directory, but still keep the feat. part in the directory name
inside it. If you don’t want that, use
$ beet move artist:feat jennifer\ lopez J/Jennifer Lopez Feat. Pitbull/Jennifer Lopez Feat. Pitbull │2012│ Dance Again [Single, WEB, MP3]/01 Dance Again.mp3 -> J/Jennifer Lopez/Jennifer Lopez Feat. Pitbull │2012│ Dance Again [Single, WEB, MP3]/01 Dance Again.mp3
If I were to use
$first_artist instead of
$albumartist all the way, I would end up with
J/Jennifer Lopez Feat. Pitbull/Jennifer Lopez Feat. Pitbull │2012│ Dance Again [Single, WEB, MP3]/01 Dance Again.mp3 -> J/Jennifer Lopez/Jennifer Lopez │2012│ Dance Again [Single, WEB, MP3]/01 Dance Again.mp3
I haven’t decided yet which one I prefer, but I know that I’m very happy not clobbering my directories with a ton of ‘X feat Y’ entries.
This is how I use it:
Here’s my beets configuration.