SoongNoonien / plattenalbum

Connect to your music
GNU General Public License v3.0
184 stars 26 forks source link

albumartist_sort tag #45

Closed vredesbyyrd closed 2 years ago

vredesbyyrd commented 3 years ago

Hi,

First, congrats on the excellent mpd frontend. IMHO it is without a doubt the most well thought out and cleanest mpd gui I have tried - and I am pretty sure I have tried them all.

All my music is tagged with beets, which mainly uses musicbrainz as a source, and a large portion of the files have albumartist_sort tags.

Is mpdevil able to use the albumartist_sort tag, if not would you be open to using it? Before I stumbled on your program I made a rofi fronted for mpd, and it first looks for albumartist_sort tag and if not present uses albumartist.

As an example the following screenshot shows how the artist alice sara ott it displayed in both players artist list.

Screenshot from 2021-11-24 20-56-43

Perhaps mpdevil could have an option to prefer albumartist_sort, fallback to albumartist?

Thanks for your time

SoongNoonien commented 3 years ago

Hi,

First, congrats on the excellent mpd frontend. IMHO it is without a doubt the most well thought out and cleanest mpd gui I have tried - and I am pretty sure I have tried them all.

Thanks! :-)

Is mpdevil able to use the albumartist_sort tag, if not would you be open to using it?

I already thought about it but never actually tried it since I'm currently not using these *_sort tags. So yes I'm open to support it but I'd also like to support the album_sort tag to simplify the settings by removing the "Sort albums by year" toggle.

Perhaps mpdevil could have an option to prefer albumartist_sort, fallback to albumartist?

This should work automatically without the need of an extra option.

As an example the following screenshot shows how the artist alice sara ott it displayed in both players artist list.

I do not fully understand what is visible on this picture. If I implemented the *_sort tag support "Alice Sara Ott", "Alice Sara Ott, Francesco Tristano" and "Alice Sara Ott; Tchaikovsky; Franz Liszt" would still be distinct entries in the list. I don't understand why the other player displays just one "Alice Sara Ott" entry. What's the logic behind it?

vredesbyyrd commented 3 years ago

I do not fully understand what is visible on this picture. If I implemented the *_sort tag support "Alice Sara Ott", "Alice Sara Ott, Francesco Tristano" and "Alice Sara Ott; Tchaikovsky; Franz Liszt" would still be distinct entries in the list. I don't understand why the other player displays just one "Alice Sara Ott" entry. What's the logic behind it?

So a better description of my rofi "mpd" player would be: A simple frontend to browse your beets database, make fts queries and play selections using mpd. It only uses mpd to play the music, view/edit the queue etc. Mainly, I wanted the ability to quickly play music based off of beets flexible attributes and AcousticBrainz data.

I don't understand why the other player displays just one "Alice Sara Ott" entry. What's the logic behind it?

All "Alice Sara Ott" tracks have albumartist_sort = Alice Sara Ott. The "Artist List" is grouping by albumartist_sort.

Since its sqlite all I am doing is:

SELECT
    coalesce(NULLIF(items.albumartist_sort,''), items.albumartist) AS albumartist_sort
...

I have not dug into mpd much at all so I am not sure how it should be implemented, and I might be missing something with your last question.

SoongNoonien commented 3 years ago

All "Alice Sara Ott" tracks have albumartist_sort = Alice Sara Ott. The "Artist List" is grouping by albumartist_sort.

Ok, that's different from what I have in mind. I think of the "*_sort" tags as hidden tags which will not be visible in the gui and only control the sorting. A simple example would be "The Beatles", one can set "The Beatles" as albumartist and something like "Beatles" or "Beatles, The" as albumartist_sort, similar to "Album Leaf, The" in your collection. This would simply make "The Beatles" appear under B in the artist list. An artist would then be defined by the albumartist tag in combination with the albumartist_sort tag. According to my observations this is what other players (Lollypop) or MPD clients (cantata) do as well. Is this logic something you could work with? To solve your problem with "Alice Sara Ott" I'd use multiple albumartist tags, this would make all albums of "Alice Sara Ott" appear under "Alice Sara Ott" an those by "Alice Sara Ott" and "Francesco Tristano" would also appear under "Francesco Tristano", similarly for "Tchaikovsky" and "Franz Liszt". But I don't know if this is an option for you.

vredesbyyrd commented 3 years ago

Sorry for the delay, I missed the notification somehow. I appreciate your thorough response.

This would simply make "The Beatles" appear under B in the artist list.

According to my observations this is what other players (Lollypop) or MPD clients (cantata) do as well. Is this logic something you could work with?

Absolutely. I forgot to mention the issue of sorting artists that begin with a, the etc. The way you describe it sounds great.

SoongNoonien commented 2 years ago

Hi! This should now be implemented in master. Please let me know if it works as expected.

SoongNoonien commented 2 years ago

Sorry, forgot to mention, you need https://github.com/SoongNoonien/python-mpd2 to test. My pull request has not yet been excepted.

Edit: I looked into it again and was able to include the patch into mpdevil. So it is now possible to try master without a special version of python-mpd2.

vredesbyyrd commented 2 years ago

When I get home i'll test it out master branch and report back asap. Thanks!

vredesbyyrd commented 2 years ago

Working as expected :)

It looks like it was a relatively large commit - I appreciate you implementing this feature!