Help needed to test Spotify plugin with Oauth

Hi skikirkwood,

I am a new to volumio and I love it and it works good with qobuz. (Volumio 2 on Raspberry Pi 3 B+ plus BOSS DAC)
If I understand you correctly, I can stop searching for a solution with Spotify playlists, right?

So you are the man, the hero :ugeek: , who will give me access to the spotify playlists on my volumio?
What do you expect, weeks or month to implement it?

I do not want to chase you, I just want to be sure that my problem is a problem of all volumio users and I can stop searching for a solution.

Regards
Marcus

Flying back to San Francisco from Berlin last week killed me, and I tried to patch up the Spotify plugin severely jetlagged last Sunday. Let me try again this weekend. I’m eager to get it working so I can listen to my own playlists!

Ok Marcus, here you go - just committed this so no serious testing yet. But it appears to work. :slight_smile:

github.com/skikirkwood/volumio- … y/index.js

To those of you first seeing this, to get the Spotify plugin working on Volumio you will need to patch its index,js file with the above. Full instructions are:

Get a Spotify Refresh Token

Go to 54.86.144.136:8888/ and click on “Log in with Spotify”.

After plugging in your Spotify credentials you should be redirected to a page that shows who you are logged in as, with two oAuth tokens. Copy the bottom “Refresh token”.

Get a copy of the new Spotify index.js file
Now grab a new version of the Spotify plugin’s index.js file from here:

github.com/skikirkwood/volumio- … y/index.js

Plug in the refresh token you got from above
In line 451 replace the x’s with your refresh token:

var refreshToken = 'xxxxxxxxx';

Copy the edited file to your Volumio system
Now copy this file over to your Volumio system. First save the current version of the plugin’s index.js file:

ssh volumio@volumio.local
cd /data/plugins/music_service/spop/
cp index.js index.js.old
scp user@<your PC>:/path/to/new/index.js .

Reboot!
Reboot your Volumio system. Now you should be able to browse to your Spotify plugin, and with luck, “My Playlists” will work! Tested on Volumio 2.555.

I did but I see PlayLists but not Open.

Both My Playlist an Spotify Playlists.

Do you have news ? It is just me ?

Now I used your last index.js and now my PlayLists works but Stotify FeaturedPlayLists. :question:

Now, I have youtube with my account.
Registered App
When I click Play It crashs orsimply not play.
Spotify Works

@skikirkwood

Thank you very much for the update. Great work !
Spotify is working fine again. I can access and play all my playlists.
Volumio 2.565
Any chance to get the Volumio Spotify official plugin patched with your work as it is de facto deprecated ?

Awesome work !!!

thank you very much! :slight_smile: :slight_smile:

Didn’t test that yesterday, so both Featured Playlists and Genre’s and Moods required a patch as well. Fixed in the latest version here:

github.com/skikirkwood/volumio- … y/index.js

Remember to plug in your refresh token on line 451. Everything should be working now.

The core Volumio team is working on taking the hack I’ve done and incorporating the Oauth work properly into the Volumio system. They hope to have this done in the next few weeks.

I discovered that Genre’s and Moods and Features Playlists required a patch as well, so get the latest version of the index.js file for the fix:

github.com/skikirkwood/volumio- … y/index.js

Your Spotify plugin patch works great for me, thanks so much @skikirkwood! :smiley:

Thank you very much for the update.
I have downloaded and installed your last index.js file linked above but unfortunately Featured Playlists and Genres & Moods playlists are NOT working.
I can display playlists list but cannot display playlist tracks list nor play them.
My own playlists are working fine.

It’s not enough to just download and install it, you have to generate a refresh token and insert it in line 451 in the index.js file. See the description here.

Obviously my refresh token has been inserted on line 451 but behavior is the one I have described above.
Without refresh token inserted my own Spotify playlists would not work but they do.

I tried last index.js; working MyPlaylists but Spotify Playlists or Albums.

Hi, and well done.

Is It still actual?

With new index.js My Playlists are working again but not Featured Playlists and Genres & Moods Playlists. One problem showing only 50 of My Playlists (and others). Is there a solution coming up?

I initially put out a version without realizing an additional patch was needed for Features Playlists and Genres & Moods. The latest version of the plugin’s index.js file is here:

github.com/skikirkwood/volumio- … y/index.js

To verify you have the right version check that line 1855 is:

else if (uri.startsWith('spotify:playlist:'))

I’m listening to my Volumio system with Spotify Genres and Moods along with Featured Playlists right now.

I started working on adding pagination support to the plugin last weekend so you can view more than 50 playlists, playlists with more than 50 tracks, etc. Can’t promise anything but some possibility we’ll have a solution for you soon.

@sikikirkwood, I also want to know your post adress to send you another bottle of wine.
Thanks a lot, having Spotify connected to volumio is priceless!

@skikirkwood
I have downloaded last index.js file from your repo and install it again after inserting my refresh token.
Despite line 1855 is correct Featured Playlists and Genres & Moods are not working. Playlists are displayed but my system is unable to open and play them.
My Spotify playlists are working fine.
Volumio 2.565
Thank you for your support.