Closed vsantele closed 3 months ago
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.
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 select
parameters to specify which fields we want in return. With that we could have something like spotify_player get current
that 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".
Thanks @jStimpert0430. I'll close this issue for now as spotify_player
does provide a CLI command to get playback info
Is your feature already implemented in the latest
master
? NoIs 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 playback
orspotify_player playback info
to 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.https://github.com/aome510/spotify-player/blob/b180b6bab5f5086496e8fb83e467320218289d5e/spotify_player/src/cli/client.rs#L89-L101