1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-07-21 18:55:36 +02:00

doc(server): scope per_item_quality guarantee to the UI

The server validates per_item_quality value shapes but does not enforce
that every playlist item has an entry. Items without an override get
the global quality as a yt-dlp cap with graceful fallback.

The 'must choose quality for unsupported videos' invariant is a UI
constraint enforced by the frontend before submission. A direct API
caller bypassing the UI accepts yt-dlp's standard cap-and-fallback
behavior. Document this scope explicitly so the gap is intentional,
not accidental.
This commit is contained in:
TheGeneralist 2026-07-20 23:04:15 +02:00
parent c8a0397c26
commit aed9c581fd
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4

View file

@ -872,6 +872,13 @@ async fn capture_handler(
)));
}
}
// NOTE: the server does not enforce that every playlist item has a per_item_quality
// entry. Items without an override receive the global `quality` value, which
// yt-dlp applies as a format-selector cap (e.g. bestvideo[height<=1080]) and
// falls back gracefully to the best available format below that cap. The
// "must choose quality for unsupported videos" invariant is enforced by the
// frontend before submission; a direct API caller bypassing the UI accepts
// yt-dlp's standard cap-and-fallback behavior.
let mounted = mounted_archive(&state, &archive_id)?;
let archive_paths =
archive::read_archive_paths(&mounted.archive_path).map_err(ApiError::from)?;