-
Notifications
You must be signed in to change notification settings - Fork 183
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
FR: Store client_id
outside dotfiles
#537
Comments
@aome510 Hi, could you please assign this to me? I've never programmed in Rust before so I'd like to start simple and give this a shot. |
@masroof-maindak I have already started work on this, though i can't test it out right now since authentication with spotify is broken. You can check it out here Edit: |
Oh well, bummer. Thank you for your contribution regardless. |
@juliamertz Sorry, I am just testing this now, since the authentication was previously broken. I tried
I am on macOS 14.5 (i386), with spotify_player 0.20.4. |
@chrisgrieser Looks like your config isn't quite right, can you try putting this in your app.toml? client_id_command = { command = "cat", args = ["/run/secrets/spotify_client_id"] } |
@juliamertz that is also not working for me. btw, the docs on config options do not mention that |
@chrisgrieser That's weird, i'm using the exact same option and it's working fine for me. Also there's a bit on using commands here, though i agree this is a bit unclear |
@juliamertz same issue. When I include the following line in config: client_id_command = { command = "cat", args = ["~/.cache/spotify_client_id"] } My app refuses to launch, and this is what I get: https://pastebin.com/Epz0mfxa Comment it out and it works just fine. client_id_command = "cat ~/.cache/spotify_client_id" Doesn't prevent my spotify_player from launching, but it also doesn't work either. |
This won't actually parse so it'd be treated as a None value and default to
I just tried it out with your setup and it looks like you need to specify the full path to the file. |
Okay, so it boots fine now, and allows me to detect music from my phone, but no longer lists my machine as a 'device' so I can't play music on my own or switch from my phone to my machine. This goes away once I comment out the D in either case does not list my machine as a device. |
@juliamertz I just experimented at bit, and it appears the issue is the trailing newline: # does not work
client_id_command = { command = "echo", args = ["my-id"] } # works
client_id_command = { command = "echo", args = ["-n", "my-id"] } Since shell commands commonly add a newline to their output, this should be dealt with by |
Is your feature request related to a problem? Please describe.
I do version control and publish my
.config
directory in a GitHub repo, as quite a lot of people do. Thus, Due to the inclusion of theclient_id
, this results in having to gitignore the~/.config/spotify_player/app.toml
, as otherwise the id would be leaked.Describe the solution you'd like
Save
client_id
outside theapp.toml
, so the remainder of the spotify-player-config can be stored in a public git repo without any trouble.The client_id could then be read from an environment variable, which one could save in
.zshenv
.Alternatively, support something like the
password_cmd
fromspotifyd
: https://docs.spotifyd.rs/config/File.htmlDescribe alternatives you've considered
app.toml
and manually updating it all the time.app.toml
into a private cloud storage.The text was updated successfully, but these errors were encountered: