Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Hi!
I would like to create a shell script to set the Spotify internal volume setting to a specific value, how is it possible? I have seen it on Mac but not on linux...
Thanks in advance
It is not possible yet. Volume is a property that you can change in the MPRIS D-Bus interface so it would be ideal for setting the Spotify volume in a shell script. https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#Property:Volume
However, the Spotify client has not implemented that yet.
Thank you for your answer, yes I have played around with Dbus but the Volume property gives me an error every time when calling: (e.g 0.2 as value)
$player->Volume(0.2);
Error:
org.freedesktop.DBus.Error.InvalidArgs: Error setting property 'Volume': Expected type 'd' but got 's'
What data type should be in the argument..?
Thanks
That looks more like the dbus library in perl/php/whateverlanguage you are using has a bug. It sends something as a string 's' when it should send it as a double 'd', even though it looks like you are giving it something that would be a float/double in many languages. But it doesn't really matter if you fix that.
This will correctly send the the MPRIS D-bus Volume property change to Spotify, but Spotify will just ignore it.
dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Set string:org.mpris.MediaPlayer2.Player string:Volume variant:double:0.2
Still not working as of today 😕
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…