Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix list issue for async_play_media #1761

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions custom_components/mass/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,13 @@ async def async_clear_playlist(self) -> None:
async def async_play_media(
self,
media_type: str,
media_id: str,
media_id: str | list[str],
enqueue: MediaPlayerEnqueue | None = None,
announce: bool | None = None,
**kwargs: Any,
) -> None:
"""Send the play_media command to the media player."""
if media_source.is_media_source_id(media_id):
if isinstance(media_id, str) and media_source.is_media_source_id(media_id):
# Handle media_source
sourced_media = await media_source.async_resolve_media(
self.hass, media_id, self.entity_id
Expand All @@ -413,7 +413,7 @@ async def async_play_media(

# forward to our advanced play_media handler
await self._async_play_media_advanced(
media_id=[media_id],
media_id=media_id if isinstance(media_id, list) else [media_id],
enqueue=enqueue,
announce=announce,
media_type=media_type,
Expand Down