return child_player.current_url
return super().current_url
+ @property
+ def supported_content_types(self) -> Tuple[ContentType]:
+ """Return the content types this player supports."""
+ # return contenttypes that are supported by all child players
+ return tuple(
+ content_type
+ for content_type in ContentType
+ if all(
+ (
+ content_type in child_player.supported_content_types
+ for child_player in self._get_child_players(False, False)
+ )
+ )
+ )
+
async def stop(self) -> None:
"""Send STOP command to player."""
if not self.use_multi_stream:
from music_assistant.helpers.audio import get_stream_details
from music_assistant.models.enums import (
- ContentType,
EventType,
MediaType,
QueueOption,
if self.player.use_multi_stream:
# multi stream enabled, all child players should receive the same audio stream
# redirect command to all (powered) players
- # TODO: this assumes that all client players support flac
- content_type = ContentType.FLAC
coros = []
expected_clients = set()
for child_id in self.player.group_childs:
if child_player.powered:
# TODO: this assumes that all client players support flac
player_url = self.mass.streams.get_stream_url(
- self.queue_id, child_id, content_type
+ self.queue_id, child_id, self._settings.stream_type
)
expected_clients.add(child_id)
coros.append(child_player.play_url(player_url))
# TODO: this assumes that all client players support flac
self.queue_id,
expected_clients,
- content_type,
+ self._settings.stream_type,
)
await asyncio.gather(*coros)
elif not passive: