2026-05-13 17:24:10 +02:00
|
|
|
interface Job {
|
|
|
|
|
id: string;
|
|
|
|
|
video_path: string;
|
|
|
|
|
video_filename: string;
|
|
|
|
|
status: 'pending' | 'queued' | 'processing' | 'paused' | 'completed' | 'failed' | 'cancelled';
|
|
|
|
|
config: string;
|
|
|
|
|
progress: number;
|
|
|
|
|
current_index: number;
|
|
|
|
|
total_units: number;
|
|
|
|
|
segments: string;
|
|
|
|
|
last_context: string;
|
|
|
|
|
current_time_position: number;
|
|
|
|
|
error: string | null;
|
|
|
|
|
created_at: string;
|
|
|
|
|
updated_at: string;
|
|
|
|
|
completed_at: string | null;
|
|
|
|
|
output_audio: string | null;
|
|
|
|
|
output_subtitles_srt: string | null;
|
|
|
|
|
output_subtitles_vtt: string | null;
|
|
|
|
|
output_muxed: string | null;
|
|
|
|
|
output_options: string;
|
|
|
|
|
}
|
|
|
|
|
interface AudioSegment {
|
|
|
|
|
audioFile: string;
|
|
|
|
|
startTime: number;
|
|
|
|
|
duration: number;
|
|
|
|
|
description: string;
|
|
|
|
|
}
|
|
|
|
|
interface ProgressData {
|
|
|
|
|
id: string;
|
|
|
|
|
status: string;
|
|
|
|
|
progress: number;
|
|
|
|
|
currentIndex: number;
|
|
|
|
|
totalUnits: number;
|
|
|
|
|
segments: AudioSegment[];
|
|
|
|
|
error: string | null;
|
|
|
|
|
output_audio: string | null;
|
|
|
|
|
output_subtitles_srt: string | null;
|
|
|
|
|
output_subtitles_vtt: string | null;
|
|
|
|
|
output_muxed: string | null;
|
|
|
|
|
}
|
|
|
|
|
interface FileInfo {
|
|
|
|
|
filename: string;
|
|
|
|
|
filePath: string;
|
|
|
|
|
size: number;
|
|
|
|
|
}
|
|
|
|
|
declare let authToken: string | null;
|
|
|
|
|
declare let selectedFilePath: string | null;
|
|
|
|
|
declare const sseMap: Map<string, EventSource>;
|
|
|
|
|
declare let pollTimer: number | null;
|
|
|
|
|
declare const $$: (sel: string) => NodeListOf<HTMLElement>;
|
|
|
|
|
declare const el: (id: string) => HTMLElement;
|
|
|
|
|
declare function apiHeaders(): Record<string, string>;
|
|
|
|
|
declare function api(method: string, url: string, body?: unknown): Promise<Response>;
|
|
|
|
|
declare function apiJson<T>(method: string, url: string, body?: unknown): Promise<T>;
|
|
|
|
|
declare function showLoginScreen(): void;
|
|
|
|
|
declare function showMainScreen(): void;
|
2026-05-15 04:10:06 +02:00
|
|
|
declare function activateTab(tablistId: string, tabId: string): void;
|
|
|
|
|
declare function onTabActivated(tablistId: string, panelId: string): void;
|
|
|
|
|
declare function wireTablist(tablistId: string): void;
|
2026-05-13 17:24:10 +02:00
|
|
|
declare function escapeHtml(str: string | null | undefined): string;
|
|
|
|
|
declare function formatSize(bytes: number): string;
|
|
|
|
|
declare function loadBrowseFiles(): Promise<void>;
|
|
|
|
|
declare const videoUpload: HTMLInputElement;
|
|
|
|
|
declare const uploadName: HTMLElement;
|
2026-05-15 04:10:06 +02:00
|
|
|
declare let youtubeStream: EventSource | null;
|
2026-05-13 17:24:10 +02:00
|
|
|
declare function loadJobs(): Promise<void>;
|
|
|
|
|
declare function renderJobs(jobs: Job[]): void;
|
|
|
|
|
declare function handleJobAction(id: string, action: string): Promise<void>;
|
|
|
|
|
declare function startPolling(): void;
|
|
|
|
|
declare function connectSSE(jobId: string): void;
|
|
|
|
|
declare function updateJobCard(jobId: string, data: ProgressData): void;
|
|
|
|
|
declare function loadSettings(): Promise<void>;
|
|
|
|
|
declare let selectedFiles: Set<string>;
|
|
|
|
|
declare function loadFilesList(): Promise<void>;
|
|
|
|
|
declare function updateFileSelection(): void;
|
|
|
|
|
declare function loadConfigDefaults(): Promise<void>;
|
|
|
|
|
declare function initApp(): void;
|