sublime_music.config module
- class sublime_music.config.AppConfiguration(version: int = 5, cache_location: Optional[pathlib.Path] = None, filename: Optional[pathlib.Path] = None, providers: Dict[str, sublime_music.config.ProviderConfiguration] = <factory>, current_provider_id: Optional[str] = None, player_config: Dict[str, Dict[str, Any]] = <factory>, song_play_notification: bool = True, offline_mode: bool = False, allow_song_downloads: bool = True, download_on_stream: bool = True, prefetch_amount: int = 3, concurrent_download_limit: int = 5, _sol: bool = True, _pn: int = 8282, _rg: int = 0)[source]
Bases:
dataclasses_json.api.DataClassJsonMixin
- Parameters
version (int) –
cache_location (Optional[pathlib.Path]) –
filename (Optional[pathlib.Path]) –
providers (Dict[str, sublime_music.config.ProviderConfiguration]) –
song_play_notification (bool) –
offline_mode (bool) –
allow_song_downloads (bool) –
download_on_stream (bool) –
prefetch_amount (int) –
concurrent_download_limit (int) –
_sol (bool) –
_pn (int) –
_rg (int) –
- Return type
None
- __init__(version=5, cache_location=None, filename=None, providers=<factory>, current_provider_id=None, player_config=<factory>, song_play_notification=True, offline_mode=False, allow_song_downloads=True, download_on_stream=True, prefetch_amount=3, concurrent_download_limit=5, _sol=True, _pn=8282, _rg=0)
- Parameters
version (int) –
cache_location (Optional[pathlib.Path]) –
filename (Optional[pathlib.Path]) –
providers (Dict[str, sublime_music.config.ProviderConfiguration]) –
song_play_notification (bool) –
offline_mode (bool) –
allow_song_downloads (bool) –
download_on_stream (bool) –
prefetch_amount (int) –
concurrent_download_limit (int) –
_sol (bool) –
_pn (int) –
_rg (int) –
- Return type
None
- cache_location: Optional[pathlib.Path] = None
- filename: Optional[pathlib.Path] = None
- static load_from_file(filename)[source]
- Parameters
filename (pathlib.Path) –
- Return type
- property provider: Optional[sublime_music.config.ProviderConfiguration]
- providers: Dict[str, sublime_music.config.ProviderConfiguration]
- property state: sublime_music.ui.state.UIState
- class sublime_music.config.ProviderConfiguration(id: str, name: str, ground_truth_adapter_type: Type, ground_truth_adapter_config: sublime_music.adapters.adapter_base.ConfigurationStore, caching_adapter_type: Optional[Type] = None, caching_adapter_config: Optional[sublime_music.adapters.adapter_base.ConfigurationStore] = None)[source]
Bases:
object
- Parameters
id (str) –
name (str) –
ground_truth_adapter_type (Type) –
ground_truth_adapter_config (sublime_music.adapters.adapter_base.ConfigurationStore) –
caching_adapter_config (Optional[sublime_music.adapters.adapter_base.ConfigurationStore]) –
- Return type
None
- __init__(id, name, ground_truth_adapter_type, ground_truth_adapter_config, caching_adapter_type=None, caching_adapter_config=None)
- Parameters
id (str) –
name (str) –
ground_truth_adapter_type (Type) –
ground_truth_adapter_config (sublime_music.adapters.adapter_base.ConfigurationStore) –
caching_adapter_config (Optional[sublime_music.adapters.adapter_base.ConfigurationStore]) –
- Return type
None
- caching_adapter_config: Optional[sublime_music.adapters.adapter_base.ConfigurationStore] = None
- ground_truth_adapter_config: sublime_music.adapters.adapter_base.ConfigurationStore
- sublime_music.config.encode_path(path)[source]
- Parameters
path (pathlib.Path) –
- Return type