sublime_music.ui.state module
- class sublime_music.ui.state.RepeatType(value)[source]
Bases:
enum.Enum
An enumeration.
- NO_REPEAT = 0
- REPEAT_QUEUE = 1
- REPEAT_SONG = 2
- class sublime_music.ui.state.UIState(version=1, playing=False, current_song_index=-1, play_queue=<factory>, old_play_queue=<factory>, _volume=<factory>, is_muted=False, repeat_type=RepeatType.NO_REPEAT, shuffle_on=False, song_progress=datetime.timedelta(0), song_stream_cache_progress=datetime.timedelta(0), current_device='this device', connecting_to_device=False, connected_device_name=None, available_players=<factory>, current_tab='albums', selected_album_id=None, selected_artist_id=None, selected_browse_element_id=None, selected_playlist_id=None, album_sort_direction='ascending', album_page_size=30, album_page=0, current_notification=None, playlist_details_expanded=True, artist_details_expanded=True, loading_play_queue=False, current_album_search_query=<factory>, active_playlist_id=None, _current_song=None)[source]
Bases:
object
Represents the UI state of the application.
- Parameters
version (int) –
playing (bool) –
current_song_index (int) –
is_muted (bool) –
repeat_type (sublime_music.ui.state.RepeatType) –
shuffle_on (bool) –
song_progress (datetime.timedelta) –
song_stream_cache_progress (Optional[datetime.timedelta]) –
current_device (str) –
connecting_to_device (bool) –
current_tab (str) –
album_sort_direction (str) –
album_page_size (int) –
album_page (int) –
current_notification (Optional[sublime_music.ui.state.UIState.UINotification]) –
playlist_details_expanded (bool) –
artist_details_expanded (bool) –
loading_play_queue (bool) –
current_album_search_query (sublime_music.adapters.adapter_base.AlbumSearchQuery) –
_current_song (Optional[sublime_music.adapters.api_objects.Song]) –
- Return type
None
- class UINotification(markup: str, actions: Tuple[Tuple[str, Callable[[], NoneType]], ...] = <factory>, icon: Optional[str] = None)[source]
Bases:
object
- Parameters
- Return type
None
- __init__(markup, actions=<factory>, icon=None)
- __init__(version=1, playing=False, current_song_index=-1, play_queue=<factory>, old_play_queue=<factory>, _volume=<factory>, is_muted=False, repeat_type=RepeatType.NO_REPEAT, shuffle_on=False, song_progress=datetime.timedelta(0), song_stream_cache_progress=datetime.timedelta(0), current_device='this device', connecting_to_device=False, connected_device_name=None, available_players=<factory>, current_tab='albums', selected_album_id=None, selected_artist_id=None, selected_browse_element_id=None, selected_playlist_id=None, album_sort_direction='ascending', album_page_size=30, album_page=0, current_notification=None, playlist_details_expanded=True, artist_details_expanded=True, loading_play_queue=False, current_album_search_query=<factory>, active_playlist_id=None, _current_song=None)
- Parameters
version (int) –
playing (bool) –
current_song_index (int) –
is_muted (bool) –
repeat_type (sublime_music.ui.state.RepeatType) –
shuffle_on (bool) –
song_progress (datetime.timedelta) –
song_stream_cache_progress (Optional[datetime.timedelta]) –
current_device (str) –
connecting_to_device (bool) –
current_tab (str) –
album_sort_direction (str) –
album_page_size (int) –
album_page (int) –
current_notification (Optional[sublime_music.ui.state.UIState.UINotification]) –
playlist_details_expanded (bool) –
artist_details_expanded (bool) –
loading_play_queue (bool) –
current_album_search_query (sublime_music.adapters.adapter_base.AlbumSearchQuery) –
_current_song (Optional[sublime_music.adapters.api_objects.Song]) –
- Return type
None
- current_album_search_query: sublime_music.adapters.adapter_base.AlbumSearchQuery
- current_notification: Optional[sublime_music.ui.state.UIState.UINotification] = None
- property current_song: Optional[sublime_music.adapters.api_objects.Song]
- repeat_type: sublime_music.ui.state.RepeatType = 0
- song_progress: datetime.timedelta = datetime.timedelta(0)
- song_stream_cache_progress: Optional[datetime.timedelta] = datetime.timedelta(0)