Add children media class (#39902)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
Martin HjelmareandPaulus Schoutsen authored and GitHub committed 2020-09-11 13:08:13 +02:00
1 parent e208aac834
commit e96fed20c8
12 files changed
+181 -67

No files matched your search

@@ -5,6 +5,7 @@ import re
from typing import Optional, Tuple
from homeassistant.components.media_player.const import (
MEDIA_CLASS_DIRECTORY,
MEDIA_CLASS_VIDEO,
MEDIA_TYPE_VIDEO,
)
@@ -91,10 +92,12 @@ class NetatmoSource(MediaSource):
else:
path = f"{source}/{camera_id}"
media_class = MEDIA_CLASS_DIRECTORY if event_id is None else MEDIA_CLASS_VIDEO
media = BrowseMediaSource(
domain=DOMAIN,
identifier=path,
media_class=MEDIA_CLASS_VIDEO,
media_class=media_class,
media_content_type=MEDIA_TYPE_VIDEO,
title=title,
can_play=bool(