Spotify - Switching to access token
-
In the latest code from git I switched to using access token for streaming with Spotify.
The gstreamer spotify plugin needs to be patched with https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1801
I've updated the instructions here: https://wiki.strawberrymusicplayer.org/wiki/Installing_GStreamer_Spotify_plugin
If someone with a subscription could test it would be great, thanks. -
I managed to stream music from Spotify using strawberry in one of the first versions in which spotify support was implemented. However, now I cannot reproduce songs anymore. I have a premium subscription and I have authenticated in the settings menu. After authentication I can see that Strawberry is listed within the authorized applications in my Spotify account. I have followed your latest instructions including the patch and recompiled the gstreamer spotify plugin. When trying to play a song I get the following error in Strawberry:
Could not get/set settings from/on resource.
audio/spotify/src/spotifyaudiosrc/imp.rs(280): <gstspotify::spotifyaudiosrc::SpotifyAudioSrc as gstreamer_base::subclass::push_src::PushSrcImpl>::create (): /GstPlayBin3:pipeline-5-pipeline/GstURIDecodeBin3:uridecodebin3/GstURISourceBin:urisourcebin4/GstSpotifyAudioSrc:spotifyaudiosrc4: access-token is not set and credentials are not in cache
Internal data stream error.
../libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPlayBin3:pipeline-5-pipeline/GstURIDecodeBin3:uridecodebin3/GstURISourceBin:urisourcebin4/GstSpotifyAudioSrc:spotifyaudiosrc4: streaming stopped, reason error (-5)
Could not demultiplex stream.
../ext/ogg/gstoggdemux.c(4775): gst_ogg_demux_send_event (): /GstPlayBin3:pipeline-5-pipeline/GstURIDecodeBin3:uridecodebin3/GstURISourceBin:urisourcebin4/GstParseBin:parsebin4/GstOggDemux:oggdemux4: EOS before finding a chain
I can play the very same song using
gst-launch-1.0 spotifyaudiosrc access-token=$TOKEN track=spotify:track:139Bu2BWsQfVDixXMYos5W ! oggdemux ! vorbisdec ! audioconvert ! autoaudiosink
as access-token I use the one in ~/.config/strawberry/strawberry.conf within the Spotify section.
I am using strawberry 1.1.3 as provided in debian/unstable
-
@andr3nio
Using 1.1.3 won't work, I made the change because Spotify dropped support for username and password. -
@jonas
After compiling the code from git streaming from Spotify works.