diff --git a/api/src/models/full-video.ts b/api/src/models/full-video.ts index 06ed7ce9..bf94237c 100644 --- a/api/src/models/full-video.ts +++ b/api/src/models/full-video.ts @@ -36,10 +36,12 @@ export const FullVideo = t.Composite([ ), ), show: t.Optional( - t.Union([ - t.Composite([t.Object({ kind: t.Literal("movie") }), Movie]), - t.Composite([t.Object({ kind: t.Literal("serie") }), Serie]), - ]), + t.Nullable( + t.Union([ + t.Composite([t.Object({ kind: t.Literal("movie") }), Movie]), + t.Composite([t.Object({ kind: t.Literal("serie") }), Serie]), + ]), + ), ), }), ]); diff --git a/front/src/models/video.ts b/front/src/models/video.ts index 3634b67d..63a371b1 100644 --- a/front/src/models/video.ts +++ b/front/src/models/video.ts @@ -50,7 +50,7 @@ export const FullVideo = Video.extend({ }), previous: z.object({ video: z.string(), entry: Entry }).nullable().optional(), next: z.object({ video: z.string(), entry: Entry }).nullable().optional(), - show: Show.optional(), + show: Show.optional().nullable(), }); export type FullVideo = z.infer; diff --git a/front/src/ui/player/controls/bottom-controls.tsx b/front/src/ui/player/controls/bottom-controls.tsx index a976243e..6442b2f9 100644 --- a/front/src/ui/player/controls/bottom-controls.tsx +++ b/front/src/ui/player/controls/bottom-controls.tsx @@ -50,18 +50,25 @@ export const BottomControls = ({ return ( - - {poster !== undefined ? ( - - ) : ( - + {poster !== null && ( + + {poster !== undefined ? ( + + ) : ( + + )} + + )} + - + > {!bottomSeek && (name ? (

diff --git a/front/src/ui/player/index.tsx b/front/src/ui/player/index.tsx index f03305f8..be6ab3ad 100644 --- a/front/src/ui/player/index.tsx +++ b/front/src/ui/player/index.tsx @@ -36,7 +36,7 @@ export const Player = () => { ? entry.kind === "movie" ? entry.name : `${entry.name} (${entryDisplayNumber(entry)})` - : null; + : data?.path; const { apiUrl, authToken } = useToken(); const [defaultPlayMode] = useLocalSetting<"direct" | "hls">( @@ -187,14 +187,14 @@ export const Player = () => { x) .join(" - ") - : undefined + : data?.path } chapters={info?.chapters ?? []} previous={data?.previous?.video}