Fix rnv startup

This commit is contained in:
Zoe Roux
2025-07-20 03:03:01 +02:00
parent 666ad9279f
commit c364d3a67e
7 changed files with 41 additions and 50 deletions
+13 -2
View File
@@ -4,7 +4,7 @@ import { Genre } from "./utils/genre";
import { KImage } from "./utils/images";
import { Metadata } from "./utils/metadata";
import { zdate } from "./utils/utils";
import { EmbeddedVideo } from "./video";
import { EmbeddedVideo } from "./video-embed";
export const Movie = z
.object({
@@ -39,7 +39,18 @@ export const Movie = z
updatedAt: zdate(),
studios: z.array(Studio).optional(),
videos: z.array(EmbeddedVideo).optional(),
videos: z
.array(
z.object({
id: z.string(),
slug: z.string(),
path: z.string(),
rendering: z.string(),
part: z.number().int().gt(0).nullable(),
version: z.number().gt(0),
}),
)
.optional(),
watchStatus: z
.object({
status: z.enum([
+6 -7
View File
@@ -15,7 +15,7 @@ export const Quality = z
.default("original");
export type Quality = z.infer<typeof Quality>;
export const Video = z.object({
export const VideoTrack = z.object({
index: z.number(),
title: z.string().nullable(),
language: z.string().nullable(),
@@ -27,9 +27,9 @@ export const Video = z.object({
isDefault: z.boolean(),
});
export type Video = z.infer<typeof Video>;
export type VideoTrack = z.infer<typeof VideoTrack>;
export const Audio = z.object({
export const AudioTrack = z.object({
index: z.number(),
title: z.string().nullable(),
language: z.string().nullable(),
@@ -38,7 +38,7 @@ export const Audio = z.object({
bitrate: z.number(),
isDefault: z.boolean(),
});
export type Audio = z.infer<typeof Audio>;
export type AudioTrack = z.infer<typeof AudioTrack>;
export const Subtitle = z.object({
// external subtitles don't have indexes
@@ -46,7 +46,6 @@ export const Subtitle = z.object({
title: z.string().nullable(),
language: z.string().nullable(),
codec: z.string(),
mimeCodec: z.string(),
extension: z.string(),
isDefault: z.boolean(),
isForced: z.boolean(),
@@ -78,8 +77,8 @@ export const VideoInfo = z
// in seconds
duration: z.number(),
container: z.string().nullable(),
videos: z.array(Video),
audios: z.array(Audio),
videos: z.array(VideoTrack),
audios: z.array(AudioTrack),
subtitles: z.array(Subtitle),
fonts: z.array(z.string()),
chapters: z.array(Chapter),
-10
View File
@@ -49,13 +49,3 @@ export const FullVideo = Video.extend({
show: Show.optional(),
});
export type FullVideo = z.infer<typeof FullVideo>;
export const EmbeddedVideo = z.object({
id: z.string(),
slug: z.string(),
path: z.string(),
rendering: z.string(),
part: z.number().int().gt(0).nullable(),
version: z.number().gt(0),
});
export type EmbeddedVideo = z.infer<typeof EmbeddedVideo>;
+7 -5
View File
@@ -88,16 +88,18 @@ export const Player = () => {
/>
<Stack.Screen
options={{
// TODO: find a way to force fullscreen on mobile
headerTransparent: true,
headerStyle: { backgroundColor: undefined },
headerShown: false,
navigationBarHidden: true,
statusBarHidden: true,
orientation: "landscape",
}}
/>
<VideoView
player={player}
pictureInPicture={true}
autoEnterPictureInPicture={true}
pictureInPicture
autoEnterPictureInPicture
resizeMode={"contain"}
controls
style={StyleSheet.absoluteFillObject}
/>
{/* <LoadingIndicator /> */}