moritz-weber / mucke

mucke - android music player
GNU General Public License v3.0
226 stars 12 forks source link

Add artist thumbnails on artist pages #145

Open Serial-ATA opened 1 year ago

Serial-ATA commented 1 year ago

Is your feature request related to a problem? Please describe. The artist page currently looks a little empty with the top only being occupied with the bold, centered text of the artist's name on a dark background.

Describe the solution you'd like Something such as Spotify, Deezer, or some other popular service that provides artist images could be used to pull images to liven up the artist page.

Describe alternatives you've considered Keep the artist page as it is now, as this is purely a stylistic change.

Additional context Current artist page:

Spotify artist page banner: image

RetroMusicPlayer (another Android music player) artist image fetcher (Deezer): https://github.com/RetroMusicPlayer/RetroMusicPlayer/tree/dev/app/src/main/java/code/name/monkey/retromusic/glide/artistimage

FriederHannenheim commented 1 year ago

Hey @Serial-ATA nice to see you here. Since Mucke now uses your Lofty-rs as a backend for metadata fetching we could get an artist picture from the ID3 tag. I don't know if tags on other formats support artist pictures though. Mucke is by design entirely offline so fetching artist images from the internet is out of scope. Maybe we could do something like Spotify does with playlist pictures and combine multiple album covers from an artist to an an artist picture like this image showing a spotify playlist

Serial-ATA commented 1 year ago

Ah, didn't know it was offline by design :).

we could get an artist picture from the ID3 tag. I don't know if tags on other formats support artist pictures though.

You definitely could go this route, however:

The album cover collage might be the best route if the internet is off limits :).

Just a note, something I've noticed YouTube Music do when they don't have an artist image available is they simply take the latest release from the artist and stretch it to become a banner. This isn't a perfect solution, it sometimes looks awful, but most of the time it gets the job done.

moritz-weber commented 1 year ago

I wanted to do this for a long time, but there is always something else to do/fix 🥲

Yes, mucke is offline by design. Mostly, because it's just a small hobby project and I want it to be useful even if I decide not to maintain it anymore. Online APIs might change, or usage restrictions might make it necessary to run servers for the app. Then there might be privacy concerns... Just a lot of points I don't want to think about.

I'm not a big fan of using tags for this. Requiring to embed the same picture potentially hundreds of times seems a bit wasteful (and a pain to manage). I thought about this for a while and basically have two solutions in mind.

  1. Create a simple configuration file format to specify image files for artists. This could be a simple JSON format like this:

    {
    "AC/DC": "acdc.jpg",
    "ZZ Top": "zz-top.png"
    }

    So, basically specifying the artist name and an image path relative to the configuration file. Allowing the user to set pictures in-app, this configuration could be created by the app and could be exported to allow the user to take their data to another phone. Also, this config file would be easy enough to prepare on a PC, where it is probably more convenient to look for good pictures and manage your music library.

  2. Scan the file tree from the song file to the root until a file called artist.<jpg,png,...> is found. This file is then used for the artist of the song. This would be less explicit and potentially more error-prone. Also, this requires a certain way to organize the library.

I think, I prefer the first option, but I'm open for feedback/opinions.

Serial-ATA commented 1 year ago

Those are some really good arguments for being offline only. I hadn't thought about them! :)

I think the config file would work best since you can export your app data already.

If you choose to do that, I'd be willing to make a tool to pull the images externally and create the file automatically.

EDIT: Something to take into consideration, though, is name collisions. How are those handled internally?

moritz-weber commented 1 year ago

I would love to see that tool 😍 I have no problem committing to this option. Although, the development focus is currently on getting all the metadata stuff right, so it might take a while to implement this in mucke.

If you ask, how the app distinguishes two artists with the same name, the answer is: it doesn't. If two artists have the same name, they are the same artist for mucke. I have no idea, how we should solve such conflicts without an external data source that maps songs/albums to artists with a unique ID.

Serial-ATA commented 1 year ago

EDIT: I completely forgot about this issue, so I didn't remember that you already said this (https://github.com/moritz-weber/mucke/issues/145#issuecomment-1714452778) :smile:

I'm thinking a better approach might be to search for artist.{png, jpg, ...} in the song directory.

I recently found tools that download an artist.png just like you would for an external album cover cover.png. You could very well just look for that file and use it if present. That'd save the trouble of having to create a new config format and deal with all the issues that come with it, such as the name collisions.