Skip to content

feat: install gallery-dl from the app - #141

Merged
vanloctech merged 1 commit into
mainfrom
feat/issue-136-install-gallery-dl
Nov 12, 2026
Merged

vanloctech merged 1 commit into
mainfrom
feat/issue-136-install-gallery-dl

Conversation

@vanloctech

@vanloctech vanloctech commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #136.

The Gallery page needs gallery-dl, but Youwee only used a system install, so users had to install it themselves. The reporter didn't know how. This PR lets Youwee install gallery-dl itself where an official standalone build exists, and shows clear instructions where one doesn't.

Where the binaries come from: gallery-dl moved to Codeberg. GitHub releases after 1.31 no longer carry binaries. Codeberg's official releases have gallery-dl.exe, gallery-dl_x86.exe and gallery-dl.bin (x86_64 Linux) with SHA256SUMS. There is no official macOS build, so macOS gets Homebrew instructions instead.

Behavior

  • Windows / x86_64 Linux: an Install gallery-dl button in Settings → Dependencies and in the Gallery page's "gallery-dl is required" banner.
    • Progress shows checking checksum → % with MB → verifying.
    • After install, the card shows "Installed by Youwee", "Up to date" or "Available x.y.z" with an Update button.
  • macOS (and e.g. Linux arm64): a copyable brew install gallery-dl (or pip install -U gallery-dl) command with a Check again button.
  • A system gallery-dl is still preferred when present, as before.

Changes

  • services/gallerydl.rs:
    • Codeberg latest-release lookup, platform → asset mapping, SHA256SUMS parsing, update check.
    • GalleryDlStatus.can_install.
    • Unit tests for asset mapping, checksum lookup and version normalization.
  • commands/dependencies.rs:
    • download_gallerydl streams the binary, emits gallerydl-download-progress, verifies SHA-256, writes via a temp file and rename, and sets the exec bit on Unix. It installs to app_data/bin, where the existing lookup already looks.
    • check_gallerydl_update.
  • New error codes GALLERYDL_INSTALL_UNSUPPORTED and GALLERYDL_SYSTEM_MANAGED, documented in docs/backend-error-codes.md.
  • DependenciesContext: gallery-dl download, progress and update state. On startup it runs a silent update check for the app-managed copy.
  • GalleryDlInstall component shared by Settings and the Gallery page. It reuses the shared progress helper.
  • Fix: the Gallery page's Open Dependencies button opened the General tab. It now opens Dependencies.
  • i18n for all 13 locales. Unused systemGallerydlNotFound removed. Changelog entries in EN, VI and ZH-CN.

Test plan

  • Biome, tsc, bun tests (114) and cargo check pass (pre-commit hook)
  • cargo test passes (232), including the new gallery-dl tests
  • Codeberg download returns 200 with content-length (so % works), and gallery-dl_x86.exe's SHA-256 matches SHA256SUMS
  • Manual (Windows or x86_64 Linux): install from the Gallery banner, then download a gallery
  • Manual (macOS): without gallery-dl, the Homebrew command and Check again show; after brew install gallery-dl, Check again detects it

🤖 Generated with Claude Code

Users had to install gallery-dl themselves before the Gallery page
worked, which many did not know how to do (#136).

- On Windows and x86_64 Linux, Settings > Dependencies and the Gallery
  page can install and update gallery-dl from the latest official
  Codeberg release (the project moved there; GitHub releases no longer
  carry binaries). The binary is checked against SHA256SUMS, streamed
  with gallerydl-download-progress events, and stored in app_data/bin,
  where the existing lookup already finds it.
- macOS (and other platforms without an official standalone build)
  shows a copyable `brew install gallery-dl` / pip command and a
  re-check button instead.
- A system gallery-dl is still preferred when present.
- New error codes GALLERYDL_INSTALL_UNSUPPORTED and
  GALLERYDL_SYSTEM_MANAGED; GalleryDlStatus gains can_install.
- The Gallery page's "Open Dependencies" button now opens the
  Dependencies tab instead of General.
- i18n for all 13 locales, changelog entries, error code docs.

Closes #136

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T16:37:18.908619Z 581dba3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vanloctech
vanloctech merged commit 95db8dd into main Nov 12, 2026
4 checks passed
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.

希望能提供一个集成了gallery-dl的安装版,或者便携版。

1 participant