Make your multimedia app discoverable by linux desktop.
Project description
MPRIS API
Make your multimedia app discoverable by linux desktop.
Desciption
This package provides an implementation of MPRIS DBus interface.
MPRIS standard: MPRIS D-Bus Interface Specification
Usage
Minimal:
from mpris_api.MprisService import MprisService
from mpris_api.adapter.IMprisAdapterRoot import IMprisAdapterRoot
from mpris_api.adapter.IMprisAdapterPlayer import IMprisAdapterPlayer
class SampleMprisAdapterRoot(IMprisAdapterRoot):
pass # TODO: Implement interface methods here!
class SampleMprisAdapterPlayer(IMprisAdapterPlayer):
pass # TODO: Implement interface methods here!
with MprisService(
name='my_app_name',
adapterRoot=SampleMprisAdapterRoot(),
adapterPlayer=SampleMprisAdapterPlayer(),
) as mprisService:
mprisService.awaitStop()
Full (including tracklists and playlists support):
from mpris_api.MprisService import MprisService
from mpris_api.adapter.IMprisAdapterRoot import IMprisAdapterRoot
from mpris_api.adapter.IMprisAdapterPlayer import IMprisAdapterPlayer
from mpris_api.adapter.IMprisAdapterTrackList import IMprisAdapterTrackList
from mpris_api.adapter.IMprisAdapterPlayLists import IMprisAdapterPlayLists
class SampleMprisAdapterRoot(IMprisAdapterRoot):
pass # TODO: Implement interface methods here!
class SampleMprisAdapterPlayer(IMprisAdapterPlayer):
pass # TODO: Implement interface methods here!
class SampleMprisAdapterTrackList(IMprisAdapterTrackList):
pass # TODO: Implement interface methods here!
class SampleMprisAdapterPlayLists(IMprisAdapterPlayLists):
pass # TODO: Implement interface methods here!
with MprisService(
name='my_app_name',
adapterRoot=SampleMprisAdapterRoot(),
adapterPlayer=SampleMprisAdapterPlayer(),
adapterTrackList=SampleMprisAdapterTrackList(),
adapterPlayLists=SampleMprisAdapterPlayLists(),
) as mprisService:
mprisService.awaitStop()
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mpris-api-1.0.1.tar.gz
(11.9 kB
view hashes)