sublime_music.dbus package
Submodules
Module contents
- class sublime_music.dbus.DBusManager(connection, do_on_method_call, on_set_property, get_config_and_player_manager)[source]
Bases:
object
- Parameters
connection (gi.repository.Gio.DBusConnection) –
do_on_method_call (Callable[[gi.repository.Gio.DBusConnection, str, str, str, str, gi.overrides.GLib.Variant, gi.repository.Gio.DBusMethodInvocation], None]) –
on_set_property (Callable[[gi.repository.Gio.DBusConnection, str, str, str, str, gi.overrides.GLib.Variant], None]) –
get_config_and_player_manager (Callable[[], Tuple[sublime_music.config.AppConfiguration, Optional[sublime_music.players.manager.PlayerManager]]]) –
- __init__(connection, do_on_method_call, on_set_property, get_config_and_player_manager)[source]
- Parameters
connection (gi.repository.Gio.DBusConnection) –
do_on_method_call (Callable[[gi.repository.Gio.DBusConnection, str, str, str, str, gi.overrides.GLib.Variant, gi.repository.Gio.DBusMethodInvocation], None]) –
on_set_property (Callable[[gi.repository.Gio.DBusConnection, str, str, str, str, gi.overrides.GLib.Variant], None]) –
get_config_and_player_manager (Callable[[], Tuple[sublime_music.config.AppConfiguration, Optional[sublime_music.players.manager.PlayerManager]]]) –
- current_state: Dict = {}
- diff_parse_re = re.compile("root\\['(.*?)'\\]\\['(.*?)'\\](?:\\[.*\\])?")
- static get_dbus_playlist(play_queue)[source]
Gets a playlist formatted for DBus. If multiples of the same element exist in the queue, it will use
/0
after the song ID to differentiate between the instances.>>> DBusManager.get_dbus_playlist(("2", "1", "3", "1")) ['/song/2/0', '/song/1/0', '/song/3/0', '/song/1/1']
- second_microsecond_conversion = 1000000