You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix ytdlp job, add tests, and manual integration scripts
Harden yt-dlp wrapper with stderr capture, single failure reporting,
output-path collision handling, and focused unit tests. Document ytdlp
in README, remove the planning doc, and add manual integration scripts
for ghr (terraform) and a 500 MB HTTP download to USB test storage.
Co-authored-by: Cursor <cursoragent@cursor.com>
For sites Danzo doesn't natively support (YouTube, Vimeo with audio, etc.), the `ytdlp` command wraps the `yt-dlp` binary and streams its progress into the Danzo TUI so it looks and behaves like every other Danzo job.
363
+
364
+
> ✎ Requires `yt-dlp` to be installed and available on `PATH`. Some downloads (e.g., separate video + audio streams) additionally require `ffmpeg` for the final merge step.
# Without -o, yt-dlp picks its own filename via its default output template.
370
+
danzo ytdlp "https://vimeo.com/22439234"
371
+
```
372
+
373
+
The wrapper:
374
+
375
+
- Streams `yt-dlp`'s structured `JSON_PROGRESS:` lines into the highway display so percent/byte counters move in real time.
376
+
- Switches the bar into a "Merging" sub-status when `yt-dlp` reaches the `[Merger]`/`Merging formats` phase (the bar would otherwise be misleading during the ffmpeg merge).
377
+
- Surfaces the failing `ERROR:` line from `yt-dlp`'s stderr in the failure message, so things like a bad URL produce the actual reason rather than a bare `exit status 1`.
378
+
- If the chosen output path already exists, falls back to `name-(1).ext` (same behavior as `http` / `git-clone`).
379
+
380
+
> ✎ This is intentionally a thin wrapper - any flags beyond `--output/-o` should be configured on the `yt-dlp` side (e.g., via its `--config-location`).
381
+
382
+
</details>
383
+
350
384
## Tips and Notes
351
385
352
386
- Use `--for-ai` when invoking Danzo from scripts or AI agents that need stable plain-text output.
@@ -365,6 +399,8 @@ Danzo uses issues for everything. Open an issue and I will add an appropriate ta
365
399
366
400
Danzo uses `ffmpeg` for merging M3U8 stream segments.
367
401
402
+
Danzo wraps `yt-dlp` for sites it doesn't natively support.
403
+
368
404
Danzo draws inspiration from [aria2](https://github.com/aria2/aria2).
369
405
370
406
Lastly, Danzo uses several Go packages referenced within `go.mod` that allow Danzo to be amazing.
These are **not** Go unit tests. They are **optional, manually run** checks against live networks and real endpoints. Run them when you want to validate downloaders end-to-end on your machine.
4
+
5
+
## Requirements
6
+
7
+
- A built `danzo` binary on `PATH`, or set `DANZO` to the full path of the binary.
8
+
- The destination directory must exist or be mountable. By default scripts use:
9
+
10
+
**`/mnt/usbdrive/danzo-tests`**
11
+
12
+
Override with `DANZO_TEST_DEST` if that path is wrong on your system.
13
+
14
+
- Enough free space on the destination (the 500 MB HTTP test alone needs ~500 MB).
15
+
16
+
## Unauthenticated downloads
17
+
18
+
| Script | What it exercises |
19
+
|--------|-------------------|
20
+
|[`01-ghr-terraform.sh`](./01-ghr-terraform.sh)|`danzo ghr` — latest **Hashicorp Terraform** release asset for this OS/arch (public GitHub API, no token). |
21
+
|[`02-http-500mb.sh`](./02-http-500mb.sh)|`danzo http` — **500 MB** file from `link.testfile.org`. |
0 commit comments