mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Always allow browsing TuneIn for HEOS (#141131)
* Always allow browsing TuneIn * Update test snapshots * Retry CI
This commit is contained in:
parent
1b8b348eff
commit
ec4de0dcce
@ -580,7 +580,7 @@ class HeosMediaPlayer(CoordinatorEntity[HeosCoordinator], MediaPlayerEntity):
|
|||||||
children: list[BrowseMedia] = [
|
children: list[BrowseMedia] = [
|
||||||
_media_to_browse_media(source)
|
_media_to_browse_media(source)
|
||||||
for source in self.coordinator.heos.music_sources.values()
|
for source in self.coordinator.heos.music_sources.values()
|
||||||
if source.available
|
if source.available or source.source_id == heos_const.MUSIC_SOURCE_TUNEIN
|
||||||
]
|
]
|
||||||
root = BrowseMedia(
|
root = BrowseMedia(
|
||||||
title="Music Sources",
|
title="Music Sources",
|
||||||
@ -654,7 +654,9 @@ def _media_to_browse_media(media: MediaItem | MediaMusicSource) -> BrowseMedia:
|
|||||||
can_play = False
|
can_play = False
|
||||||
|
|
||||||
if isinstance(media, MediaMusicSource):
|
if isinstance(media, MediaMusicSource):
|
||||||
can_expand = media.available
|
can_expand = (
|
||||||
|
media.source_id == heos_const.MUSIC_SOURCE_TUNEIN or media.available
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
can_expand = media.browsable
|
can_expand = media.browsable
|
||||||
can_play = media.playable
|
can_play = media.playable
|
||||||
|
@ -79,6 +79,16 @@
|
|||||||
'thumbnail': '',
|
'thumbnail': '',
|
||||||
'title': 'Pandora',
|
'title': 'Pandora',
|
||||||
}),
|
}),
|
||||||
|
dict({
|
||||||
|
'can_expand': True,
|
||||||
|
'can_play': False,
|
||||||
|
'children_media_class': None,
|
||||||
|
'media_class': 'directory',
|
||||||
|
'media_content_id': 'heos://media/3/music_service?name=TuneIn&image_url=&available=False',
|
||||||
|
'media_content_type': '',
|
||||||
|
'thumbnail': '',
|
||||||
|
'title': 'TuneIn',
|
||||||
|
}),
|
||||||
dict({
|
dict({
|
||||||
'can_expand': True,
|
'can_expand': True,
|
||||||
'can_play': False,
|
'can_play': False,
|
||||||
@ -114,6 +124,16 @@
|
|||||||
'thumbnail': '',
|
'thumbnail': '',
|
||||||
'title': 'Pandora',
|
'title': 'Pandora',
|
||||||
}),
|
}),
|
||||||
|
dict({
|
||||||
|
'can_expand': True,
|
||||||
|
'can_play': False,
|
||||||
|
'children_media_class': None,
|
||||||
|
'media_class': 'directory',
|
||||||
|
'media_content_id': 'heos://media/3/music_service?name=TuneIn&image_url=&available=False',
|
||||||
|
'media_content_type': '',
|
||||||
|
'thumbnail': '',
|
||||||
|
'title': 'TuneIn',
|
||||||
|
}),
|
||||||
]),
|
]),
|
||||||
'children_media_class': 'directory',
|
'children_media_class': 'directory',
|
||||||
'media_class': 'directory',
|
'media_class': 'directory',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user