sublime_music.app module

class sublime_music.app.SublimeMusicApp(config_file)[source]

Bases: gi.repository.Gtk.Application

Parameters

config_file (pathlib.Path) –

__init__(config_file)[source]
Parameters

config_file (pathlib.Path) –

batch_download_jobs: Set[sublime_music.adapters.manager.Result] = {}
browse_to(action, item_id)[source]
Parameters
  • action (Any) –

  • item_id (gi.overrides.GLib.Variant) –

do_activate()[source]

activate(self)

do_dbus_register(connection, path)[source]

dbus_register(self, connection:Gio.DBusConnection, object_path:str) -> bool

Parameters
  • connection (gi.repository.Gio.DBusConnection) –

  • path (str) –

Return type

bool

do_startup()[source]

startup(self)

exiting: bool = False
on_add_new_music_provider(*args)[source]
on_add_to_queue(action, song_ids)[source]
Parameters
  • action (Any) –

  • song_ids (gi.overrides.GLib.Variant) –

on_app_shutdown(app)[source]
Parameters

app (sublime_music.app.SublimeMusicApp) –

on_current_song_rated(_)[source]
on_dbus_method_call(connection, sender, path, interface, method, params, invocation)[source]
Parameters
  • connection (gi.repository.Gio.DBusConnection) –

  • sender (str) –

  • path (str) –

  • interface (str) –

  • method (str) –

  • params (gi.overrides.GLib.Variant) –

  • invocation (gi.repository.Gio.DBusMethodInvocation) –

on_dbus_set_property(connection, sender, path, interface, property_name, value)[source]
Parameters
  • connection (gi.repository.Gio.DBusConnection) –

  • sender (str) –

  • path (str) –

  • interface (str) –

  • property_name (str) –

  • value (gi.overrides.GLib.Variant) –

on_device_update(_, device_id)[source]
Parameters

device_id (str) –

on_edit_current_music_provider(*args)[source]
on_go_online(*args)[source]
on_go_to_album(action, album_id)[source]
Parameters
  • action (Any) –

  • album_id (gi.overrides.GLib.Variant) –

on_go_to_artist(action, artist_id)[source]
Parameters
  • action (Any) –

  • artist_id (gi.overrides.GLib.Variant) –

on_go_to_playlist(action, playlist_id)[source]
Parameters
  • action (Any) –

  • playlist_id (gi.overrides.GLib.Variant) –

on_mute_toggle(*args)[source]
on_next_track(*args)[source]
on_notification_closed(_)[source]
on_play_next(action, song_ids)[source]
Parameters
  • action (Any) –

  • song_ids (gi.overrides.GLib.Variant) –

on_play_pause(*args)[source]
on_prev_track(*args)[source]
on_refresh_devices(*args)[source]
on_refresh_window(_, state_updates, force=False)[source]
Parameters
on_remove_music_provider(_, provider_id)[source]
Parameters

provider_id (gi.overrides.GLib.Variant) –

on_repeat_press(*args)[source]
on_shuffle_press(*args)[source]
on_song_clicked(win, song_index, song_queue, metadata)[source]
Parameters
on_song_download_progress(song_id, progress)[source]
Parameters
on_song_scrub(_, scrub_value)[source]
Parameters

scrub_value (float) –

on_songs_removed(win, song_indexes_to_remove)[source]
Parameters
  • win (Any) –

  • song_indexes_to_remove (List[int]) –

on_stack_change(stack, _)[source]
Parameters

stack (gi.repository.Gtk.Stack) –

on_switch_music_provider(_, provider_id)[source]
Parameters

provider_id (gi.overrides.GLib.Variant) –

on_volume_change(_, value)[source]
Parameters

value (float) –

on_window_go_to(win, action, value)[source]
Parameters
  • win (Any) –

  • action (str) –

  • value (str) –

on_window_key_press(window, event)[source]
Parameters
  • window (gi.overrides.Gtk.Window) –

  • event (gi.overrides.Gdk.EventKey) –

Return type

bool

play_song(song_index, reset=False, old_play_queue=None, play_queue=None, playable_song_search_direction=1)[source]
Parameters
player_manager: sublime_music.players.manager.PlayerManager
reset_state()[source]
save_play_queue(song_playing_order_token=None)[source]
Parameters

song_playing_order_token (Optional[int]) –

show_configure_servers_dialog(provider_config=None)[source]

Show the Connect to Server dialog.

Parameters

provider_config (Optional[sublime_music.config.ProviderConfiguration]) –

song_playing_order_token = 0
update_play_state_from_server(prompt_confirm=False)[source]
Parameters

prompt_confirm (bool) –

update_window(force=False)[source]
Parameters

force (bool) –