mirror of
https://github.com/zoriya/snow.git
synced 2025-12-05 23:06:23 +00:00
Fix ytdlp
This commit is contained in:
@@ -39,3 +39,17 @@ spec:
|
||||
shared: "yes"
|
||||
status:
|
||||
state: Ready
|
||||
---
|
||||
apiVersion: zfs.openebs.io/v1
|
||||
kind: ZFSVolume
|
||||
metadata:
|
||||
name: musics
|
||||
spec:
|
||||
capacity: 16Ti
|
||||
fsType: zfs
|
||||
ownerNodeID: kadan
|
||||
poolName: ocean
|
||||
volumeType: DATASET
|
||||
shared: "yes"
|
||||
status:
|
||||
state: Ready
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: smartrss
|
||||
name: yt-dlp
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
@@ -12,27 +12,38 @@ spec:
|
||||
runAsNonRoot: true
|
||||
fsGroupChangePolicy: OnRootMismatch
|
||||
containers:
|
||||
- name: smartrss
|
||||
- name: ytdlp
|
||||
image: nixery.dev/shell/yt-dlp
|
||||
workingDir: /work
|
||||
command: [/app/ytdlp-sync.sh]
|
||||
env:
|
||||
- name: OUT
|
||||
value: /musics
|
||||
- name: URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: yt-playlist
|
||||
name: ytdlp
|
||||
key: url
|
||||
volumeMounts:
|
||||
- name: scripts
|
||||
mountPath: /app
|
||||
readOnly: true
|
||||
- name: cookies
|
||||
mountPath: /app/secrets
|
||||
- name: work
|
||||
mountPath: /work
|
||||
- name: musics
|
||||
mountPath: /musics
|
||||
volumes:
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: scripts
|
||||
name: sync-scripts
|
||||
defaultMode: 0555
|
||||
- name: musics
|
||||
persistentVolumeClaim:
|
||||
claimName: musics
|
||||
|
||||
- name: work
|
||||
emptyDir: {}
|
||||
- name: cookies
|
||||
secret:
|
||||
secretName: ytdlp
|
||||
|
||||
@@ -7,7 +7,7 @@ labels:
|
||||
app.kubernetes.io/component: ytdlp
|
||||
|
||||
configMapGenerator:
|
||||
- name: scripts
|
||||
- name: sync-scripts
|
||||
files:
|
||||
- ./ytdlp-sync.sh
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: yt-playlist
|
||||
name: ytdlp
|
||||
spec:
|
||||
refreshInterval: 24h
|
||||
secretStoreRef:
|
||||
@@ -11,3 +11,6 @@ spec:
|
||||
- secretKey: url
|
||||
remoteRef:
|
||||
key: yt-playlist
|
||||
- secretKey: cookies
|
||||
remoteRef:
|
||||
key: yt-cookies
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/usr/bien/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
while true; do
|
||||
yt-dlp "$URL" -o "$OUT/%(artist)s - %(title)s.%(ext)s" \
|
||||
--extract-audio \
|
||||
--embed-thumbnail --embed-metadata --embed-chapters \
|
||||
--download-archive "$OUT/ytdlp-archive.txt"
|
||||
--download-archive "$OUT/ytdlp-archive.txt" \
|
||||
--cookies /app/secrets/cookies.txt \
|
||||
--cache-dir "$(pwd)"
|
||||
sleep 6h
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user