Exemplo n.º 1
0
    def __init__(self, *a, **kw):
        G15TextScreen.__init__(self, *a, **kw)
        LoopingCallMixin.__init__(self, 0.2)

        bus = self.bus = dbus.SessionBus()
        self.spotify = bus.get_object('com.spotify.qt', '/')
        self.lineLen = 0
        self.songDuration = 0
        self.cur_sec = 0
        self.scroll_title = ''
        self._text.extend([''] * 4)
        self.appendLine('                     QUEUE')

        self.altCheckLoopingCall = LoopingCall(self.doChecks)
        self.altCheckLoopingCall.start(1)
Exemplo n.º 2
0
    def __init__(self, *a, **kw):
        G15TextScreen.__init__(self, *a, **kw)
        LoopingCallMixin.__init__(self, 0.2)

        bus = dbus.SessionBus()
        self.player = dbus.Interface(
            bus.get_object("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/Player"),
            "org.gnome.Rhythmbox.Player")
        self.shell = dbus.Interface(
            bus.get_object("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/Shell"),
            "org.gnome.Rhythmbox.Shell")

        bus.add_signal_receiver(self.elapsedChanged, 'elapsedChanged', self.player.dbus_interface)
        bus.add_signal_receiver(self.playingUriChanged, 'playingUriChanged', self.player.dbus_interface)

        self._text.extend([''] * 4)
        self.appendLine('                     QUEUE')
        self.getStatus()