feat: per-track loudness normalization and server audio info
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m6s
CI / chart-push (push) Successful in 3s
CI / image (push) Successful in 3m31s

- measure downloads with ffmpeg's EBU R128 filter and store gain/LUFS
- backfill the existing library one file at a time
- expose gain on songs and a /info endpoint for source quality
- chart knobs LOUDNESS_ENABLED and LOUDNESS_TARGET_LUFS
This commit is contained in:
TapTap committed 2026-11-19 16:38:21 +00:00
1 parent 6763a83b03
commit 91312faa1c
15 files changed
+387 -9

No files matched your search

@@ -37,6 +37,9 @@ fun Route.apiRoutes(
mediaStore: MediaStore,
gc: MediaGcService,
defaultSource: String,
deezerQuality: Int,
loudnessEnabled: Boolean,
loudnessTargetLufs: Double,
startScan: () -> Boolean,
scanStatus: () -> ScanStatus,
) {
@@ -77,6 +80,19 @@ fun Route.apiRoutes(
call.respond(user.toDto())
}
/** Source and audio settings the client cannot infer from a song. */
get("/info") {
call.requireApiUser(users)
call.respond(
ServerInfoDto(
defaultSource = defaultSource,
deezerQuality = deezerQuality,
loudnessEnabled = loudnessEnabled,
loudnessTargetLufs = loudnessTargetLufs,
),
)
}
post("/auth/logout") {
call.requireApiUser(users)
ApiTokenRepository.revokeRaw(call.bearerToken().orEmpty())