alexkay / muspy

Album release notification service
https://muspy.com
GNU Affero General Public License v3.0
191 stars 25 forks source link

Album art doesn't work — nor has it in months #46

Open Mushnamukk opened 6 years ago

Mushnamukk commented 6 years ago

Regardless of the platform (I've tried the website, the mobile website, the Android app, Win7, Win8.1, and Win10, tried an iPad, switched routers, disabled all extensions and ad-blockers) but STILL the problem persists! I have a blank square for each and every album. Thank you come again roger that.

Mte90 commented 5 years ago

problem still persist

Mushnamukk commented 5 years ago

To anyone that has this same issue: PLEASE COMMENT! Getting bugs requires some attention from the community!

Screenshot included below.

no_album_art

Mte90 commented 5 years ago

The image file is generated but is empty :-)

Mushnamukk commented 5 years ago

Interesting; only noticed that after you pointed it out. They are 120x120 white, blank squares titled "cover" as opposed to an empty space.

alexvinall commented 5 years ago

Currently I see album artwork for some albums but not others:

image

Perhaps this is an issue where after a certain point this stopped working, but historic artwork was still generated correctly and so can still be viewed.

The reason you get a blank white square is that static/cover.jpg is returned if there is no album artwork.

Muspy attempts to fetch the covers from Last.fm using the MusicBrainz ID in daemon/jobs.py:

def _fetch_cover(mbid, url):

    ...

    # Sometimes we get just a one-pixel image, avoid resizing it.
    if len(image) < 4096:
        logging.warning('[ERR] Bad image, skipping')
        return False

    logging.info('[JOB] Saving the cover')
    try:
        im = Image.open(StringIO.StringIO(image))
        im = im.resize((120, 120), Image.ANTIALIAS)
        f = StringIO.StringIO()
        im.save(f, 'JPEG', quality=95)
        image = f.getvalue()
        Cover(mbid, image)
        return True
    except:
        logging.warning('[ERR] Could not save the cover, skipping')
        return False

Looks like there a couple of ways this can fail - I wonder if Last.fm has changed their cover API and returns images that are too small.