Skip to content

D-Bus Fun

Use the following to make the music player Banshee queue a track ready for playback.

import dbus
bus = dbus.SessionBus()
player_queue = bus.get_object("org.bansheeproject.Banshee",
"/org/bansheeproject/Banshee/SourceManager/PlayQueue")
player_queue.EnqueueUri("/home/channam/Music/Jonathon Coulton/Code Monkey.mp3",True)

For more D-Bus info I recommend the D-Bus tutorial.