SpotPRIS2 icon indicating copy to clipboard operation
SpotPRIS2 copied to clipboard

Better documentation for first-time use

Open jbriales opened this issue 5 years ago • 2 comments

Awesome tool! Thanks so much, unlocked me from controlling Spotify volume via i3 shortcuts.

I feel the README doesn't provide much hints into how to leverage this MPRIS interface though.

These are the quick notes I wrote for myself:

  • spotpris2 -l and spotpris2 -l id: show available devices and their IDs E.g. 79150f27eb368b66940ed4b6e765b673d29f58bc

  • spotpris2: Start MPRIS DBus After this, you can search for 'spotpris' in 'd-feet' -> 'Session Bus' list and get the Name for a device, e.g. 'org.mpris.MediaPlayer2.spotpris.device79150f27eb368b66940ed4b6e765b673d29f58bc'

  • Check current volume value: dbus-send --print-reply --type=method_call --dest=org.mpris.MediaPlayer2.spotpris.device79150f27eb368b66940ed4b6e765b673d29f58bc /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player string:Volume

  • Set volume: dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotpris.device79150f27eb368b66940ed4b6e765b673d29f58bc /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Set string:org.mpris.MediaPlayer2.Player string:Volume variant:double:0.5

jbriales avatar May 27 '20 13:05 jbriales

The command line options including -l are already documented in the README.

The rest is not specific to spotpris, but all mpris devices, which is why I didn't document them here. dbus-send is only one option to interact with mpris devices. I personally would recommend playerctl as an mpris client, as it's syntax is way easier than constructing the dbus calls yourself.

freundTech avatar May 27 '20 14:05 freundTech

Maybe adding some relevant links to get started with these? Or even just your comment above, would be useful for newcomers and I don't think most people who can benefit from this SpotPRIS2 wrapper will be experts on dbus-send or playerctl.

jbriales avatar May 28 '20 12:05 jbriales