Help stripping "& Sia" from albumartist using Beets + inline plugin – creates wrong folder name clean_albumartist #5766
Closed
devyeah1978
started this conversation in
General
Replies: 2 comments 1 reply
-
|
I have this in my config for inline, hope it helps: item_fields:
first_artist: |
import re
artistlist = ["florence and the machine", "h & claire", "hootie & the blowfish"]
artistlist += ["tom petty and the heartbreakers", "tones and i"]
return re.split(r'(?i)(,\s)|(;\s)|(\s\&\s)|(\sfeat)|(\sft\.)|(\sft\s)|(\sX\s)|(\swith)|(\sand\s)|(\s×\s)|(\sǀ\s)',albumartist,1)[0:1][0] if albumartist.lower() not in artistlist else albumartist |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Another way would be using the subsitute plugin. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone,
I'm using Beets and trying to clean up artist names during import. For example, I want "David Guetta & Sia" to become just "David Guetta" so that folders are organized cleanly under the main artist.
Here's what I'm using in my config:
paths:
default: $clean_albumartist/$album%aunique{} ($year)/$track - $title
item_fields:
clean_albumartist: |
import re
return re.split(r'(?i)\s*(feat.?|ft.?|featuring|&|,)\s+', albumartist)[0].strip()
clean_artist: |
import re
return re.split(r'(?i)\s*(feat.?|ft.?|featuring|&|,)\s+', artist)[0].strip()
The problem is that when I import an album like David Guetta & Sia – Beautiful People, Beets shows the correct split during tagging, but instead of creating the folder David Guetta/Beautiful People, it creates a literal folder named clean_albumartist/Beautiful People.
How can I get Beets to actually use the value of clean_albumartist and not treat it as a literal string? I’ve confirmed the inline plugin is enabled.
Thanks for any insight!
Beta Was this translation helpful? Give feedback.
All reactions