question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Selecting track to play from playlist doesn't seem to work

See original GitHub issue

What a great project. I saw it featured on hackaday and have got it mostly setup and running locally (on my PC running uBuntu 20.04 via WSL2 in Windows).

When browsing playlist tracks, are you supposed to be able to hit the “play/pause” button a track (or hit next on the track item) to start playing that instead of whatever is currently playing?

When I do this nothing happens, it just pushes in the Now Playing view and the existing track that is currently playing will just continue. See GIF for demonstration of what I mean:

Example GIF

Just wondering if this is expected, or if it is indeed meant to start playing the selected track? I’m not using Raspotify as a Connect Device as I’m running local on my desktop for now. Just a standard Spotify Windows App (also tried with spotify web player), but I’m not sure if this should make a difference or not.

BTW, a couple of things I found along the way that might trip up others:

  • I found I needed to change the keycodes for uBuntu Linux. I used xev to test what codes were used for my directional arrows and P / N which I assigned to previous/next.
  • I found the default spotify API scopes were not enough, and I would get a 401 response from the API in an exception when trying to run the frontend. To fix this I added user-read-playback-state (key to finding this was ‘devices’ API call to spotify returning 401 response. There may have been one or two other scopes needed, but when you see the exceptions its usually pretty clear which other scopes need adding 👍

I have some hardware on order and will attempt a full build once it arrives :]

Thanks!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
dupontgucommented, Jan 31, 2021

When I built this, I didn’t really think people would actually be trying to run it lol. I’m stoked to hear it hasn’t been a complete failure. Thanks for reaching out!

I consciously chose to have the play/pause button only affect whatever’s currently playing, reserving the center button for selecting something new. I though this was how the original ipod worked, but I forgot to test it before I ripped it apart.

Keycodes make sense, they seem to be different on every platform. Will add notes about scopes to docs, at some point. The biggest point of friction I found once I integrated with the pi is dealing with Openbox / getting things to launch automatically. If you (or anyone else) know of a clean way to get that done and documented, I would be all ears. I don’t even remember how I did most of it admittedly.

ALSO! If you’re interested, here’s the font. You should just have to install it like you would any system font.

0reactions
paulomurraycommented, May 20, 2021

playing spotify:playlist:29PsqPqwo71yUQzyaryJOf spotify:track:05FgZdqxXg40X0WG8MmWMA error! no devices

i changed this code as per the fix above

def refresh_devices(): results = sp.devices() DATASTORE.clearDevices() for _, item in enumerate(results[‘devices’]): if “ipod” in item[‘name’]: print(item[‘name’]) device = UserDevice(item[‘id’], item[‘name’], item[‘is_active’]) DATASTORE.setUserDevice(device) else: print(item[‘name’]) device = UserDevice(item[‘id’], item[‘name’], item[‘is_active’]) DATASTORE.setUserDevice(device)

my raspotify is working ok - the name of the device is ‘ipod’ and i can see it in Spotify Connect i can play music via the iphone to this Pi device for example

but when i navigate the content via VNC player - and attempt to play a song i get the screen attached here - and the error “error! no devices” in the terminal view

Image 12

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Can't select songs. Can only shuffle play. Please
I am enjoying my free premium trial but cant seem to play analbum through from start to finish? Can pick the first song...
Read more >
Apple Music doesn't always play next song chosen
Apple Music doesn't always play next song chosen. When I'm listening to a playlist and then select another song (from a different playlist,...
Read more >
How to Fix Spotify Shuffle Not Working - groovyPost
Launch the Spotify mobile app and start playing a song from a playlist. · As the song is playing, tap the Shuffle button...
Read more >
Troubleshooting YouTube Music - Google Support
Unable to play a song & general playback issues. Try these steps: ... YouTube Music Premium benefits not working. If you're a YouTube...
Read more >
Audio Recording - FL Studio
Hold (Ctrl + Left-click) and then drag along the bar-count at the top of the Playlist. If you don't make a selection then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found