Skip to content

Commit

Permalink
fix as nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
SpeedxPz committed May 20, 2024
1 parent 83d1695 commit 5bf90f6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/clients/jellyfin/jellyfin.search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5bf90f6

Please sign in to comment.