feat: add browsing and media endpoints

- user-scoped getMusicFolders, getIndexes, getArtists, getArtist,
  getAlbum and getSong
- search3 with pagination, literal matching and empty/wildcard queries
- stream and download with Range support and RFC 5987 filenames
- getCoverArt with cached size variants and visibility checks
- V2 migration for per-user album and artist ratings
This commit is contained in:
TapTap committed 2026-11-13 11:53:57 +00:00
1 parent 1f73d901d5
commit 643ee42f09
14 files changed
+1364 -4

No files matched your search

@@ -46,7 +46,8 @@ fun main() {
ConfigRepository.sync(library, users)
val applicationScope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
val scanner = MediaScanner(library, CoverArtService(config.dataDir))
val coverArtService = CoverArtService(config.dataDir)
val scanner = MediaScanner(library, coverArtService)
if (MediaRepository.countSongs() == 0L) {
log.info("Song table is empty, starting initial library scan")
scanner.start(applicationScope)
@@ -80,6 +81,8 @@ fun main() {
get("/health") { call.respondText("ok") }
subsonicRoutes(
users = users,
library = library,
coverArtService = coverArtService,
startScan = { scanner.start(applicationScope) },
scanStatus = { scanner.status() },
)