From 99c88e7e284235f77386aa4461e95bf269963034 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 31 Aug 2025 20:52:41 +0200 Subject: [PATCH] Download lives playlist --- charts/meelo/ytdlp/deploy.yaml | 7 +++++++ charts/meelo/ytdlp/secret.yaml | 3 +++ charts/meelo/ytdlp/ytdlp-sync.sh | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/charts/meelo/ytdlp/deploy.yaml b/charts/meelo/ytdlp/deploy.yaml index 390834c..054ff9e 100644 --- a/charts/meelo/ytdlp/deploy.yaml +++ b/charts/meelo/ytdlp/deploy.yaml @@ -19,11 +19,18 @@ spec: env: - name: OUT value: /musics + - name: LIVES_OUT + value: /musics/lives - name: URL valueFrom: secretKeyRef: name: ytdlp key: url + - name: LIVES_URL + valueFrom: + secretKeyRef: + name: ytdlp + key: livesUrl volumeMounts: - name: scripts mountPath: /app diff --git a/charts/meelo/ytdlp/secret.yaml b/charts/meelo/ytdlp/secret.yaml index f242ae2..b90711f 100644 --- a/charts/meelo/ytdlp/secret.yaml +++ b/charts/meelo/ytdlp/secret.yaml @@ -11,6 +11,9 @@ spec: - secretKey: url remoteRef: key: yt-playlist + - secretKey: livesUrl + remoteRef: + key: yt-live-playlist - secretKey: cookies remoteRef: key: yt-cookies diff --git a/charts/meelo/ytdlp/ytdlp-sync.sh b/charts/meelo/ytdlp/ytdlp-sync.sh index f6fcf5b..8186806 100644 --- a/charts/meelo/ytdlp/ytdlp-sync.sh +++ b/charts/meelo/ytdlp/ytdlp-sync.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash while true; do + yt-dlp "$LIVES_URL" -o "$LIVES_OUT/%(title)s.%(ext)s" \ + --embed-thumbnail --embed-metadata --embed-chapters \ + --download-archive "$LIVES_OUT/ytdlp-archive.txt" \ + --cookies /app/secrets/cookies.txt \ + --cache-dir "$(pwd)" + yt-dlp "$URL" -o "$OUT/%(artist)s - %(title)s.%(ext)s" \ --extract-audio \ --embed-thumbnail --embed-metadata --embed-chapters \