From c0b18e8264f0f5dbacb0d7a9af7267cb695e18e3 Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Sat, 26 Feb 2022 16:19:24 -0800 Subject: [PATCH] `children_media_class` is now optional. --- src/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/types.ts b/src/types.ts index 22642e1c..d5259939 100644 --- a/src/types.ts +++ b/src/types.ts @@ -862,7 +862,7 @@ export interface FrigateCardMediaPlayer { // Recursive type, cannot use type interference: // See: https://github.com/colinhacks/zod#recursive-types // -// Server side data-type defined here: https://github.com/home-assistant/core/blob/dev/homeassistant/components/media_player/__init__.py +// Server side data-type defined here: https://github.com/home-assistant/core/blob/dev/homeassistant/components/media_player/browse_media.py#L46 export interface BrowseMediaSource { title: string; media_class: string; @@ -870,7 +870,7 @@ export interface BrowseMediaSource { media_content_id: string; can_play: boolean; can_expand: boolean; - children_media_class: string | null; + children_media_class?: string | null; thumbnail: string | null; children?: BrowseMediaSource[] | null; } @@ -883,7 +883,7 @@ export const browseMediaSourceSchema: z.ZodSchema = z.lazy(() media_content_id: z.string(), can_play: z.boolean(), can_expand: z.boolean(), - children_media_class: z.string().nullable(), + children_media_class: z.string().nullable().optional(), thumbnail: z.string().nullable(), children: z.array(browseMediaSourceSchema).nullable().optional(), }),