spotifyd
spotifyd copied to clipboard
Retrieving the access token
I always get frustrated when fiddling around with DBUS for my music-related Python projects. There's already a nice Python library for Spotify called "spotipy". Instead of using the MPRIS implementation of spotifyd, I'd like to make those calls to the Spotify API by myself. After all, the MRPIS implementation does exactly the same what I want to do on my own. But the advantage of doing it on my own would be that I could skip this whole DBUS layer in my setups.
All I need is the currently used access token from spotifyd. For my current ongoing issue (https://github.com/Spotifyd/spotifyd/issues/1069) I actually misused the "loopStatus" to retrieve the access token and make the current_user_playing_song by myself to temporarily fix this ASAP for my projects. (I don't know anything about Rust so yeah...)
Would it be possible to set the access token as an environment variable? So that I can access is when the song_change_hook script is called?