from .provider import Provider
if TYPE_CHECKING:
- from music_assistant_models.player import PlayerSource
+ from music_assistant_models.media_items import PluginSource
from music_assistant_models.streamdetails import StreamDetails
# ruff: noqa: ARG001, ARG002
Plugin Provider implementations should inherit from this base model.
"""
- async def get_sources(self) -> list[PlayerSource]: # type: ignore[return]
+ async def get_sources(self) -> list[PluginSource]: # type: ignore[return]
"""Get all audio sources provided by this provider."""
# Will only be called if ProviderFeature.AUDIO_SOURCE is declared
raise NotImplementedError
- async def get_source(self, prov_source_id: str) -> PlayerSource: # type: ignore[return]
+ async def get_source(self, prov_source_id: str) -> PluginSource: # type: ignore[return]
"""Get AudioSource details by id."""
# Will only be called if ProviderFeature.AUDIO_SOURCE is declared
raise NotImplementedError
async def get_stream_details(
self, item_id: str, media_type: MediaType = MediaType.TRACK
) -> StreamDetails:
- """Return the streamdetails to stream a naudiosource provided by this plugin."""
+ """Return the streamdetails to stream an (audio)source provided by this plugin."""
# Will only be called if ProviderFeature.AUDIO_SOURCE is declared
raise NotImplementedError