-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Organising classical music #1364
Comments
We don't currently fetch the composer, sadly: see #506. 😢 Contributions to help get this field would be greatly appreciated. |
I really have no idea how you'd to that honestly, but would it be possible to use the Inline plugin to remove everything after the first |
Sure. Something like |
That seems to do the job, thanks 😀 |
Sorry, I'm back again, I've been trying to create another item field for the rest of the albumartists but I just can't get it to work. It either works for albums where there's only one albumartist or for albums where there are multiple, I just can't get it to work with either. So far I have:
I've tried a bunch of variations, checking if it's greater than/smaller than/equal/etc and reversing whether it checks first and so on. But either I get an |
|
It works! I thought albumartist was a list, which is probably where I messed up. But regardless, thank you so much for all the help! :D |
Hi! Thanks for the neat write-down for a non python-savy user like me. - An issue I encountered with this setup is when Discogs is used instead of Musicbrainz. Albumartists are then often called: "composer - conductor, orchestra..." How can I split the albumartist both by ";" and " - " (including the whitespaces!) |
@NErnstI Which field are you trying to extract? The composer? |
Sorry, let me rephrase: I assumed that the above behaviour is still the case, at least I found no composer tags after importing with beets. So I did this exact workaround: item_fields:
mainartist: albumartist.split(';')[0]
restartists: |
parts = albumartist.split(';', 1)
if len(parts) > 1:
return parts[1]
else:
return '' I then use mainartist as the albumartist mainfolder name (in this case the composer usually) and include the remaining artists in the album subfolder. When importing from musicbrainz it works with the semicolon, however discogs appears to format it differently, instead of "composer; conductor, orchestra, ..." its "composer - conductor, orchestra, ...". I would like the above ruleset to apply to discogs format as well, splitting the albumartist both with ";" and " - ". |
Try this; item_fields:
mainartist: |
import re
re.split(';|,', albumartist)[0]
restartists: |
import re
parts = re.split(';|,', albumartist)
if len(parts) > 1:
return parts[1]
else:
return '' |
Ah, I see, I already stumpled upon this re-option, but wasn't confident enough to try it myself. Worked like a charm, just adapted it a bit and separated at the " - " string item_fields:
mainartist: |
import re
x = re.split(';| - ', albumartist)
return x[0]
restartists: |
import re
parts = re.split(';| - ', albumartist)
if len(parts) > 1:
return parts[1]
else:
return '' Thank you very much for you help :) |
Hi! For organising classical music, you might be interested in the parentwork plugin: #2580 . Then you can organize the music like $parentcomposer_sort/$parentwork($parentwork_disambig)/whatever to get the music ordered by parentwork (for an aria from an opera, it would be the opera) and the composer of the parentwork. |
Hey, I'm having some slight troubles keeping my classical music organised. I've been organising most my music with
$albumartist
which works great for everything but classical because you end up with folders named likeПётр Ильич Чайковский; Koninklijk Concertgebouworkest, Antal Doráti/
when I would only want the composer to be included (Пётр Ильич Чайковский/
). I tried doing this%if{$composer,$composer,$albumartist}/
to see if it worked but it stills looks like it gives them$albumartist
names instead.The text was updated successfully, but these errors were encountered: