Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import dbus
- import json
- bus = dbus.SessionBus()
- # Create an object that will proxy for a particular remote object.
- remote_object = bus.get_object("org.mpris.MediaPlayer2.GnomeMusic", # Connection name
- "/org/mpris/MediaPlayer2" # Object's path
- )
- iface = dbus.Interface(remote_object, 'org.freedesktop.DBus.Properties')
- msg = (json.dumps(iface.Get("org.mpris.MediaPlayer2.Player", "Metadata"), indent=0))
- print msg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement