hako/internal/archival
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 fix: archive yt-dlp videos when other assets fail (#4) 2026-10-02 11:46:03 +02:00
domain feat: add yt-dlp support for video downloads 2026-01-29 12:52:29 +01:00
rules feat: add yt-dlp support for video downloads 2026-01-29 12:52:29 +01:00
store feat: search 2026-01-18 09:51:25 +01:00