MPRIS + Python (dbus): reading and writing properties MPRIS + Python (dbus): reading and writing properties linux linux

MPRIS + Python (dbus): reading and writing properties


Found how.

proxy = bus.get_object('org.mpris.MediaPlayer2.rhythmbox','/org/mpris/MediaPlayer2')properties_manager = dbus.Interface(proxy, 'org.freedesktop.DBus.Properties')properties_manager.Set('org.mpris.MediaPlayer2.Player', 'Volume', 100.0)curr_volume = properties_manager.Get('org.mpris.MediaPlayer2.Player', 'Volume')

Pretty simple indeed :) I thought it would be simple like this.