02-23-2024, 04:49 PM
(02-23-2024, 04:35 PM)Nutul Wrote:(02-23-2024, 04:20 PM)jmguillaume Wrote: I've tweaked the spotevent.sh script to react to the changed event and not only to started/stopped, installed the python lib Spotipy on my moode player (quick and small) and wrote a small python script called by the spotevent.sh script and pass the spotify_id to it.
Now on every changed event, i have that kind of output (spotify_id, artist, album, song, url to coverart):
7GqIDx2QVGOpd4r1fZaUUW
Chicago
Chicago II
25 or 6 to 4 - 2002 Remaster
https://i.scdn.co/image/ab67616d0000b273...baed5aebf9
Hi,
that's exactly what I was able to achieve a month ago, more or less. Though not with the python library, but just using curl (to parse open.spotify webpages) and sed to filter the output.
I didn't proceed to sending the output to the backend / frontend to be shown, but in reality that was the only thing that was left to do.
Depending on how big / heavy is the python thing (and how it is aimed at compatibility towards the soptify "API" could be a better choice...
I think the approach that queries spotify web pages takes several seconds to get the metadata but it could be redistributed with moOde.
The approach that uses a Spotify dev account gets the metadata directly and is pretty much instant but the dev account token prolly can't be redistributed due the dev license, correct?