Skip to content

feat: integrate ytdlp - #12

Merged
derethil merged 12 commits into
mainfrom
feat/ytdlp-integration
Sep 25, 2026
Merged

derethil merged 12 commits into
mainfrom
feat/ytdlp-integration

Conversation

@derethil

Copy link
Copy Markdown
Owner

This pull request introduces a new import command to the CLI, enabling users to import recipes from social media video sources. It also adds robust validation and error handling for video imports, integrates video configuration into the global config, and makes several improvements to the build process and dependency management. The most important changes are grouped below.


New Import Command & Validation:

  • Adds the import command (in cmd/import/import.go) to fetch and download videos from supported social media sources, with support for dry-run and progress reporting.
  • Implements argument and flag validation for the import command, including URL validation, cookies file checks, and mutual exclusivity of cookie options (cmd/import/validate.go and tests in cmd/import/validate_test.go). [1] [2]
  • Integrates the new command into the CLI root command set (cmd/root.go). [1] [2]

Video Import Configuration & Error Handling:

  • Introduces a VideoConfig section to the main configuration, with sensible defaults for format and max duration (internal/config/config.go, internal/config/section/video.go). [1] [2] [3]
  • Adds user-friendly error handling for common video import failures (e.g., unsupported URLs, missing tools, download errors) in cliutil (internal/cliutil/errors.go).

Build System & Dependency Updates:

  • Updates Go version to 1.27.1 and adds/updates dependencies, including go-ytdlp for video downloading (go.mod). [1] [2]
  • Updates the Nix flake to use Go 1.27, includes runtime dependencies (ffmpeg, yt-dlp), and improves the devshell and build wrapper for the CLI (flake.nix). [1] [2]

Logging & CLI Behavior:

  • Improves logging initialization and error reporting on startup and shutdown, ensuring user-facing errors are clear and context-aware (cmd/root.go). [1] [2]
  • Adjusts the recipe command usage string for clarity (cmd/recipe/recipe.go).

Other Minor Improvements:

  • Skips logging of large response bodies for certain Tandoor endpoints to reduce log noise (internal/tandoor/client.go). [1] [2]

@derethil
derethil marked this pull request as ready for review September 25, 2026 05:15
@derethil
derethil force-pushed the feat/ytdlp-integration branch from 4b99201 to 3444e5a Compare September 25, 2026 05:21
@derethil
derethil merged commit 00f0177 into main Sep 25, 2026
4 checks passed
@derethil
derethil deleted the feat/ytdlp-integration branch September 25, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant