// frontend\src\types.ts export type PostWorkKeyStatus = { state: 'queued' | 'running' | 'missing' position?: number // 1..n (nur queued) waiting?: number // Anzahl wartend running?: number // Anzahl running maxParallel?: number // cap(ffmpegSem) } export type VideoMeta = { version?: number // entspricht meta.json durationSeconds: number fileSize: number fileModUnix: number videoWidth?: number videoHeight?: number fps?: number resolution?: string sourceUrl?: string updatedAtUnix?: number } export type RecordJob = { id: string sourceUrl?: string output: string status: 'running' | 'finished' | 'failed' | 'stopped' startedAt: string endedAt?: string durationSeconds?: number sizeBytes?: number videoWidth?: number videoHeight?: number fps?: number meta?: VideoMeta phase?: string progress?: number // ✅ NEU: Postwork-Queue Status/Position postWorkKey?: string postWork?: PostWorkKeyStatus exitCode?: number error?: string logTail?: string } export type ParsedModel = { input: string isUrl: boolean host?: string path?: string modelKey: string } export type Model = { id: string input: string isUrl: boolean host?: string path?: string key: string tags?: string watching?: boolean favorite?: boolean hot?: boolean keep?: boolean liked?: boolean | null createdAt?: string updatedAt?: string lastStream?: string }