commit a02053a8267d781e02fa16bbcdf3d649c046efaa
parent e881894248863350d9703e9fb40dd889062fdcc3
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 13 Nov 2026 15:28:47 -0500
persist-videos below-height: the route, Save these videos' select, the proxy on the video page, docs
The route and the list action accept "below-height"; a cross-channel run
queues the channels whose lowerHeight items it re-fetches. Save these videos'
replace checkbox is a select of the three policies, and the preview lists the
two new buckets. The video page's alternate row says when a copy is kept as
the proxy, and its drop confirm says so. Ops help, COMMANDS.md (regenerated),
OPERATING.md and the editor CHANGELOG describe it.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
10 files changed, 79 insertions(+), 33 deletions(-)
diff --git a/COMMANDS.md b/COMMANDS.md
@@ -182,7 +182,7 @@ Drives a running editor over HTTP (`/api/ops/*`, the same actions its pages run)
| `tags` | tags edits the curated-tag vocabulary through its one writer: {"op": "define", "tag": {...}} (the WHOLE definition: id, label, rules and "sites", the sites it exists on, absent = every site) or {"op": "remove", "tag": "<id>"}. `get tags [<id>]` reads it. | `pnpm ops tags --json '{"op":"define","tag":{"id":"eva-collab","label":"Collab"}}'` |
| `tag-videos` | tag-videos pins, unpins, suppresses or unsuppresses one tag on many videos in ONE write: {"tag", "op": "add" \| "remove" \| "suppress" \| "unsuppress", "videos": \[{"slug", "id"}, ...\]}. "remove" unpins only — a rule's hit survives; "suppress" rejects it. The write records who asked (ARCHILYZER\_AGENT); a big list goes in --file. | `pnpm ops tag-videos --file ids.json` |
| `keep-videos` | keep-videos sets the "Do not clean" marker on every held video of a channel whose title or description matches a download-filter pattern: {"slug", "match", "fields"?: \["title" \| "description"\], "note"?, "dryRun"?}. A match not held is reported in "notDownloaded", never created; a fresh channel wants metadata-scan first. Or by id: {"slug", "ids": \[...\], "note"?, "dryRun"?} — a held video is marked now, one not held yet (a live stream, a VOD not fetched) is PENDING and marked when its record is first written (a download, an import, a recording); "pendingAll" lists the channel's pending ids. | `pnpm ops keep-videos --json '{"slug":"demo-rumble","ids":["v1abcde"],"note":"keep"}'` |
-| `persist-videos` | persist-videos saves specific videos, across channels, to the saved-video store: {"items": \[{"slug", "id"}, ...\]}. "format": "original" \| "video\_720" (default: each channel's own). "replace": "above-height" also re-fetches a saved one whose height is unknown or above that quality (default "never"). "gapMs" pauses between downloads (default the batch gap), "minFreeMemMb" waits for that much free memory before each. "dryRun": true answers with the buckets (saved, wrongHeight, toFetch, noUrl, unknown) and starts nothing. One job per channel, on its download queue; a low disk or a rate limit stops it, and running the same body again resumes — saved videos are skipped. Over a copy already in the store (an import, an attach, a live recording or an earlier download) the download becomes the active one and the old copy is kept beside it, flagged for a check (`get saved-alternates`); nothing is deleted. | `pnpm ops persist-videos --file list.json --wait` |
+| `persist-videos` | persist-videos saves specific videos, across channels, to the saved-video store: {"items": \[{"slug", "id"}, ...\]}. "format": "original" \| "video\_720" (default: each channel's own). "replace": "above-height" also re-fetches a saved one whose height is unknown or above that quality; "below-height" one whose height (recorded, else ffprobed) is below what that quality gives -- its ceiling, capped by the tallest format the record's metadata lists -- and keeps the old copy as its proxy ("keptAs": "proxy" on the alternate, once the new copy is taller); one that cannot be compared, or already downloaded at that quality, is left alone (default "never"). "gapMs" pauses between downloads (default the batch gap), "minFreeMemMb" waits for that much free memory before each. "dryRun": true answers with the buckets (saved, wrongHeight, lowerHeight, heightUnknown, toFetch, noUrl, unknown) and starts nothing. One job per channel, on its download queue; a low disk or a rate limit stops it, and running the same body again resumes — saved videos are skipped. Over a copy already in the store (an import, an attach, a live recording or an earlier download) the download becomes the active one and the old copy is kept beside it, flagged for a check (`get saved-alternates`) or kept as the proxy; nothing is deleted. | `pnpm ops persist-videos --file list.json --wait` |
| `fetch-windows` | fetch-windows fetches clip windows, one paced job per platform queue (YouTube and Rumble side by side): {"siteId"} fetches every window the site's published reports cite and the disk does not hold; {"items": \[{"slug", "id", "from", "to", "clipId"?, "reason"?, "pad"?, "webpageUrl"?, "force"?}, ...\], "requestedBy", "manifest"?} fetches a list. A window of a recording whose availability says deleted or private is refused (unresolved) unless the item names a "webpageUrl" (a copy: find-copy) or "force": true (a stale reading; or check its availability again on the channel page's Diagnostics). "maxHeight" caps the source height (default 720). "dryRun": true lists the windows per platform, the ones already on disk ("cached") and the ones no fetch can fill ("unfetchable": deleted, off the site) and starts nothing. A platform cooling down or held is refused for its group; a 429, or two 403s in a row, backs the platform off and stops its job. Running the same body again resumes — fetched windows are cached, and a window a queued or running job will already write is answered in "inFlight" with that job, whose id joins "jobIds" (so --wait follows it) and no second job is queued. Windows run on the platform's clip queue (clips:youtube), never behind its long downloads. "storedUrl": "fallback" \| "only" (default "never") cuts a window from the media URL its record's metadata.info.json stores — Odysee's CDN file (\*.odycdn.com), the only platform allowed — when the page lookup is rate-limited ("fallback": after a 429) or without asking the page at all ("only"). A held or cooling platform still runs its windows that have one; the rest are refused or left for a later run. Same queue, same gaps; the window's provenance says source "stored-media-url". "minGapSeconds" (items only, 30–3600) sets this run's pause between two fetches in place of the platform's floor (Rumble's 120 s); still jittered up to half again. Shorter than the default risks Rumble's IP-wide Cloudflare challenge; a Retry keeps it. "archive" (items only) names the CONNECTED archive the items cite (settings.remoteArchives): a channel this editor does not hold is registered as a remote-only channel of it (config only, no listing; answered in "registered"; a dry run registers nothing), and a remote-only channel's page URL comes from the archive's record. Its window on a whole-recording platform is refused with the recording's estimated size unless "allowWholeRecording": true. Another origin registers nothing. A media URL's transient 403 (googlevideo's) is asked once more after a pause before it counts toward the two-403 stop. A window on a whole-recording platform (settings.clips .wholeRecordingPlatforms, default Rumble) is not seeked: the video is saved whole once, as "Persist source video" saves it, on the platform's download queue, and its windows are cut from it — a remote Rumble seek put the picture 1-4 s off the sound. A failed whole download fails its windows with the download's message. "wholeRecording": false fetches every window of the run by a remote seek instead. A fetched window whose picture still runs off its sound is set aside (<from>-<to>.desynced.<ext>) and fails; a held one is set aside and fetched again (check-windows). | `pnpm ops fetch-windows --json '{"siteId":"demo-site","dryRun":true}'`<br>`pnpm ops fetch-windows --file windows.json --wait` |
| `cut-release` | cut-release turns a changelog's \[Unreleased\] into "## \[<version>\] - <date>": {"workspace": "editor" \| "export" \| "all", "version": "X.Y.Z" \| "next" \| "next-minor", "commit": boolean (default false), "date": "YYYY-MM-DD" (default today)}. "all" cuts both with ONE version and commits each ("Release <workspace> <version>") — or neither: every check runs before either file is written. Only an editor built from release 10 or later has the route (an older one answers 404); with no editor running, `archilyzer release cut` does the same locally. | `pnpm ops cut-release --json '{"workspace":"all","version":"next","commit":true}'` |
| `amend-release` | amend-release rewrites the LATEST release of one changelog: {"workspace": "editor" \| "export", "release": "<its version, as you saw it>", "version": "patch" \| "minor" \| "major" (a bump of the release BEFORE it) \| "X.Y.Z", "date": "YYYY-MM-DD", "fold": true (the \[Unreleased\] bullets move into it), "commit": boolean (default false)} -- or {"uncut": true} to withdraw it, its bullets back under \[Unreleased\]. An older release is refused. A version change commits as that version's release ("Release editor 0.12.0") with the amend in the body; history is never rewritten. The same amend again changes nothing. With no editor running, `archilyzer release amend` does the same locally. | `pnpm ops amend-release --json '{"workspace":"editor","release":"0.11.1","version":"minor","commit":true}'` |
@@ -304,8 +304,10 @@ get saved-alternates [<slug>] lists every saved video holding two copies:
explicit persist (persist-videos, Persist source video, a whole-recording
fetch) makes the download active, any other keeps the saved one unless
the download is longer — and the other stays beside it as
- source-media.alt-<h>p-<stamp>.<ext>, flagged for a check. Each video:
- its line, the active copy, the alternates (height, seconds, origin).
+ source-media.alt-<h>p-<stamp>.<ext>, flagged for a check -- or kept on
+ purpose ("keptAs": "proxy": the lower copy a persist-videos "below-height"
+ replaced). Each video: its line, the active copy, the alternates
+ (height, seconds, origin, keptAs).
Once one is checked, `drop-saved-alternate` deletes it.
get sites lists every site: id, title, siteUrl, Pages project, audience,
listed, search, publish policy, channels, citedChannels. (`get publish`
diff --git a/OPERATING.md b/OPERATING.md
@@ -132,6 +132,13 @@ pnpm ops persist-videos --json '{"items":[{"slug":"example","id":"<videoId>"}]
(`"operation"` pins one operation's tier).
- Bucket names and sizes: `pnpm ops get channel example`.
- Keep videos out of cleanup by title or description: `pnpm ops keep-videos --json '{"slug":"example","match":"interview","dryRun":true}'`.
+- A saved copy lower than you want (a 360p import of a VOD the source has at 1080p):
+ `pnpm ops persist-videos --json '{"items":[{"slug":"example","id":"<videoId>"}],"format":"original","replace":"below-height","dryRun":true}'`.
+ It is in `lowerHeight` when its height (recorded, else read with ffprobe) is below what the quality gives: 720 for
+ `video_720`, the tallest format in its `metadata.info.json` for `original`. `heightUnknown` means it could not be
+ compared, and nothing is fetched for it. Run it without `dryRun`. The download becomes the active copy, and the old
+ one stays beside it as its proxy (`"keptAs": "proxy"` in `get saved-alternates`). Nothing is deleted.
+ `"above-height"` is the other way: it re-fetches a saved copy taller than `video_720`, or of unknown height.
- A new caption download writes its `transcript.cues.json` as it lands (a umtool build reads it); `build-cues`
mends an older one.
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
## [Unreleased]
+- **`persist-videos` can upgrade a saved copy that is lower than asked, and keeps the old one as its proxy.** `"replace": "below-height"` re-fetches a saved video whose height is below what the quality gives: 720 for `video_720`, or the tallest format its metadata lists for `original` (the lower of the two for `video_720`). A copy with no recorded height (an import or an attach) is measured with ffprobe first. The download becomes the active copy; the old one stays beside it, marked `"keptAs": "proxy"` once the new one is taller, and the video page, /saved-videos and `get saved-alternates` say it is the lower-quality copy kept on purpose. The dry run's new buckets are `lowerHeight` and `heightUnknown` (not compared: the height could not be read, or `original` with no format heights in the metadata). A copy already downloaded at that quality is left alone. "Save these videos" has a select for it in place of the checkbox. `"never"` stays the default, and `"above-height"` works as before.
- **umtool: a picture-only post's read can become its screen, and a screen line can be read in your own voice.** `umtool posts screen <p> <item> add --from-read` (the post bench's "From its read") turns the script of a picture-only post into a screen: one line per line of the script, not checked, and with no speaker split out of a line. That screen *is* the post's read, so the thread read no longer reads the same words twice. `posts screen … record <id> <n> --recording <file>` (the bench's per-line Record / Stop / Keep) records one line as the read says it, with masked numbers and redacted words left out of what you read. It is kept as new takes: recorded, cleaned, and converted to the line's speaker's character's stock voice. None of them is picked. A line take is read only when you choose it, with the bench's per-line select or `set <id> take.<n>=<take>`. A choice follows its line when lines move, and is refused when the line's words or speaker changed. `--check-words` (CLI only) transcribes the recording first and refuses it if it says a number, a handle, an anonymous author's name or a redacted term. The lint flags every chosen take that was not heard this way.
- **umtool: no preview plays a read the build refuses.** After a screen line is edited, removed, redacted or no longer read, the build refuses the old read. Play, Present (including the public payload), the card page and the post bench's player now refuse it too: they play the item silent and say why, until the read is made again. Present's public payload carries a post's screens the way the card draws them (masked, blurred speakers nameless), never the raw lines.
- **umtool: no part of a read may say what the item's screens mask.** A build refuses a read in which any part says a number or e-mail one of the item's screens masks, or the words of a redacted line. That covers the post's own words, a context post and a screen line. Two recordings kept at the same moment never take the same file: a recorded take's name is now claimed with an exclusive create.
diff --git a/editor/app/api/ops/persist-videos/route.ts b/editor/app/api/ops/persist-videos/route.ts
@@ -22,13 +22,16 @@ export const dynamic = "force-dynamic";
//
// Persist specific videos, across channels, to the saved-video store: the
// video page's "Persist source video" over a list. `plan` buckets every item —
-// saved, wrongHeight, toFetch, noUrl, unknown — with counts and ids, and
+// saved, wrongHeight, lowerHeight, heightUnknown, toFetch, noUrl, unknown —
+// with counts and ids, and
// `willFetch` is how many downloads a run makes. A real run starts one job per
// channel with something to fetch, on that channel's download queue.
//
// `format` ("original" | "video_720") defaults to each channel's own quality.
// `replace: "above-height"` also re-fetches a saved container whose height is
-// unknown or above that quality's ceiling (default "never"). `gapMs` is the
+// unknown or above that quality's ceiling; `replace: "below-height"` one whose
+// height (recorded, else probed) is below what that quality gives, keeping the
+// old copy beside it as its proxy (default "never"). `gapMs` is the
// pause between downloads (default the batch downloads' gap), `minFreeMemMb`
// holds each download until that much memory is available (default 0, off).
// Re-running the same body is the resume: saved videos are skipped.
diff --git a/editor/app/api/ops/saved-alternates/route.ts b/editor/app/api/ops/saved-alternates/route.ts
@@ -14,7 +14,9 @@ export const dynamic = "force-dynamic";
//
// Every saved video that holds two copies (ytdlp/savedAlternates.ts): a
// download over a container already in the store keeps both, one active and
-// the other flagged here for a check. The /saved-videos page lists the same.
+// the other flagged here for a check — or, with `keptAs: "proxy"`, kept on
+// purpose: the lower-quality copy persist-videos' "below-height" replaced.
+// The /saved-videos page lists the same.
// Pointers only — no container is opened. Nothing is written.
export async function GET(request: Request) {
return readRoute(request, ["slug"], async (q) => {
diff --git a/editor/app/channels/[slug]/persistActions.ts b/editor/app/channels/[slug]/persistActions.ts
@@ -188,6 +188,7 @@ export async function persistVideosAction(
[
...plan.toFetch.items,
...(opts.replace === "above-height" ? plan.wrongHeight.items : []),
+ ...(opts.replace === "below-height" ? plan.lowerHeight.items : []),
].map((i) => i.slug),
);
const bySlug = new Map<string, string[]>();
diff --git a/editor/app/channels/[slug]/videos/[id]/components/cards/SourceVideoSection.tsx b/editor/app/channels/[slug]/videos/[id]/components/cards/SourceVideoSection.tsx
@@ -3,9 +3,10 @@
import { useState, useTransition } from "react";
import { StreamActionLog } from "yt-dlp-transcript-common/components/StreamActionLog";
import type { ChannelHandling } from "yt-dlp-transcript-common/lib/channelConfig";
-import type {
- SavedVideoAlternate,
- SavedVideoPointer,
+import {
+ SAVED_ALTERNATE_KEPT_AS_LABELS,
+ type SavedVideoAlternate,
+ type SavedVideoPointer,
} from "yt-dlp-transcript-common/lib/savedVideo";
import { formatBytes } from "yt-dlp-transcript-common/lib/format";
import {
@@ -221,8 +222,9 @@ function PersistedSourceVideo({
>
<p className="text-muted-foreground">
Other copies kept beside the active one (a download over a copy
- already in the store keeps both), flagged for a check. Drop one
- once it has been checked; the active copy is not touched.
+ already in the store keeps both), flagged for a check unless kept
+ on purpose as a proxy. Drop one once it has been checked; the
+ active copy is not touched.
</p>
<ul className="flex flex-col gap-2">
{savedVideo.alternates!.map((a) => (
@@ -290,6 +292,7 @@ function SavedAlternateRow({
alternate.vcodec,
formatBytes(alternate.bytes),
alternate.origin?.requestedBy ?? "download",
+ alternate.keptAs ? SAVED_ALTERNATE_KEPT_AS_LABELS[alternate.keptAs] : undefined,
]
.filter(Boolean)
.join(", ");
@@ -305,7 +308,11 @@ function SavedAlternateRow({
<span className="flex flex-wrap items-center gap-2">
{armed ? (
<>
- <span>Delete this copy from the store? No undo.</span>
+ <span>
+ {alternate.keptAs === "proxy"
+ ? "This is the lower-quality copy kept on purpose as a proxy. Delete it from the store? No undo."
+ : "Delete this copy from the store? No undo."}
+ </span>
<button
type="button"
disabled={pending}
diff --git a/editor/app/saved-videos/components/PersistVideoListControl.tsx b/editor/app/saved-videos/components/PersistVideoListControl.tsx
@@ -5,6 +5,7 @@ import { useState, useTransition } from "react";
import { Button } from "yt-dlp-transcript-common/components/ui/button";
import { SOURCE_VIDEO_QUALITY_LABELS } from "yt-dlp-transcript-common/ytdlp/downloadFormat";
import type { PersistVideosActionResult } from "../../channels/[slug]/persistActions";
+import type { PersistReplacePolicy } from "yt-dlp-transcript-common/controller/persistVideos";
import { persistVideoListAction } from "../persistListAction";
// "Save these videos" (release 32 R6): `pnpm ops persist-videos` from the UI —
@@ -14,12 +15,12 @@ import { persistVideoListAction } from "../persistListAction";
type Format = "" | "original" | "video_720";
-const sameKey = (text: string, format: Format, replace: boolean) => JSON.stringify([text.trim(), format, replace]);
+const sameKey = (text: string, format: Format, replace: PersistReplacePolicy) => JSON.stringify([text.trim(), format, replace]);
export function PersistVideoListControl() {
const [text, setText] = useState("");
const [format, setFormat] = useState<Format>("");
- const [replace, setReplace] = useState(false);
+ const [replace, setReplace] = useState<PersistReplacePolicy>("never");
const [previewed, setPreviewed] = useState<string | null>(null);
const [result, setResult] = useState<PersistVideosActionResult | null>(null);
const [pending, start] = useTransition();
@@ -29,7 +30,7 @@ export function PersistVideoListControl() {
const r = await persistVideoListAction({
text,
...(format ? { format } : {}),
- ...(replace ? { replace: "above-height" as const } : {}),
+ ...(replace !== "never" ? { replace } : {}),
dryRun,
});
setResult(r);
@@ -65,8 +66,17 @@ export function PersistVideoListControl() {
</select>
</label>
<label className="flex items-center gap-2">
- <input type="checkbox" checked={replace} onChange={(e) => setReplace(e.target.checked)} />
- Also replace a saved one taller than that quality, or of unknown height
+ <span className="text-muted-foreground">One already saved</span>
+ <select
+ value={replace}
+ onChange={(e) => setReplace(e.target.value as PersistReplacePolicy)}
+ aria-label="replace saved copies"
+ className="rounded border border-border bg-card px-2 py-1 text-sm"
+ >
+ <option value="never">leave it</option>
+ <option value="above-height">replace it if taller than that quality, or of unknown height</option>
+ <option value="below-height">upgrade it if lower than that quality gives; keep the old one as a proxy</option>
+ </select>
</label>
</div>
<div className="flex flex-wrap items-center gap-2">
@@ -83,10 +93,15 @@ export function PersistVideoListControl() {
);
}
-const BUCKETS: { key: "saved" | "toFetch" | "wrongHeight" | "noUrl" | "unknown"; words: string }[] = [
+const BUCKETS: {
+ key: "saved" | "toFetch" | "wrongHeight" | "lowerHeight" | "heightUnknown" | "noUrl" | "unknown";
+ words: string;
+}[] = [
{ key: "toFetch", words: "to download" },
{ key: "saved", words: "already saved" },
{ key: "wrongHeight", words: "saved, but taller than asked or of unknown height" },
+ { key: "lowerHeight", words: "saved, but lower than that quality gives" },
+ { key: "heightUnknown", words: "saved, not compared (height, or the source's best, not known)" },
{ key: "noUrl", words: "with no source address to download from" },
{ key: "unknown", words: "not found (no such channel or video)" },
];
@@ -107,7 +122,7 @@ function PersistOutcome({ result }: { result: PersistVideosActionResult }) {
{plan.willFetch} video{plan.willFetch === 1 ? "" : "s"}.
</p>
<ul className="list-disc pl-5 text-muted-foreground">
- {BUCKETS.filter((b) => plan[b.key].count > 0).map((b) => (
+ {BUCKETS.filter((b) => (plan[b.key]?.count ?? 0) > 0).map((b) => (
<li key={b.key} data-bucket={b.key}>
{plan[b.key].count} {b.words}
{plan[b.key].count <= 8 && (
diff --git a/editor/app/saved-videos/persistListAction.ts b/editor/app/saved-videos/persistListAction.ts
@@ -1,7 +1,7 @@
"use server";
import { persistVideosAction, type PersistVideosActionResult } from "../channels/[slug]/persistActions";
-import type { PersistReplacePolicy } from "yt-dlp-transcript-common/controller/persistVideos";
+import { isPersistReplacePolicy, type PersistReplacePolicy } from "yt-dlp-transcript-common/controller/persistVideos";
import { isSourceVideoQuality, type SourceVideoQuality } from "yt-dlp-transcript-common/ytdlp/downloadFormat";
import { parseVideoList } from "./lib/videoList";
@@ -38,6 +38,6 @@ export async function persistVideoListAction(input: {
items,
dryRun: input.dryRun,
...(format ? { format } : {}),
- ...(input.replace === "above-height" ? { replace: "above-height" as const } : {}),
+ ...(isPersistReplacePolicy(input.replace) && input.replace !== "never" ? { replace: input.replace } : {}),
});
}
diff --git a/scripts/archilyzer-ops.mjs b/scripts/archilyzer-ops.mjs
@@ -1173,8 +1173,10 @@ export function usage() {
" explicit persist (persist-videos, Persist source video, a whole-recording",
" fetch) makes the download active, any other keeps the saved one unless",
" the download is longer — and the other stays beside it as",
- " source-media.alt-<h>p-<stamp>.<ext>, flagged for a check. Each video:",
- " its line, the active copy, the alternates (height, seconds, origin).",
+ " source-media.alt-<h>p-<stamp>.<ext>, flagged for a check -- or kept on",
+ ' purpose ("keptAs": "proxy": the lower copy a persist-videos "below-height"',
+ " replaced). Each video: its line, the active copy, the alternates",
+ " (height, seconds, origin, keptAs).",
" Once one is checked, `drop-saved-alternate` deletes it.",
"get sites lists every site: id, title, siteUrl, Pages project, audience,",
" listed, search, publish policy, channels, citedChannels. (`get publish`",
@@ -1824,16 +1826,22 @@ export function usage() {
'persist-videos saves specific videos, across channels, to the saved-video',
' store: {"items": [{"slug", "id"}, ...]}. "format": "original" |',
' "video_720" (default: each channel\'s own). "replace": "above-height" also',
- ' re-fetches a saved one whose height is unknown or above that quality',
- ' (default "never"). "gapMs" pauses between downloads (default the batch',
- ' gap), "minFreeMemMb" waits for that much free memory before each.',
- ' "dryRun": true answers with the buckets (saved, wrongHeight, toFetch,',
- ' noUrl, unknown) and starts nothing. One job per channel, on its download',
- " queue; a low disk or a rate limit stops it, and running the same body",
- " again resumes — saved videos are skipped. Over a copy already in the",
- " store (an import, an attach, a live recording or an earlier download) the",
- " download becomes the active one and the old copy is kept beside it,",
- " flagged for a check (`get saved-alternates`); nothing is deleted.",
+ ' re-fetches a saved one whose height is unknown or above that quality;',
+ ' "below-height" one whose height (recorded, else ffprobed) is below what',
+ ' that quality gives -- its ceiling, capped by the tallest format the',
+ ' record\'s metadata lists -- and keeps the old copy as its proxy',
+ ' ("keptAs": "proxy" on the alternate, once the new copy is taller); one',
+ ' that cannot be compared, or already downloaded at that quality, is left',
+ ' alone (default "never"). "gapMs" pauses between downloads (default the',
+ ' batch gap), "minFreeMemMb" waits for that much free memory before each.',
+ ' "dryRun": true answers with the buckets (saved, wrongHeight, lowerHeight,',
+ ' heightUnknown, toFetch, noUrl, unknown) and starts nothing. One job per',
+ " channel, on its download queue; a low disk or a rate limit stops it, and",
+ " running the same body again resumes — saved videos are skipped. Over a",
+ " copy already in the store (an import, an attach, a live recording or an",
+ " earlier download) the download becomes the active one and the old copy",
+ " is kept beside it, flagged for a check (`get saved-alternates`) or kept",
+ " as the proxy; nothing is deleted.",
"",
'import-archive-org imports archive.org media into a channel, as one job on',
' archive.org\'s queue: {"slug", "item", "files": [...] | "match": "<regex>"}',