OrfiTeam / OrpheusDL

586 stars 74 forks source link

Support saving multiple album artists (Qobuz) #22

Closed rumzie closed 1 month ago

rumzie commented 1 year ago

When downloading an album that has multiple album artists, only the first album artist is saved to the ALBUMARTIST tag. For example, the Kids See Ghosts album displays "Kids See Ghosts • Kanye West • Kid Cudi" as album artists on Qobuz (https://play.qobuz.com/album/f91ymo1s6vtgb), but the ALBUMARTIST tag on the file only contains the first album artist. I can recall the displaying of multiple album artists on the web app (play.qobuz.com) being a relatively new feature. This issue does NOT happen with the regular Artist tag.

mexsana commented 1 year ago

Orpheus should already support this feature, perhaps it may not be showing correctly for your player? I'll take a close look at it later.

Dniel97 commented 1 month ago

No further activity, closing.

rumzie commented 1 month ago

Daniel/mexsana, I still haven't figured out how to save multiple album artists tags. Is there a way I can help debug, maybe one of my configs aren't set right? Mp3tag shows only a single album artist for the example posted above (but does save multiple artists)

Dniel97 commented 1 month ago

Ah now I understand the issue. OrpheusDL currently only supports a single album artist by design, the reasoning behind is that if you use, f.e.:

{
    "album_format": "{artist}/{name}{explicit}",
}

it would only create a folder with the album artist. If you have multiple album artists that would mean you have to seperate them by a seperator (,, ;, ) and you would have to choose an artist to be the "first". That is the reason there is only one album artist (main artist) present.

rumzie commented 1 month ago

Thanks Dniel, makes sense. So I am assuming this isn't as simple as changing the album_format setting, and would likely be a code change?

OrfiDev commented 1 month ago

If I'm understanding correctly, the issue is that the ALBUMARTIST tag is only ever the first artist. This is actually an oversight by me, and is actually an issue.

I looked into the full story since I was curious, originally the artist tag was also set up like this (where only the first artist was saved) since Qobuz actually has a truly terrible system for how artists are handled internally whenever there is more than one artist (at least it did when I wrote the module), and OrpheusDL was actually designed originally around Qobuz as its main module (it was the very first one developed in tandem with it). However with other modules multiple artists was an important feature so the ARTIST tag was fixed (and a funny workaround is used with Qobuz where for the ARTIST tag, it gets the other artists from the track credits because Qobuz is too poorly written to add them directly which is why tracks don't actually have multiple artists, or at least they didn't when I wrote the module), but the ALBUMARTIST tag was actually overlooked since it wasn't super important.

TLDR yes this is an issue that used to be shared with the ARTIST tag, but it was actually just completely forgotten about and didn't get the same fix the ARTIST tag did.

rumzie commented 1 month ago

Great insight @OrfiDev, definitely not fun interpreting the data from a proprietary system. I've been trying to replicate the artists code paths for the albumartist tag. I see those tags live in different properties (track_info.artists VS track_info.tags.album_artist), but cant seem to find where those values are actually set (I blame my lack of python experience). I will keep trying to code this out in my free time, but would gladly take any helpful code/line references!

OrfiDev commented 1 month ago

Since the web player can get the album artists properly then there is something in the API that has all of them listed, which shouldn't be difficult to work out by just searching through the network requests it makes, and those changes would be part of interface.py for the Qobuz module in theory. The bigger issue is that the album_artist is just a string right now globally with both the core OrpheusDL code and all modules (though the all modules thing could be avoided by just creating a new field like album_artists and have it be a list, with album_artist being deprecated), so making it be properly handled by the tagging library would take a lot more changes I believe (though maybe the artists can just be put into the album_artist string? Would the null separator or whatever still work? Not sure, that's more Dniel97's field rather than mine, I never really touch the tagging code myself).

Edit: I forgot to mention this but the way track artists are handled is not how album artists should be handled, it's just a workaround that uses track credits for Qobuz's weird system. Also, I'm surprised that you're still interested in this, two years later!

rumzie commented 1 month ago

I've been using orpheus for some time now, much appreciative of all your work. I initially noticed this issue a year ago when the web player randomly started displaying multiple album artists, so I started looking into how to save that to tags. I will most likely go down the route of adding a new new property, if I can properly source the values. Not really an issue for someone like me that meticulously runs everything through MusicBrainz Picard, but will definitely report back if I can get a relatively decent solution coded out.