// ─── Shared Types ────────────────────────────────────────────────────────── export interface FileEntry { id: string; name: string; relativePath?: string; folder: string; sizeBytes: number; createdAt: number; source: string; mimeType?: string; } export interface Job { id: string; status: "running" | "done" | "failed" | "stopped"; settings: Record; progress: { percent: number; fps: number; bitrateKbps: number; sizeOutBytes: number; etaSeconds: number; speed?: number; log: string[]; } | null; outputFolder: string; createdAt: number; batchIndex?: number; batchTotal?: number; } export interface DownloadJob { id: string; status: "running" | "done" | "failed" | "stopped"; filename: string; url: string; bytesDownloaded: number; totalBytes: number; error: string | null; } export interface VideoInfo { fileSize: string; duration: string; durationSeconds?: number; video: { codec: string; profile?: string; resolution: string; frameRate: string; bitrate: string; pixFmt: string; streamSize: string; } | null; audio: { codec: string; sampleRate: string; channels: string; channelLayout: string; bitrate: string; streamSize: string; } | null; audioStreams?: Array<{ index: number; codec: string; language: string; title: string; channels: string; channelLayout: string; sampleRate: string; bitrate: string; streamSize: string; }>; subtitleStreams?: Array<{ index: number; codec: string; language: string; title: string; default: boolean; forced: boolean; }>; encodeSettings?: { inputFilename: string; outputFilename: string; resolution?: string; settings: Record; }; } export interface RemoteEntry { name: string; isDir: boolean; size?: number; sizeStr?: string; type?: string; downloadUrl?: string; hfPath?: string; hfOrg?: string; hfBucket?: string; } export interface TeleboxEntry { id: string; itemId?: string; name: string; isDir: boolean; size?: number; sizeStr?: string; type?: string; subType?: string; pid?: number; } export interface BackblazeEntry { key: string; name: string; isDir: boolean; size?: number; sizeStr?: string; type?: string; lastModified?: string; } export interface PixeldrainJob { id: string; status: "running" | "done" | "failed"; filename: string; bytesUploaded: number; totalBytes: number; pixeldrainUrl: string | null; error: string | null; } export interface QueueItem { uid: string; file: FileEntry; status: "waiting" | "encoding" | "done" | "failed"; jobId: string | null; settings: Record; presetLabel?: string; } export interface EncodePreset { id: number; label: string; settings: Record; } export type Tab = "files" | "encode" | "jobs" | "remote" | "telebox" | "backblaze";