mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 17:35:50 +03:00
[GH-ISSUE #467] Get Information of current playback from CLI #1200
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#1200
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 @vsantele on GitHub (Jun 14, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/467
Is your feature already implemented in the latest
master?No
Is your feature request related to a problem? Please describe.
I want to use spotify_player to get information of current song played via the CLI in order to use it via a script.
Describe the solution you'd like
I would like a command like
spotify_player get playbackorspotify_player playback infoto get a json with playback information if it's available.Additional context
I try to implement this myself, I easily get a result with
current_playback. But I'm not sure where is the best place to put this command.github.com/aome510/spotify-player@b180b6bab5/spotify_player/src/cli/client.rs (L89-L101)@jStimpert0430 commented on GitHub (Jun 14, 2024):
You can actually do exactly that with 'get key playback'. I use it to parse state and album information currently.
https://github.com/aome510/spotify-player/issues/294#issuecomment-1831581074
I do wish there were easier aliases however for more common things like artist/trackname.
@vsantele commented on GitHub (Jun 15, 2024):
I didn't know this, thank you.
The documentation for cli commands doesn't explain well the get command. I will check that.
Aliases can be a good idea, but it can also be more generic and add a
selectparameters to specify which fields we want in return. With that we could have something likespotify_player get currentthat return basic info like title, artists, durations... And it's only a shortcut to something like `spotify_player get key playback --select "title,artists,duration".@aome510 commented on GitHub (Jun 17, 2024):
Thanks @jStimpert0430. I'll close this issue for now as
spotify_playerdoes provide a CLI command to get playback info