Skip to content

Commit

Permalink
partial search
Browse files Browse the repository at this point in the history
  • Loading branch information
SpeedxPz committed May 20, 2024
1 parent a290bcd commit 83d1695
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/clients/jellyfin/jellyfin.search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,14 @@ export class JellyfinSearchService {
}

private audioHint2SearchHint(hint: JellySearchHint): SearchHint {
const schema = z.object({
Id: z.string(),
Name: z.string(),
AlbumArtist: z.string(),
RunTimeTicks: z.number(),
});
const schema = z
.object({
Id: z.string(),
Name: z.string(),
AlbumArtist: z.string(),
RunTimeTicks: z.number(),
})
.partial();
const result = schema.safeParse(hint);

if (!result.success) {
Expand Down

0 comments on commit 83d1695

Please sign in to comment.