mirror of
https://github.com/thegeneralist01/archivr
synced 2026-10-09 21:03:17 +02:00
The nix flake wrapper pins a yt-dlp via ARCHIVR_YT_DLP, but yt-dlp rots fast — extractors break within weeks of a pin. Add a resolver that probes `--version` on both the pinned binary and a user-installed copy under the mutable state dir, and runs whichever is newer. Version strings are YYYY.MM.DD, so plain string ordering is chronological. Ties resolve toward the state dir: a user who installed it there did so deliberately. ARCHIVR_YT_DLP_FORCE bypasses the comparison entirely, and with no candidate at all we fall back to bare `yt-dlp` on PATH — exactly the previous behaviour. Resolution is cached in a OnceLock so `--version` costs one subprocess per process, and all four inline env::var lookups now go through it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| downloader | ||
| archive.rs | ||
| capture.rs | ||
| database.rs | ||
| hash.rs | ||
| lib.rs | ||
| twitter.rs | ||