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
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
Return type

None

allow_song_downloads: bool = True
cache_location: Optional[pathlib.Path] = None
concurrent_download_limit: int = 5
current_provider_id: Optional[str] = None
download_on_stream: bool = True
filename: Optional[pathlib.Path] = None
static load_from_file(filename)[source]
Parameters

filename (pathlib.Path) –

Return type

sublime_music.config.AppConfiguration

load_state()[source]
migrate()[source]
offline_mode: bool = False
player_config: Dict[str, Dict[str, Any]]
prefetch_amount: int = 3
property provider: Optional[sublime_music.config.ProviderConfiguration]
providers: Dict[str, sublime_music.config.ProviderConfiguration]
save()[source]
song_play_notification: bool = True
property state: sublime_music.ui.state.UIState
version: int = 5
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
Return type

None

__init__(id, name, ground_truth_adapter_type, ground_truth_adapter_config, caching_adapter_type=None, caching_adapter_config=None)
Parameters
Return type

None

asdict()[source]
Return type

Dict[str, Any]

caching_adapter_config: Optional[sublime_music.adapters.adapter_base.ConfigurationStore] = None
caching_adapter_type: Optional[Type] = None
clone()[source]
Return type

sublime_music.config.ProviderConfiguration

ground_truth_adapter_config: sublime_music.adapters.adapter_base.ConfigurationStore
ground_truth_adapter_type: Type
id: str
migrate()[source]
name: str
persist_secrets()[source]
sublime_music.config.decode_providers(providers_dict)[source]
Parameters

providers_dict (Dict[str, Dict[str, Any]]) –

Return type

Dict[str, sublime_music.config.ProviderConfiguration]

sublime_music.config.encode_path(path)[source]
Parameters

path (pathlib.Path) –

Return type

str

sublime_music.config.encode_providers(providers_dict)[source]
Parameters

providers_dict (Dict[str, Union[sublime_music.config.ProviderConfiguration, Dict[str, Any]]]) –

Return type

Dict[str, Dict[str, Any]]