feat: add per-user moods as generated playlists
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 2s
CI / test (push) Successful in 1m41s
CI / image (push) Successful in 3m11s

Add private server-managed playlist moods with curated seeds and related
library fill. Moods are created or promoted from existing playlists in the
web UI, refresh lazily after their TTL, and are marked stale after a scan.

Symfonium stars pin the active mood: opening a mood restores its context,
and a starred song becomes a permanent seed. Without an active session the
song is pinned to every mood that already contains it.

Includes the V4 migration, custom mood endpoints, management UI, tests and
smoke coverage. Bump the chart to 0.1.4.
This commit is contained in:
TapTap committed 2026-11-14 12:52:25 +00:00
1 parent e08d993e35
commit 28bfdd9d00
25 files changed
+2039 -14

No files matched your search

@@ -30,6 +30,8 @@ import win.taptap.musicmanager.config.UsersConfig
import win.taptap.musicmanager.db.ConfigRepository
import win.taptap.musicmanager.db.DatabaseFactory
import win.taptap.musicmanager.db.MediaRepository
import win.taptap.musicmanager.db.MoodRepository
import win.taptap.musicmanager.mood.MoodService
import win.taptap.musicmanager.scanner.CoverArtService
import win.taptap.musicmanager.scanner.MediaScanner
import win.taptap.musicmanager.subsonic.respondSubsonicError
@@ -51,7 +53,12 @@ fun main() {
val applicationScope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
val coverArtService = CoverArtService(config.dataDir)
val transcoder = FfmpegTranscoder(config.ffmpegPath)
val scanner = MediaScanner(library, coverArtService)
val moodService = MoodService(applicationScope)
val scanner = MediaScanner(
library = library,
coverArtService = coverArtService,
onScanFinished = { MoodRepository.markAllStale() },
)
if (MediaRepository.countSongs() == 0L) {
log.info("Song table is empty, starting initial library scan")
scanner.start(applicationScope)
@@ -98,6 +105,7 @@ fun main() {
library = library,
coverArtService = coverArtService,
transcoder = transcoder,
moodService = moodService,
startScan = { scanner.start(applicationScope) },
scanStatus = { scanner.status() },
)