mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 01:15:55 +03:00
[PR #841] Read client_id from a file in the config folder #1836
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1836
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?
📋 Pull Request Information
Original PR: https://github.com/aome510/spotify-player/pull/841
Author: @rashil2000
Created: 9/29/2025
Status: 🔄 Open
Base:
master← Head:client_id-from-env📝 Commits (5)
a07431dRead client_id from a file in the config foldere9ea938Makefmthappya17a993Merge branch 'master' into client_id-from-env5bb3e19Merge branch 'master' into client_id-from-env0ece1f5Makefmthappy📊 Changes
4 files changed (+44 additions, -24 deletions)
View changed files
📝
README.md(+1 -1)📝
docs/config.md(+4 -1)📝
spotify_player/src/client/mod.rs(+24 -20)📝
spotify_player/src/config/mod.rs(+15 -2)📄 Description
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_idpresent 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
catcommand, although there are ways to achieve similar functionality via thefindstrormorecommands). Of course this is assuming the commands are being invoked without a shell (where stuff likeechois available). But external shell -> external command is even more expensive.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.