#!/usr/bin/python3 from .utils import * class MPRISRoot(DBusInterface): def get_all(self): body = ({ "CanQuit": ("b", True), "Fullscreen": ("b", False), "CanSetFullscreen": ("b", False), "CanRaise": ("b", True), "HasTrackList": ("b", False), "Identity": ("s", "Wobuzz"), "DesktopEntry": ("s", "wobuzz"), "SupportedUriSchemes": ("as", ["file"]), "SupportedMimeTypes": ("as", ["audio/mpeg"]) },) return body # ======== Methods ======== def Raise(self, msg): self.server.app.gui.window.activateWindow() self.server.app.gui.window.showMaximized() def Quit(self, msg): self.server.app.gui.window.close() # ======== Properties ======== def CanQuit(self, msg: Message): return "b", True def Fullscreen(self, msg: Message): return "b", False def CanSetFullscreen(self, msg: Message): return "b", False def CanRaise(self, msg: Message): return "b", True def HasTrackList(self, msg: Message): return "b", False def Identity(self, msg: Message): return "s", "Wobuzz" def DesktopEntry(self, msg: Message): return "s", "wobuzz" def SupportedUriSchemes(self, msg: Message): return "as", ["file"] def SupportedMimeTypes(self, msg: Message): return "as", ["audio/mpeg"]