pwittchen / spotify-cli-linux

🎶 A command line interface to Spotify on Linux
https://pwittchen.github.io/spotify-cli-linux
GNU General Public License v3.0
643 stars 55 forks source link

Add statusposition argument #67

Closed Ne02ptzero closed 2 years ago

Ne02ptzero commented 2 years ago

With recent version of Spotify, the Position[1] property is now returned by the client, making it possible to print the current playback time with track length from metadata.

» spotifycli --statusposition
MUST DIE! - KEEP U SAFE (01:41/03:39)

[1] https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#Property:Position

pwittchen commented 2 years ago

Thanks for the PR @Ne02ptzero! I'll check that and merge it, when everything will be working fine. Currently, I'm writing from Mac, so I need to switch to my Linux machine to check it. :)

pwittchen commented 2 years ago

In my Spotify I cannot retrieve this option, but application still works, so I guess I have outdated Spotify, so I'm gonna merge it anyway.