/
/
/
1"""
2Retired Local Audio Out provider.
3
4The implementation is gone: local audio output now runs as a Sendspin add-on
5outside the server. Only this tombstone remains, so an existing install still
6resolves the manifest and gets a message explaining what to switch to instead of
7the provider silently disappearing.
8"""
9
10from __future__ import annotations
11
12from typing import TYPE_CHECKING
13
14from music_assistant_models.errors import UnsupportedSystemError
15
16if TYPE_CHECKING:
17 from music_assistant_models.config_entries import ProviderConfig
18 from music_assistant_models.provider import ProviderManifest
19
20 from music_assistant.mass import MusicAssistant
21 from music_assistant.models import ProviderInstanceType
22
23
24async def setup(
25 mass: MusicAssistant, # noqa: ARG001
26 manifest: ProviderManifest, # noqa: ARG001
27 config: ProviderConfig, # noqa: ARG001
28) -> ProviderInstanceType:
29 """Fail the load with the retirement notice."""
30 # UnsupportedSystemError maps to ProviderStatus.INCOMPATIBLE, which is never retried
31 # and which the frontend renders with the Remove button that resolves this for good.
32 raise UnsupportedSystemError(
33 "The local audio provider within Music Assistant has been retired in favor of "
34 "running a sendspin add-on such as the official Local Audio App.",
35 translation_key="provider_retired",
36 translation_owner="provider.local_audio",
37 )
38