Selecting track to play from playlist doesn't seem to work
See original GitHub issueWhat 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:
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:
- Created 3 years ago
- Comments:11 (6 by maintainers)
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.
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