Fix renamed Pluginsource
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 11 Jan 2025 16:42:15 +0000 (17:42 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 11 Jan 2025 16:42:15 +0000 (17:42 +0100)
music_assistant/models/plugin.py

index 84e541f478339453cce363b1fa282202b9e43af8..0060082e6cb21b19616c84b463ecbfce792f84e6 100644 (file)
@@ -10,7 +10,7 @@ from music_assistant_models.enums import MediaType
 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
@@ -23,12 +23,12 @@ class PluginProvider(Provider):
     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
@@ -36,7 +36,7 @@ class PluginProvider(Provider):
     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