feat: rebuild AudioManager around downloadable moods
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m2s
CI / chart-push (push) Successful in 4s
CI / image (push) Successful in 3m20s

- V8 wipe migration and the shared song store keyed by YouTube video id
- media store, indexer, downloader, recommendation top-up and refcounted GC
- mood songs plus the recommendation lifecycle and mixed radio pools
- new search, song and recommendation API; remove library/longform/seed routes
- chart PVC/media env, docs, Nix, README and an end-to-end smoke test
This commit is contained in:
TapTap committed 2026-11-15 21:37:39 +00:00
1 parent 50d8b6c580
commit 824eb36dd2
59 files changed
+3838 -5276

No files matched your search

+1 -1
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: audiomanager
description: Mood-first self-hosted music server
type: application
version: 0.2.4
version: 0.3.0
appVersion: "0.1.0"
@@ -1,17 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "audiomanager.fullname" . }}-library
namespace: {{ include "audiomanager.namespace" . }}
labels:
{{- include "audiomanager.labels" . | nindent 4 }}
data:
library.yaml: |
library:
folders:
{{- range .Values.library.folders }}
- id: {{ .id }}
name: {{ .name | quote }}
type: {{ .type }}
path: {{ .path | quote }}
{{- end }}
+4 -52
View File
@@ -16,8 +16,6 @@ spec:
metadata:
labels:
{{- include "audiomanager.selectorLabels" . | nindent 8 }}
annotations:
checksum/library: {{ include (print $.Template.BasePath "/configmap-library.yaml") . | sha256sum }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
@@ -25,26 +23,6 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if and .Values.downloads.enabled .Values.downloads.prepare }}
initContainers:
- name: prepare-imports
image: "{{ include "audiomanager.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- sh
- -c
- |
dir='{{ .Values.media.music.mountPath }}/AudioManager Imports'
mkdir -p "$dir" \
&& chown -R 10001:10001 "$dir" \
&& chmod -R u+rwX,g+rwX "$dir" \
|| echo "AudioManager: cannot prepare $dir; check the music hostPath permissions"
securityContext:
runAsUser: 0
volumeMounts:
- name: music
mountPath: {{ .Values.media.music.mountPath }}
{{- end }}
containers:
- name: audiomanager
image: "{{ include "audiomanager.image" . }}"
@@ -56,22 +34,16 @@ spec:
value: "8080"
- name: DATA_DIR
value: /data
- name: LIBRARY_CONFIG
value: /etc/audiomanager/library.yaml
- name: MEDIA_DIR
value: /data/media
- name: DOWNLOAD_DIR
value: /data/downloads
- name: USERS_FILE
value: /etc/audiomanager/users.yaml
- name: FFMPEG_PATH
value: ffmpeg
- name: YTDLP_PATH
value: yt-dlp
- name: DOWNLOADS_ENABLED
value: {{ .Values.downloads.enabled | quote }}
- name: DOWNLOAD_DIR
value: /data/downloads
{{- with .Values.downloads.folderId }}
- name: DOWNLOAD_FOLDER_ID
value: {{ . | quote }}
{{- end }}
{{- with .Values.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
@@ -93,10 +65,6 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: library
mountPath: /etc/audiomanager/library.yaml
subPath: library.yaml
readOnly: true
- name: users
mountPath: /etc/audiomanager/users.yaml
subPath: {{ .Values.users.key }}
@@ -105,15 +73,7 @@ spec:
mountPath: /data
- name: tmp
mountPath: /tmp
- name: music
mountPath: {{ .Values.media.music.mountPath }}
- name: longform
mountPath: {{ .Values.media.longform.mountPath }}
readOnly: true
volumes:
- name: library
configMap:
name: {{ include "audiomanager.fullname" . }}-library
- name: users
secret:
secretName: {{ required "users.existingSecret is required" .Values.users.existingSecret }}
@@ -126,14 +86,6 @@ spec:
{{- end }}
- name: tmp
emptyDir: {}
- name: music
hostPath:
path: {{ .Values.media.music.hostPath }}
type: Directory
- name: longform
hostPath:
path: {{ .Values.media.longform.hostPath }}
type: Directory
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
+5 -36
View File
@@ -15,52 +15,21 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
# Rendered into a ConfigMap as /etc/audiomanager/library.yaml.
# Keep folder IDs stable: they are part of song IDs.
library:
folders:
- id: 1
name: "Music"
type: music
path: /mnt/media/music
- id: 10
name: "Audiobooks & Podcasts"
type: longform
path: /mnt/media/longform
# Vault-managed users.yaml. The secret must already exist and contain the key below.
users:
existingSecret: audiomanager-users
key: users.yaml
# The media root, database, cover cache and download temp dir all live here.
data:
persistence:
enabled: true
size: 5Gi
# Songs are downloaded automatically, so plan for growth.
size: 20Gi
storageClass: ""
accessModes:
- ReadWriteOnce
# Automatic downloads for accepted recommendations. Files land in
# "<music>/AudioManager Imports" and are picked up by a scan, so the music
# hostPath must be writable by the pod.
downloads:
enabled: true
# Runs a root init container that creates "<music>/AudioManager Imports" and
# gives it to UID 10001. Disable only if the hostPath is already writable.
prepare: true
# Empty uses the first music folder visible to the user.
folderId: null
# hostPath mounts shared by every schedulable node.
media:
music:
hostPath: /mnt/media/music
mountPath: /mnt/media/music
longform:
hostPath: /mnt/media/longform
mountPath: /mnt/media/longform
service:
type: ClusterIP
port: 8080
@@ -82,8 +51,8 @@ resources:
cpu: 100m
memory: 256Mi
limits:
cpu: 1000m
memory: 512Mi
cpu: 2000m
memory: 1024Mi
podSecurityContext:
fsGroup: 10001