Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 85ccfbd1e12f6f8cdac27b80cd1e7359cf64408e
parent 470b64ba7bf63ca7538386a70b65952694ca8265
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sun, 20 Sep 2026 19:43:53 -0400

fetch-window: the scratch name has to be an mp4 too

A window is written as <from>-<to>.part.mp4 and renamed. `.part` in the middle
keeps a half-written file out of the listing — parseClipWindowName anchors on
<from>-<to> and the extra segment fails it. `.mp4` on the end is for yt-dlp,
which infers the container from the output extension: given a name ending in
`.part` it either refuses the merge or appends the real extension itself, which
is the VP9/webm trap --merge-output-format is there to avoid.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Diffstat:
Mcommon/ytdlp/fetchWindowManaged.ts | 15++++++++++++---
Dexport/public/public | 2--
Mumtool/lib/report/raw-cache.mjs | 3+--
3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/common/ytdlp/fetchWindowManaged.ts b/common/ytdlp/fetchWindowManaged.ts @@ -30,6 +30,7 @@ import type { Paths } from "../lib/paths"; import { clipsDirFor, clipWindowFile, + clipWindowName, type ClipProvenance, } from "../lib/clipWindow"; import { @@ -152,9 +153,17 @@ export async function fetchWindowManaged( const clipsDir = clipsDirFor(videoDir); await mkdir(clipsDir, { recursive: true }); const dest = clipWindowPath(videoDir, from, to); - // A dotfile, so a half-written window can never be parsed as one: listing - // only admits `<from>-<to>.mp4`. - const part = path.join(clipsDir, `.${clipWindowFile(from, to)}.part`); + // `<from>-<to>.part.mp4`, and BOTH halves of that name matter. + // + // `.part` in the middle is what stops a half-written window being read as a + // finished one: parseClipWindowName anchors on `<from>-<to>` and the extra + // segment fails it, so the listing skips the file until the rename. + // + // `.mp4` on the END is for yt-dlp, which infers the container from the output + // extension. Given a name ending in `.part` it either refuses the merge or + // appends the real extension itself — the stray-file case below — and the + // whole point of --merge-output-format here is to avoid the VP9/webm trap. + const part = path.join(clipsDir, `${clipWindowName(from, to)}.part.mp4`); await rm(part, { force: true }); const maxHeight = opts.maxHeight ?? DEFAULT_CLIP_MAX_HEIGHT; diff --git a/export/public/public b/export/public/public @@ -1 +0,0 @@ -/home/user/Projects/yt-dlp-transcript-browser/export/public -\ No newline at end of file diff --git a/umtool/lib/report/raw-cache.mjs b/umtool/lib/report/raw-cache.mjs @@ -46,8 +46,7 @@ const SOURCE_MEDIA_RE = /^source-media\.[A-Za-z0-9]+$/; * pad applied, and it calls three of four fixture clips unfetched), and not * mere overlap -- a half-covered clip cannot be watched through, so it is not * ready to judge. - */ -/** + * * @param {string} projectDir * @param {{ extraDirs?: { video: string, dir: string, duration?: number }[] }} [opts] * Directories OUTSIDE the project that also hold windows of a given video --