/
/
/
1"""
2Provider for Bose SoundTouch speakers.
3
4Following the Bose SoundTouch end of life, this provider keeps the speakers usable
5within Music Assistant: it detects them on the network, exposes native control
6(power, volume, transport, source and multiroom grouping) and maps the physical
7preset buttons to Music Assistant content. Audio playback is delegated to a linked
8playback protocol (such as DLNA) via the standard protocol linking mechanism.
9"""
10
11from __future__ import annotations
12
13from typing import TYPE_CHECKING
14
15from music_assistant_models.enums import ProviderFeature
16
17from .provider import BoseSoundTouchProvider
18
19if TYPE_CHECKING:
20 from music_assistant_models.config_entries import ProviderConfig
21 from music_assistant_models.provider import ProviderManifest
22
23 from music_assistant.mass import MusicAssistant
24 from music_assistant.models import ProviderInstanceType
25
26SUPPORTED_FEATURES = {
27 ProviderFeature.SYNC_PLAYERS,
28}
29
30
31async def setup(
32 mass: MusicAssistant, manifest: ProviderManifest, config: ProviderConfig
33) -> ProviderInstanceType:
34 """Initialize provider(instance) with given configuration."""
35 return BoseSoundTouchProvider(mass, manifest, config, SUPPORTED_FEATURES)
36