Skip to content

Improvement: show spotify code of current radio track #61

@marco79cgn

Description

@marco79cgn

Not really an issue, but I kindly ask if someone would help me to show an additional image (Spotify code) as overlay of the cover (see preview below).

Background:
I never wrote any python code before but managed to integrate Spotipy (in sonos_user_data.py). I'm using it to show cover art of the current track on (mostly german) radio stations. I'm reading both artist and track name from the radio text, query Spotify, get the cover url and set it as background image (image_uri). This already works pretty good.
As a bonus, since I already have the spotify metadata, I'd like to show the spotify code as well. It's kind of a qr code that can be scanned in the Spotify app to play the track. I already know how to get the code, I just have to put the spotify track uri at the end of this url to download the image with the code:
https://scannables.scdn.co/uri/plain/jpeg/368A7D/white/640/spotify:track:5wEoNauEpwOc2rlU0274oT

ToDo:
So all there's left to do is to display this image for example in the upper right of the cover art (as overlay). I'm struggling how to do that as I don't really understand this tk mechanism (and how to extend label_albumart_detail). Any help is really appreciated.

This is how it shuold look like:
Cover-SpotifyCode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions