These four files mix two things too interleaved to commit separately:
in-progress work on anime pipeline tuning (quality/preset/thread
config, per-pipeline parallelism caps), sampled decode verification,
and subtitle-codec-aware remuxing that predates this commit, plus a
set of correctness fixes from an independent Opus 5 review applied
directly on top of it:
- Attached-pic (cover art) streams could be probed as the real video
stream when they came first, silently replacing the actual
codec/height (ffprobe.rs)
- probe_failed rows (null codec/height) were enqueued for transcode
and could never be claimed again, due to the unique partial index -
should_enqueue now rejects them
- tokio::try_join! cancelled the sibling pipeline's in-flight
spawn_blocking encode on the first Err instead of letting it finish
- Duplicate episode_file rows for the same media only had one swept on
an upgrade swap, leaving stale rows/files behind
- File-swap and DB-write on transcode completion weren't atomic;
wrapped in a transaction and made probe-refresh failure non-fatal
- In-progress transcode temp files were visible to library scans
(video extension, no dotfile prefix) and could get imported mid-encode
- Remux temp files leaked on error paths; a Jellyfin refresh failure
failed the whole import cycle instead of just logging
- insufficient_space could false-positive when the download and
library dirs are on the same filesystem (rename is free there)
- Config validation for reference_height and min_size_reduction_pct,
which previously could silently divide-by-zero or overflow deep
inside an encode