Пример #1
0
 def on_start(self):
     try:
         self.mpris_object = objects.MprisObject(self.config, self.core)
         self._send_startup_notification()
     except Exception as e:
         logger.error('MPRIS frontend setup failed (%s)', e)
         self.stop()
Пример #2
0
    def setUp(self):
        config = {
            'mpris': {
                'desktop_file': '/tmp/foo.desktop',
            }
        }

        objects.exit_process = mock.Mock()
        objects.MprisObject._connect_to_dbus = mock.Mock()
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()
        self.mpris = objects.MprisObject(config=config, core=self.core)
Пример #3
0
    def setUp(self):
        objects.MprisObject._connect_to_dbus = mock.Mock()
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()
        self.mpris = objects.MprisObject(config={}, core=self.core)

        foo = self.core.playlists.create('foo').get()
        foo = foo.copy(last_modified=datetime.datetime(2012, 3, 1, 6, 0, 0))
        foo = self.core.playlists.save(foo).get()

        bar = self.core.playlists.create('bar').get()
        bar = bar.copy(last_modified=datetime.datetime(2012, 2, 1, 6, 0, 0))
        bar = self.core.playlists.save(bar).get()

        baz = self.core.playlists.create('baz').get()
        baz = baz.copy(last_modified=datetime.datetime(2012, 1, 1, 6, 0, 0))
        baz = self.core.playlists.save(baz).get()
        self.playlist = baz
Пример #4
0
 def setUp(self):
     objects.MprisObject._connect_to_dbus = mock.Mock()
     self.mixer = DummyMixer.start().proxy()
     self.backend = DummyBackend.start().proxy()
     self.mpris = objects.MprisObject()
     self.mpris._backend = self.backend
Пример #5
0
 def setUp(self):
     objects.exit_process = mock.Mock()
     objects.MprisObject._connect_to_dbus = mock.Mock()
     self.backend = DummyBackend.start().proxy()
     self.mpris = objects.MprisObject()
Пример #6
0
 def setUp(self):
     objects.exit_process = mock.Mock()
     objects.MprisObject._connect_to_dbus = mock.Mock()
     self.backend = dummy.DummyBackend.start(audio=None).proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
     self.mpris = objects.MprisObject(core=self.core)
Пример #7
0
 def setUp(self):
     objects.MprisObject._connect_to_dbus = mock.Mock()
     self.backend = dummy.create_dummy_backend_proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
     self.mpris = objects.MprisObject(config={}, core=self.core)