Skip to content

Conversation

@rashil2000
Copy link
Contributor

@rashil2000 rashil2000 commented Sep 29, 2025

Related: #537

This PR introduces a default lookup for a file containing the client_id, eliminating the need to add an external command to read it from the filesystem.

It is a plaintext file called client_id present alongside app.toml (in the ~/.config/spotify-player) directory, which contains the ID - if such a file exists we can read it first, and then fallback to other mechanisms.

My main motivation for this change is that shelling out to an external command is an expensive operation, and not all systems have straightforward ways to do that (i.e. Windows does not have the cat command, although there are ways to achieve similar functionality via the findstr or more commands). Of course this is assuming the commands are being invoked without a shell (where stuff like echo is available). But external shell -> external command is even more expensive.

@rashil2000 rashil2000 changed the title Read client_id from the environment using SPOTIFY_APP_CLIENT_ID Read client_id from a file in the config folder Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant