-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] More than one user #948
Comments
This should AFAIK be possible by just omitting the |
Yes, I tried to leave out the spotify account in the configuration, as the people at However: $ systemctl --user status spotifyd
● spotifyd.service - A spotify playing daemon
Loaded: loaded (/etc/xdg/systemd/user/spotifyd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-05-17 08:51:45 CEST; 49s ago
Docs: https://github.com/Spotifyd/spotifyd
Main PID: 32070 (spotifyd)
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/spotifyd.service
└─32070 /usr/bin/spotifyd --no-daemon
Mai 17 08:51:45 unke spotifyd[32070]: Loading config from "/etc/spotifyd.conf"
Mai 17 08:51:45 unke spotifyd[32070]: No username specified. Checking username_cmd
Mai 17 08:51:45 unke spotifyd[32070]: No username_cmd specified
Mai 17 08:51:45 unke spotifyd[32070]: No password specified. Checking password_cmd
Mai 17 08:51:45 unke spotifyd[32070]: No password_cmd specified
Mai 17 08:51:45 unke spotifyd[32070]: No proxy specified
Mai 17 08:51:45 unke spotifyd[32070]: Using software volume controller.
Mai 17 08:51:45 unke spotifyd[32070]: Connecting to AP "gew1-accesspoint-e-skbp.ap.spotify.com:443"
Mai 17 08:51:45 unke spotifyd[32070]: Authenticated as "<my_spotify_account_name>" !
Mai 17 08:51:45 unke spotifyd[32070]: Country: "DE" As you see, spotifyd grabs |
Ok, I indeed have issues getting the exact behavior, you are trying to achieve. Spotifyd should print "Authenticated as ..." as soon as you select it from from one of your accounts on the network in the devices list. So this message is probably normal as long as it does not pop up immediately after you start Spotifyd. However, as soon as I'm trying to select spotifyd from an account while or after another account was playing something on it, it just exits. This might be related to #181. So, while not a perfect solution you can do something similar to what this comment suggests:
If you now try to "respot" from another account, spotifyd should exit and after your specified time, it should restart in a clean state, where you can click on the device again from any account and it should work. This requires you or your family members to potentially click on the device several times in a row, but it should eventually work 😀. Maybe this can get you further with resolving your issue... |
This is my
It seems that the |
Hmm. Your service definition looks nearly identical to mine. Can you check the spotifyd logs with
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I did some debugging with precisely this issue last night and got it to work:
This does indeed seem to be the solution, however it is insufficient: you also have to not set a cache_directory. If cache_directory is set, the credentials of the first user to connect to the device are cached and then after disconnecting no other user can connect. By disabling the cache anyone can connect. It would perhaps be desirable if we could disable specifically credential caching. |
Dear @mas-4, it sounds like you've found my problem. Caching is enabled in my config. If Thank you very much! |
Is there a way to reopen this ticket? |
Another observation I made last night while using it and switching users: After one user disconnects, when a second user attempts to connect, the first attempt is a wash. It times out as though the caching was still enabled or the credentials were set. But every successive attempt is instantly successful. This behavior is strange to me, since there's no cache. Perhaps its cached in memory and then the failure restarts the program and the in-memory cache is thus erased? It seems to be undesirable behavior but its easy to work around it. I can't dig into the code because I don't know rust, but it seems like instead of using a single struct/variable to hold the credentials it might be better to have a set or hash map and append as users connect/disconnect. |
I just opened #1019, which might fix the problem. It would be great if one of you two could try it, as I'm currently not able to. The general problem is that most of the things (e.g. caching the credentials) is done by librespot and it is probably not worth digging further into this, before #977 is accepted (or even a PR that upgrades to 0.3 which is already available). |
I just recapped this and I'm still not sure what to think about the restart/kill thing (#181). I haven't tried |
We've got a (paid) spotify family account and I have set up spotifyd with my user. However with this, my son could not 'respot' to spotifyd (but he could see the device in his official spotify android app). Is this the expected behaviour? Is there a way around?
BTW, there a 'dump' devices like speakers that spotify could 'respot' to that are not registered/associated with a spotify account. I wonder if there is way to run spotifyd in a similiar mode?
The text was updated successfully, but these errors were encountered: