peguerosdc / subplayer

A music player frontend compatible with Subsonic backends
https://subplayer.netlify.app/
GNU General Public License v3.0
87 stars 12 forks source link

unnecessary repeated genre tags in album view #48

Closed davebiffuk closed 3 years ago

davebiffuk commented 3 years ago

Hi,

I'm using the docker.io/peguerosdc/subplayer container, image ID f85d2fdf67b0, with Supysonic latest master version. In the album view screen, I see the genre tag for every track listed even when they're identical, e.g.:

Genre: Classical, Classical, Classical, Classical, Classical, Classical, Classical, Classical, Classical, Classical, Classical

The tracks all have the same genre tag:

dave@hake:~/mp3/Christopher Tin/To Shiver the Sky$ eyeD3 *mp3 2>/dev/null | grep -i genre
track: 1/11     genre: Classical (id 32)
track: 2/11     genre: Classical (id 32)
track: 3/11     genre: Classical (id 32)
track: 4/11     genre: Classical (id 32)
track: 5/11     genre: Classical (id 32)
track: 6/11     genre: Classical (id 32)
track: 7/11     genre: Classical (id 32)
track: 8/11     genre: Classical (id 32)
track: 9/11     genre: Classical (id 32)
track: 10/11        genre: Classical (id 32)
track: 11/11        genre: Classical (id 32)

This happens for every album I've checked. It seems unnecessary and it certainly clutters the screen. Is there a way of suppressing the repeated genres?

Thanks!

peguerosdc commented 3 years ago

Hi!

Thanks for opening the issue. Some questions:

davebiffuk commented 3 years ago

Hi, Yes, this is "/album/ID". There's an example screenshot here: https://eyas.biff.org.uk/~dave/Screenshot_2021-09-11_17-14-57.png I'm using arm64 with this image:

dave@hake:~$ podman images
REPOSITORY                      TAG     IMAGE ID      CREATED       SIZE
docker.io/peguerosdc/subplayer  latest  f85d2fdf67b0  7 months ago  48 MB
peguerosdc commented 3 years ago

Got it.

I checked Supysonic's code and it is returning a concatenation of the genres of all the songs in the album (which is exactly what you are seeing), but that behavior looks odd as I would expect the album to have just one plain genre.

Then, I checked Subsonic's official API to see what "the standard" is, but the getAlbum example doesn't return the "genre" field, so there's no reference. I am using Navidrome which doesn't have that issue as the genre of an album is just a plain genre, which I think is the correct implementation.

Solving this issue would require adding special considerations to handle the Supysonic case, so I won't be able to fix it. Instead, I would suggest opening an issue on Supysonic's repo to see what they think and if they are able to change their API 🙂

davebiffuk commented 3 years ago

Thank you for the very clear explanation! The change to Supysonic is tiny so I've opened a pull request there: https://github.com/spl0k/supysonic/pull/221