mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +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] = [
|
||||
_media_to_browse_media(source)
|
||||
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(
|
||||
title="Music Sources",
|
||||
@ -654,7 +654,9 @@ def _media_to_browse_media(media: MediaItem | MediaMusicSource) -> BrowseMedia:
|
||||
can_play = False
|
||||
|
||||
if isinstance(media, MediaMusicSource):
|
||||
can_expand = media.available
|
||||
can_expand = (
|
||||
media.source_id == heos_const.MUSIC_SOURCE_TUNEIN or media.available
|
||||
)
|
||||
else:
|
||||
can_expand = media.browsable
|
||||
can_play = media.playable
|
||||
|
@ -79,6 +79,16 @@
|
||||
'thumbnail': '',
|
||||
'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({
|
||||
'can_expand': True,
|
||||
'can_play': False,
|
||||
@ -114,6 +124,16 @@
|
||||
'thumbnail': '',
|
||||
'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',
|
||||
'media_class': 'directory',
|
||||
|
Loading…
x
Reference in New Issue
Block a user