Round duration and watched for progress endpoints

This commit is contained in:
William Oldham
2023-11-19 19:41:59 +00:00
parent fd9b61061c
commit e2b8f123b3

View File

@@ -12,8 +12,8 @@ import { z } from 'zod';
const progressItemSchema = z.object({
meta: progressMetaSchema,
tmdbId: z.string(),
duration: z.number(),
watched: z.number(),
duration: z.number().transform((n) => Math.round(n)),
watched: z.number().transform((n) => Math.round(n)),
seasonId: z.string().optional(),
episodeId: z.string().optional(),
seasonNumber: z.number().optional(),