hako/internal/archival/archiver
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Felipe M. 73241097fa
All checks were successful
CI / goreleaser-lint (push) Successful in 8s
CI / format (push) Successful in 37s
CI / lint (push) Successful in 5m17s
CI / test (push) Successful in 7m8s
CI / build (push) Successful in 5m23s
CI / e2e (push) Successful in 31m11s
fix: archive yt-dlp videos when other assets fail (#4)
## Summary

A missing or failed English subtitle download made the whole yt-dlp archival fail, even when the video was available.

- Add an `ignore_errors` setting to the yt-dlp archiver. It is `true` by default.
- With `ignore_errors`, yt-dlp runs with `--ignore-errors`. A failed subtitle or thumbnail download becomes a warning, and the video still downloads.
- A non-zero exit is accepted only when a video or audio file exists. The yt-dlp `WARNING` and `ERROR` lines go to the log with the link URL.
- Per-format streams left by a failed merge (`title.f400.mp4`, `title.f251-drc.webm`) do not count as media. A video without its audio stream still fails.
- `--no-warnings` is removed from the download command, so failure messages show the warnings that explain them.

## Limits

- The format-stream check matches numeric format IDs only (YouTube). Named IDs such as `fhls-720p` are not detected.
- The missing-asset warnings appear only in the server log, not in the UI.

## Tests

- `go test ./internal/archival/...` passes.
- New tests cover the setting default, the config override, the media-file check, and the warning extraction.

Reviewed-on: #4
2026-10-02 11:46:03 +02:00
..
archiver.go chore: make format 2026-01-12 19:35:18 +01:00
direct_download.go chore: make format 2026-01-12 19:35:18 +01:00
direct_download_test.go chore: make format 2026-01-12 19:35:18 +01:00
manager.go chore: make format 2026-01-12 19:35:18 +01:00
obelisk.go fix: tolerate unreachable sub-resources in obelisk archiver 2026-09-22 20:45:07 +02:00
obelisk_test.go fix: tolerate unreachable sub-resources in obelisk archiver 2026-09-22 20:45:07 +02:00
thumbnail.go chore: make format 2026-01-12 19:35:18 +01:00
thumbnail_extractor.go chore: make format 2026-01-12 19:35:18 +01:00
thumbnail_extractor_test.go chore: make format 2026-01-12 19:35:18 +01:00
yt_dlp.go fix: archive yt-dlp videos when other assets fail (#4) 2026-10-02 11:46:03 +02:00
yt_dlp_test.go fix: archive yt-dlp videos when other assets fail (#4) 2026-10-02 11:46:03 +02:00