feat: optional YouTube Music source (cookies volume + wizard step)

Adds a step_youtube wizard prompt (enable + cookies host folder), the @YOUTUBE_VOLUME@ token in templates/compose/backend.yml substituted in compose_gen, a YOUTUBE_ENABLED/cookies env block, ensure_youtube_dir in lifecycle, en/ru strings, and a README step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Senko-san
2026-06-14 14:04:49 +03:00
parent 4108121984
commit 3a63ced4d4
8 changed files with 89 additions and 1 deletions
+13 -1
View File
@@ -36,6 +36,17 @@ ensure_media_dir() {
mkdir -p "$p"
}
ensure_youtube_dir() {
# YOUTUBE_COOKIES_HOST_PATH is only present when the YouTube source is
# enabled; create the folder so the bind mount has a real host directory
# (the user drops cookies.txt into it later).
local p
p="$(grep -E '^YOUTUBE_COOKIES_HOST_PATH=' "$ENV_FILE" | cut -d= -f2-)"
[[ -n "$p" ]] || return 0
[[ "$p" = /* ]] || p="${BOOTSTRAP_DIR}/${p#./}"
mkdir -p "$p"
}
lifecycle_pull() {
ui_info "$(t pull_images "$(grep -E '^MCMA_IMAGE_TAG=' "$ENV_FILE" | cut -d= -f2-)")"
ui_dim "$(t pull_hint)"
@@ -64,6 +75,7 @@ sys.exit(1)
lifecycle_start() {
local create_admin="${1:-no}"
ensure_media_dir
ensure_youtube_dir
lifecycle_pull
local deps; deps="$(backing_services)"
@@ -111,7 +123,7 @@ lifecycle_update() {
ui_ok "$(t done_title)"
}
lifecycle_up() { ensure_media_dir; dc up -d; }
lifecycle_up() { ensure_media_dir; ensure_youtube_dir; dc up -d; }
lifecycle_down() { dc down; }
lifecycle_logs() { dc logs -f --tail=100; }