mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #171] Keep alive Spotify Connect during "Active" and playback "Paused", Time-Out duration #107
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#107
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 @olaf-at-oradio on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/171
I like to use this fantastic go-librespot to support a music player for elderly people. When Spotify Connect is active, I like to pause the playback for some time.
During my testing, after some hours, it seems that there is a kind of "Time-out" mechanism.
Is there a time-out indeed configured? and is it possible to keep an Active connection alive for longer period (say couple of pays)? Thanks
@devgianlu commented on GitHub (Feb 15, 2025):
I think the timeout you are observing is enforced by Spotify. I am also used to coming back to the Desktop/Android app and not having my previous Spotify Connect session active.
@olaf-at-oradio commented on GitHub (Feb 17, 2025):
When I run librespot, I see that there is a kind "keeping alive pin pong" see picture. Is that also active in go-librespot?
@devgianlu commented on GitHub (Feb 17, 2025):
Yes, that is required to keep the AP and Dealer connections with the server alive.
@olaf-at-oradio commented on GitHub (Feb 18, 2025):
Tested with requesting status update every 20 seconds . It kept the connection for 3943 seconds and than it stopped. Is there a better way to keep the connection?
@devgianlu commented on GitHub (Feb 18, 2025):
I think this will happen as long as you don't issue any command to the player. You might try sending small volume updates every 5 minutes or so to see if the session remains alive.
@olaf-at-oradio commented on GitHub (Feb 27, 2025):
Have tried volume updated, and seek (1 s) every 20 s, in the pause mode.
Did not work. At this moment, it seems that during pause, resume play for 1 s every x seconds works. Tested x = 20 s, hopefully x can go up to 5-10 min. Than it would be a possible "hack". It is far from elegant, but if it works, for now it would be ok. Will update on the test results.
@olaf-at-oradio commented on GitHub (Feb 27, 2025):
Another question, I test now with "persist_credentials" = False. Would it make a difference if it is persist_credentials" = True?
@devgianlu commented on GitHub (Feb 28, 2025):
persist_credentialsonly toggles whether Zeroconf credentials are saved so that you are automatically logged in next time. It doesn't affect the Spotify playback session.@olaf-at-oradio commented on GitHub (Mar 1, 2025):
Have tested up to 600 s and 900 s. 600 s works, 900 s not. Every 600 s , 1 s play is a workable workaround for us. As far as I can see, the connection stays for many hours active.
@olaf-at-oradio commented on GitHub (Mar 2, 2025):
Great, tested the persist_credentials. This works excellent. With this feature I can play playlist , without the need for the Spotify app. So, standalone operation is now possible. We will build further on this and give an update
@devgianlu commented on GitHub (Mar 30, 2025):
That's great, thank you for sharing. I'll close this for now.