Hello everyone,
I would like to be able to control some basic functions via command line like play/pause, could someone help?
Thanks!
Or you could just use dbus-send directly:Play:dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause:dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PausePlay/Pause toggle:dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPausePrevious:dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PreviousNext:dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.NextVolume and seeking doesn't work via MPRIS because their MPRIS implementation is broken.
Hi
https://gist.****/wandernauta/6800547
This has made a good work for me.
Hope it will help.
It doesn't work for me, when i type these commands, dbus sends this error:
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.spotify was not provided by any .service files
Do you know how can i fix it?
On a standard install it should work, I have not tested them with the snap or flatpak. I know that the flatpak versions has issues. For example you can't raise it via dbus or MPRIS last time I checked. Spotify has to be running of course for any of the commands to work also.I really wish they would open up their API. I don't see the logic of keeping the API closed and then releasing a garbage desktop app? Don't get me wrong, I love the spotify service (So much I actaully pay for it,lol!!!) But let's face it the desktop app is **bleep**... If they opened up the API it would take about a week and you'd have at least a couple awesome native Linux Spotify apps that they would not have to worry about.
Thanks this would be I guess a good complete solution! I was searching for a really basic and simple solution so I marked the dbus reply as solution but thanks for this hint as well!
Best
Eds