MPRIS: Switching from python-sdbus to jeepney, no functionality.

This commit is contained in:
The Wobbler 2025-04-16 16:57:01 +02:00
parent a236370d47
commit f23530628c
14 changed files with 301 additions and 125 deletions

View file

@ -0,0 +1,34 @@
#!/usr/bin/python3
from jeepney import new_method_return
from .utils import *
class MPRISPlayer(DBusInterface):
def __init__(self, server, interface):
super().__init__(server, interface)
self.metadata = {
"mpris:trackid": ("o", "/org/mpris/MediaPlayer2/murx"), # random junk, no functionality
"xesam:title": ("s", "Huggenburgl")
}
def get_all(self):
body = ({
"CanPlay": ("b", True),
"Metadata": ("a{sv}", self.metadata)
},)
return body
def Play(self, msg: Message):
print("Play!")
def PlayPause(self, msg: Message):
print("Play/Pause!")
def Metadata(self, msg: Message):
body = (self.metadata,)
return new_method_return(msg, "a{sv}", body)