[GH-ISSUE #499] disconnect a client and be available for a new one #318

Closed
opened 2026-02-27 19:29:59 +03:00 by kerem · 3 comments
Owner

Originally created by @jgabriel98 on GitHub (Jun 27, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/499

This is a feature request, to add the possibility to disconnect a client from librespot, and then keep running, being available for a new connection.

This cenario makes sense when running in zeroconf mode, when you need to disconnect the client from librespot/"server" side. This can be super usefull to implement to MPRIS stop() method, for example.

I'm new to the librespot code, but i think that adding a Disconnect method to spirc class (in librespot-connect package) would be enough.

If i missed something and there's it is already possible to disconnect a client, please let me know.

Originally created by @jgabriel98 on GitHub (Jun 27, 2020). Original GitHub issue: https://github.com/librespot-org/librespot/issues/499 This is a feature request, to add the possibility to disconnect a client from librespot, and then keep running, being available for a new connection. This cenario makes sense when running in zeroconf mode, when you need to disconnect the client from librespot/"server" side. This can be super usefull to implement to MPRIS stop() method, for example. I'm new to the librespot code, but i think that adding a _Disconnect_ method to **_spirc_** class (in _librespot-connect_ package) would be enough. If i missed something and there's it is already possible to disconnect a client, please let me know.
kerem closed this issue 2026-02-27 19:29:59 +03:00
Author
Owner

@Malvineous commented on GitHub (Aug 15, 2020):

I'm not sure I understand the problem. Once you disconnect you cannot be available for a new connection as librespot has to initiate the connection to the servers. Once you have disconnected there is no way to signal a reconnect again, so librespot should exit otherwise it will keep running forever doing nothing.

What is the problem you are having? You can have multiple connections from multiple devices and just switch between them without needing any of them to disconnect.

<!-- gh-comment-id:674342376 --> @Malvineous commented on GitHub (Aug 15, 2020): I'm not sure I understand the problem. Once you disconnect you cannot be available for a new connection as librespot has to initiate the connection to the servers. Once you have disconnected there is no way to signal a reconnect again, so librespot should exit otherwise it will keep running forever doing nothing. What is the problem you are having? You can have multiple connections from multiple devices and just switch between them without needing any of them to disconnect.
Author
Owner

@JasonLG1979 commented on GitHub (Oct 6, 2020):

If i missed something and there's it is already possible to disconnect a client, please let me know.

Yes, in the devices menu of the spotify app just select the device itself. It will be called something like "This Phone", "This Tablet", or "This Computer" or whatever.

<!-- gh-comment-id:704074282 --> @JasonLG1979 commented on GitHub (Oct 6, 2020): > If i missed something and there's it is already possible to disconnect a client, please let me know. Yes, in the devices menu of the spotify app just select the device itself. It will be called something like "This Phone", "This Tablet", or "This Computer" or whatever.
Author
Owner

@jgabriel98 commented on GitHub (Jan 31, 2021):

I wanted to do this without needing to touch the spotify app.

But by the time i opnened this issue, i had little knowledge about librespot.
By now i do undertand that this feature request makes no sense.

Thank for everyone who took its time to help me.

<!-- gh-comment-id:770433851 --> @jgabriel98 commented on GitHub (Jan 31, 2021): I wanted to do this without needing to touch the spotify app. But by the time i opnened this issue, i had little knowledge about librespot. By now i do undertand that this feature request makes no sense. Thank for everyone who took its time to help me.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#318
No description provided.