mirror of
https://github.com/Rigellute/spotify-tui.git
synced 2026-04-26 08:05:57 +03:00
[GH-ISSUE #366] Cannot change device. #154
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-tui#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ppublicgit on GitHub (Mar 30, 2020).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/366
After running spotifyd and then spt, I am unable to see my computer as an option for devices. This seems to be a spotifyd issue, but I figured I would check here first. I can see my tv, and phone as options (but I cannot switch the playback device as Enter will not change the device for playback) but my computer will not show up. If I launch the spotify client from the AUR then my computer shows as an option but I again I am unable to switch the playback device. If I change the playback device via my phone though, spotify-tui correctly recognizes a new playback device has been chosen.
@Rigellute commented on GitHub (Mar 30, 2020):
When you have the official client open on your computer, can you see it in the list? I've just been testing it out and it's working, using my phone, official client on computer, and spotifyd running.
@ppublicgit commented on GitHub (Mar 30, 2020):
If I have the official client open on my computer, I can see the client in my list of devices but I still cannot change the output to my computer. I am able to pause, skip songs etc via the spotify-tui application but cannot change playback device.
@Rigellute commented on GitHub (Mar 31, 2020):
Hmm... if you disable the spotifyd daemon can you change devices?
@ppublicgit commented on GitHub (Apr 4, 2020):
Sorry for the late response. Been busy the past few days. I realized my spotifyd install was not adequate (I use pulseaudio as a backend and my spotifyd install only had support for alsa). I have been trying to get the proper install but have run into several issues. I have disabled spotifyd but still cannot change devices. I am able to pause, skip, save change songs etc without an issue and the correct devices are always shown in the playback choices but I just cannot switch it seems (though it did work twice out of the 100 or so attempts I have made, I have no idea why it worked those two times and none of the others though). For now I am going to try and get spotifyd to work first, whenever I can find a little spare time, and see if that solves the issue for me. Thanks for the speedy replies.
@ppublicgit commented on GitHub (Apr 4, 2020):
One question though, if I do get spotifyd working, should that be a new choice for a playback device separate from my regular laptop choice via the official client?
@Rigellute commented on GitHub (Apr 6, 2020):
You're right yes, spotifyd should appear as another device in the list 👍
@TimotheeGerber commented on GitHub (Apr 17, 2020):
I think there may be two different problems here. I'll try to explain both and propose a workaround for each one. I am quite new to
sptotify-tuiandspotifydso don't hesitate to correct me if I am wrong.spotify-tuiusesrspotifywhich in turn is based on the official Spotify Web API. As a consequence, the list of devices proposed byspotify-tuicorrespond to the devices already registered on Spotify servers.spotifydcan be used with two different authentication scenario. You can provide a username/password and it will automatically register on Spotify servers. Thus, it will be available inspotify-tuidevice list. The second authentication possibility is to use the discovery mode:spotifydwait for a Spotify client to send the credentials. This method is based on Zeroconf (also called mDNS for Multicast Domain Name Service) and needs that the Spotify client and the receiver (herespotifyd) are on the same network.In the second case,
spotify-tuiis not able to find the device because it is not registered on Spotify servers. Andspotify-tuidoes not implement the discovery mode. But, once you selectspotifydas a device in the official Spotify client, it get the credentials and register to the Spotify servers. Therefore, it becomes available in thespotify-tuidevice list.I am currently working on a small code to authenticate a device via discovery mode to ditch completely the official Spotify client and be able to use my Onkyo amplifier with
spotify-tui. If I manage to do it properly, I will release it as a crate, so maybespotify-tuicould use it in the future.The second problem is that
spotify-tuidoes not transfer playback from one device to the other when selecting a device. That means that the currently playing song will not stop on the previous device and resume on the new one. Instead, the internal representation change and next time you will play a song, it will start on the new device (this automatically stop the playback on the old device as Spotify only allow one playback at a time).This lead to strange situations. If you change device, play/stop/next/volume/etc command will be send to the new device playing nothing, not to the old one still playing a sonf. So
spotify-tuilooks like doing nothing at all.I'll try to make a PR to change this behavior. The idea is to call the
transfert_playbackfromrspotifywhen changing the device.@ppublicgit commented on GitHub (May 2, 2020):
Sorry for the late response. I decided to do a complete reinstall of Arch (for an unrelated reason) and have been busy getting everything up and running. Anyways, what you said is true. I would not be able to transfer the player after repeated attempts, but then it would randomly work (because the song had finished). I am going to close the issue since the problem has been solved.