import type { TranscriptSalvage } from "yt-dlp-transcript-common/lib/transcribeOutcome"; import { formatDuration } from "yt-dlp-transcript-common/lib/format"; // A SALVAGE TRANSCRIPT SAYS WHAT IT IS MISSING (release 30, lane Q): made // from a damaged file decoded with error tolerance, so where nothing decoded // there is no transcript. The times are the recording's own. const clock = (s: number) => formatDuration(s) || "0:00"; const MAX_LISTED = 8; // `fullAudio`: the stored-URL download attempts made before the salvage // (release 32 R8, lib/fullAudioFirst.ts), when the record stores one. export function SalvagedTranscriptNotice({ salvaged, fullAudio, }: { salvaged: TranscriptSalvage; fullAudio?: { attempts: number; of: number } | null; }) { const listed = salvaged.gaps.slice(0, MAX_LISTED); const more = salvaged.gaps.length - listed.length; return (