mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #14] Support "discovery mode" like in librespot #7
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#7
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 @phts on GitHub (Nov 14, 2023).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/14
https://github.com/plietar/librespot/blob/master/README.md#discovery-mode
This mode allows to connect to the device by any user, not only currently logged in. So everybody in the netwrok can use the device.
@devgianlu commented on GitHub (Nov 15, 2023):
This mode is already supported and is called
zeroconf. It can be used with a configuration like this one:I realise that a lot of documentation is still missing!
@phts commented on GitHub (Nov 15, 2023):
Is it possible to have it simultaneously with normal authentification?
Use case: I logged in on the device with spotify integration and get token, and this device uses my token to show my content in its UI, e.g. I can see my artists,albums, etc. And in the same time, "connect" is available for any device in the network, because in fact my token not required to make "connect" available for any device.
librespotI believe has this option separatelly from main authentification@devgianlu commented on GitHub (Nov 15, 2023):
Having one instance handle two sessions simultaneously seems a very specific and uncommon case. Perhaps you could have two instances of go-librespot: one that handles the UI and is logged in and one that does the playback and uses Spotify Connect. What do you think? A reasonable change would be to allow go-librespot to run without showing up as a connectable device.
@phts commented on GitHub (Nov 15, 2023):
Actually not quite uncommon.
There is community page regarding volumio's new spotify plugin which was migrated from rust librespot to go-librespot, users complaining about this missing feature, now it requires to log out to allow other users to use "connect". Then log in to use UI. Which is quite inconvenient.
@phts commented on GitHub (Nov 15, 2023):
yes, theoretically could work 👍
@devgianlu commented on GitHub (Feb 7, 2024):
This is being worked on with
github.com/devgianlu/go-librespot@8a2cb3b5a4, I have tested it somewhat, but not extensively.@phts commented on GitHub (Feb 7, 2024):
@devgianlu great,! thanks Please create a new version to be able test it
Cc @volumio
@volumio commented on GitHub (Feb 7, 2024):
@phts synced with @devgianlu let's test by compiling and testing it, so then we can provide feebdacks to @devgianlu if that works. Note, to make it work we shall always keep zeroconf_enabled = true
@phts commented on GitHub (Feb 9, 2024):
@devgianlu
still need new release to try it 🙏
@devgianlu commented on GitHub (Feb 9, 2024):
I have released v0.0.13 with some other features and fixes: https://github.com/devgianlu/go-librespot/releases/tag/v0.0.13
@phts commented on GitHub (Feb 11, 2024):
With 0.13.0 version:
Playing using signed in mode, stopped, and after some time of inactivity (I tried half of day) app does not play anymore, after sending /player/play it does not produce any events:
Need to restart consumer app (means ws connection) to make it work.
With 0.12.0 it never happened :
@devgianlu commented on GitHub (Feb 11, 2024):
Did you try playing from the Spotify app (via Connect)? Also, do you have the logs from go-librespot?
@phts commented on GitHub (Feb 11, 2024):
How to make it producing log file and where to find it?
@devgianlu commented on GitHub (Feb 11, 2024):
With SSH access you can do
journalctl -u go-librespot-daemon --since today -f, not sure how to do it from the dev page. @volumio@phts commented on GitHub (Feb 11, 2024):
No worries, I have access to ssh 😸
@phts commented on GitHub (Feb 11, 2024):
Logs and my comments inside
@devgianlu commented on GitHub (Feb 12, 2024):
I think what's happening is that when the device goes inactive and
zerconf_enabledis true the account will be logged out which is fine when playing from Connect because it'll re-authenticate, but for volumio it'll break since it expects a session to be there.This could be fixed by not ever logging out the account that has been logged in with "signed-in" mode from the configuration file. This would also require to re-login that account after another Zeroconf account leaves.
I'll think about whether there could be other side effects and possibly implement it tomorrow.
@devgianlu commented on GitHub (Feb 16, 2024):
@phts I have released v0.0.14 with a fix for this and some other improvements.
@devgianlu commented on GitHub (Feb 23, 2024):
Closing this, if any problem comes around please open another issue.
@phts commented on GitHub (Feb 23, 2024):
Working so far, thanks