sublime_music.ui.albums module

class sublime_music.ui.albums.AlbumsGrid(*args, **kwargs)[source]

Bases: gi.repository.Gtk.Overlay

Defines the albums panel.

__init__(*args, **kwargs)[source]
current_models: List[sublime_music.ui.albums.AlbumsGrid._AlbumModel] = []
current_query: sublime_music.adapters.adapter_base.AlbumSearchQuery = AlbumSearchQuery(type=<Type.RANDOM: 0>, year_range=(2020, 2030), genre=<sublime_music.adapters.adapter_base.AlbumSearchQuery._Genre object>, _strhash=None)
currently_selected_id: Optional[str] = None
currently_selected_index: Optional[int] = None
error_dialog = None
latest_applied_order_ratchet: int = 0
next_page_fn = None
num_pages: Optional[int] = None
offline_mode: bool = False
on_child_activated(flowbox, child)[source]
Parameters
  • flowbox (gi.repository.Gtk.FlowBox) –

  • child (gi.overrides.Gtk.Widget) –

on_grid_resize(flowbox, rect)[source]
Parameters
  • flowbox (gi.repository.Gtk.FlowBox) –

  • rect (gi.repository.Gdk.Rectangle) –

order_ratchet: int = 0
page: int = 0
page_size: int = 30
provider_id: Optional[str] = None
reflow_grids(force_reload_from_master=False, selected_index=None, models=None)[source]
Parameters
  • force_reload_from_master (bool) –

  • selected_index (Optional[int]) –

  • models (Optional[List[sublime_music.ui.albums.AlbumsGrid._AlbumModel]]) –

sort_dir: str = ''
update(order_token, app_config=None, force=False)[source]
Parameters
update_grid(order_token, use_ground_truth_adapter=False, force_grid_reload_from_master=False)[source]
Parameters
  • order_token (int) –

  • use_ground_truth_adapter (bool) –

  • force_grid_reload_from_master (bool) –

update_params(app_config)[source]
Parameters

app_config (sublime_music.config.AppConfiguration) –

Return type

int

class sublime_music.ui.albums.AlbumsPanel[source]

Bases: gi.overrides.Gtk.Box

__init__()[source]

Initializer for a GObject based classes with support for property sets through the use of explicit keyword arguments.

album_page: int = 0
album_page_size: int = 30
album_sort_direction: str = 'ascending'
emit_if_not_updating(*args)[source]
get_id(combo)[source]
Parameters

combo (gi.overrides.Gtk.ComboBox) –

Return type

Optional[str]

grid_order_token: int = 0
grid_pages_count: int = 0
make_combobox(items, on_change)[source]
Parameters
Return type

Tuple[gi.overrides.Gtk.ComboBox, gi.overrides.Gtk.ListStore]

offline_mode = False
on_alphabetical_type_change(combo)[source]
Parameters

combo (gi.overrides.Gtk.ComboBox) –

on_genre_change(combo)[source]
Parameters

combo (gi.overrides.Gtk.ComboBox) –

on_grid_cover_clicked(grid, id)[source]
Parameters
on_grid_num_pages_changed(grid, pages)[source]
Parameters
  • grid (Any) –

  • pages (int) –

on_next_page_clicked(_)[source]
on_page_entry_changed(entry)[source]
Parameters

entry (gi.repository.Gtk.Entry) –

Return type

bool

on_page_entry_insert_text(entry, text, length, position)[source]
Parameters
  • entry (gi.repository.Gtk.Entry) –

  • text (str) –

  • length (int) –

  • position (int) –

Return type

bool

on_prev_page_clicked(_)[source]
on_refresh_clicked(_)[source]
on_show_count_dropdown_change(combo)[source]
Parameters

combo (gi.overrides.Gtk.ComboBox) –

on_sort_toggle_clicked(_)[source]
on_type_combo_changed(combo)[source]
Parameters

combo (gi.overrides.Gtk.ComboBox) –

on_year_changed(entry)[source]
Parameters

entry (gi.repository.Gtk.SpinButton) –

Return type

bool

populate_genre_combo(app_config=None, force=False)[source]
Parameters
populating_genre_combo = False
update(app_config=None, force=False)[source]
Parameters