mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Handle Squeezebox media ids that are not URLs (#69696)
This commit is contained in:
parent
ba4c11af5a
commit
f8870c6364
@ -5,3 +5,4 @@ KNOWN_PLAYERS = "known_players"
|
||||
PLAYER_DISCOVERY_UNSUB = "player_discovery_unsub"
|
||||
DISCOVERY_TASK = "discovery_task"
|
||||
DEFAULT_PORT = 9000
|
||||
SQUEEZEBOX_SOURCE_STRINGS = ("source:", "wavin:", "spotify:")
|
||||
|
@ -52,7 +52,13 @@ from .browse_media import (
|
||||
library_payload,
|
||||
media_source_content_filter,
|
||||
)
|
||||
from .const import DISCOVERY_TASK, DOMAIN, KNOWN_PLAYERS, PLAYER_DISCOVERY_UNSUB
|
||||
from .const import (
|
||||
DISCOVERY_TASK,
|
||||
DOMAIN,
|
||||
KNOWN_PLAYERS,
|
||||
PLAYER_DISCOVERY_UNSUB,
|
||||
SQUEEZEBOX_SOURCE_STRINGS,
|
||||
)
|
||||
|
||||
SERVICE_CALL_METHOD = "call_method"
|
||||
SERVICE_CALL_QUERY = "call_query"
|
||||
@ -460,6 +466,8 @@ class SqueezeBoxEntity(MediaPlayerEntity):
|
||||
media_id = play_item.url
|
||||
|
||||
if media_type in MEDIA_TYPE_MUSIC:
|
||||
if not media_id.startswith(SQUEEZEBOX_SOURCE_STRINGS):
|
||||
# do not process special squeezebox "source" media ids
|
||||
media_id = async_process_play_media_url(self.hass, media_id)
|
||||
|
||||
await self._player.async_load_url(media_id, cmd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user