robert-alfaro / genius-lyrics

Home Assistant custom component for fetching song lyrics from Genius.com
25 stars 7 forks source link

Feature request: album art url as attribute #24

Closed coolinx closed 10 months ago

coolinx commented 2 years ago

Love this integration and I hope it can be just a bit more awesome with this: Currently the lyrics entity has the following attributes: media_artist: media_title: media_lyrics: friendly_name:

Would it be possible to add one more attribute with the url to the album art? On genius.com I find next to the lyrics also an image of the album art, like this one https://t2.genius.com/unsafe/327x327/https%3A%2F%2Fimages.genius.com%2Ff1f8afb7f05089e0c2f1e2fd234c37c1.1000x998x1.jpg which is from this song https://genius.com/Supertramp-breakfast-in-america-lyrics

I (and perhaps other people also) would like to display this album art on the dash. Many thanks for still supporting this integration.

coolinx commented 2 years ago

I found this in the sensor.py:

@property
def extra_state_attributes(self):
    state_attrs = {
        ATTR_MEDIA_ARTIST: self._genius.artist,
        ATTR_MEDIA_TITLE: self._genius.title,
        ATTR_MEDIA_LYRICS: self._genius.lyrics,
        # TODO: add URL, Album Art
    }
    return state_attrs

So it is already on the to-do list, great!

coolinx commented 1 year ago

I think I'll put this one on my Christmas wishes list :-)

coolinx commented 10 months ago

Hi all, I still think the album art feature would make this integration more awesome. I just lack the programming skills to botch it together myself without breaking something else... I would be grateful if someone could spend some efforts to get this in.

robert-alfaro commented 10 months ago

I've added the album art as media_image attribute in new refactored branch...it's coming.

coolinx commented 10 months ago

Thank you so much for this. Great to see this integration gets some attention and is improved to get even better.