Improve not shown handling (#67247)
This commit is contained in:
parent
069e70ff03
commit
0a6c8f8e6c
4 changed files with 30 additions and 2 deletions
|
@ -81,11 +81,13 @@ class CameraMediaSource(MediaSource):
|
|||
# Root. List cameras.
|
||||
component: EntityComponent = self.hass.data[DOMAIN]
|
||||
children = []
|
||||
not_shown = 0
|
||||
for camera in component.entities:
|
||||
camera = cast(Camera, camera)
|
||||
stream_type = camera.frontend_stream_type
|
||||
|
||||
if stream_type not in supported_stream_types:
|
||||
not_shown += 1
|
||||
continue
|
||||
|
||||
children.append(
|
||||
|
@ -111,4 +113,5 @@ class CameraMediaSource(MediaSource):
|
|||
can_expand=True,
|
||||
children_media_class=MEDIA_CLASS_VIDEO,
|
||||
children=children,
|
||||
not_shown=not_shown,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue