From 5bf90f6641cc96423810845db81fc35aee6db81c Mon Sep 17 00:00:00 2001 From: SpeedxPz Date: Mon, 20 May 2024 17:38:40 +0000 Subject: [PATCH] fix as nullable --- src/clients/jellyfin/jellyfin.search.service.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/clients/jellyfin/jellyfin.search.service.ts b/src/clients/jellyfin/jellyfin.search.service.ts index d505361..143fa52 100644 --- a/src/clients/jellyfin/jellyfin.search.service.ts +++ b/src/clients/jellyfin/jellyfin.search.service.ts @@ -105,14 +105,12 @@ export class JellyfinSearchService { } private audioHint2SearchHint(hint: JellySearchHint): SearchHint { - const schema = z - .object({ - Id: z.string(), - Name: z.string(), - AlbumArtist: z.string(), - RunTimeTicks: z.number(), - }) - .partial(); + const schema = z.object({ + Id: z.string(), + Name: z.string(), + AlbumArtist: z.string().nullable(), + RunTimeTicks: z.number(), + }); const result = schema.safeParse(hint); if (!result.success) {