ampache / ampache

A web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device.
http://ampache.org
GNU Affero General Public License v3.0
3.51k stars 589 forks source link

art retrieval using lastfm method always gets the small 34x34 art #2268

Closed cquike closed 2 years ago

cquike commented 4 years ago

When art is retrieved using the lastfm method the audioscrobbler API gives back a list of different art resolutions. The first one seems to always be a 34x34 pixel art which is the one retrieved by ampache, leading to bad resolution art. If setting album_art_min_width/height is set then one can filter the smaller images, but since the album_art_max_width/height is not set, I would expect that by default it takes the art with the largest resolution.

Here is an example of the audioscrobbler API reply: https://ws.audioscrobbler.com/2.0/?method=album.getInfo&artist=Led+Zeppelin&album=Remasters&api_key=d5df942424c71b754e54ce1832505ae2

lachlan-00 commented 4 years ago

so it's getting the first one in the list? I thought art was removed by last.fm so that's good to see it's still in there image

lachlan-00 commented 4 years ago

I think the art check must just pull in the first image result which is the smallest

cquike commented 4 years ago

Yes, I think your are right, otherwise you could potentially fill the DB with ridiculously large images. However the current situation is far from ideal, since in the default configuration, for art not found in musicbrainz, ampache will resort to the small lastfm covers. I think that the default setting for album_artmin should then be set to some reasonable value (maybe 100? 200?). And maybe also the default for album_artmax should be set (maybe 1000?) to avoid populating the database with extremely large images.

lachlan-00 commented 4 years ago

i think it's reasonable to set a min of 200 for last.fm but then we should be able to iterate through the results and ignore things that are set in config as well.

lachlan-00 commented 4 years ago

we should probably reverse that if it's an array of results and check against the config. I think it's easy enough to fix though. it would explain why i was not getting last.fm results because i set my min to 200x200