feat: add Deezer as the default download source
- V9 adds source/external_id to songs, moods, recommendations and jobs - Deezer public catalog for search, related album covers and metadata - streamrip downloader configured with DEEZER_ARL, 128/320 MP3 - per-mood source selector; switching clears and refills recommendations - keep YouTube Music as a full second catalog and downloader - media layout <source>-<externalId>, legacy YouTube folders still read - Docker/streamrip install, chart ARL secret, docs and dual-source smoke test
This commit is contained in:
1 parent
81a47f4cd2
commit
141698282d
43 files changed
+2072
-605
No files matched your search
@@ -16,6 +16,11 @@ class AppConfigTest {
|
||||
assertEquals(Path.of("./config/users.yaml"), config.usersFile)
|
||||
assertEquals("ffmpeg", config.ffmpegPath)
|
||||
assertEquals("yt-dlp", config.ytDlpPath)
|
||||
assertEquals("rip", config.streamripPath)
|
||||
assertEquals("deezer", config.defaultSource)
|
||||
assertEquals(null, config.deezerArl)
|
||||
assertEquals(0, config.deezerQuality)
|
||||
assertEquals("https://api.deezer.com", config.deezerApiBase)
|
||||
assertEquals(Path.of("./data/media"), config.mediaDir)
|
||||
assertEquals(Path.of("./data/downloads"), config.downloadDir)
|
||||
assertEquals(Path.of("./data/musicmanager.db"), config.databasePath)
|
||||
@@ -30,6 +35,11 @@ class AppConfigTest {
|
||||
"USERS_FILE" to "/run/secrets/users.yaml",
|
||||
"FFMPEG_PATH" to "/usr/bin/ffmpeg",
|
||||
"YTDLP_PATH" to "/usr/local/bin/yt-dlp",
|
||||
"STREAMRIP_PATH" to "/usr/local/bin/rip",
|
||||
"DEFAULT_SOURCE" to "youtube",
|
||||
"DEEZER_ARL" to "test-arl",
|
||||
"DEEZER_QUALITY" to "1",
|
||||
"DEEZER_API_BASE" to "http://deezer.test",
|
||||
"MEDIA_DIR" to "/mnt/media",
|
||||
"DOWNLOAD_DIR" to "/var/tmp/downloads",
|
||||
),
|
||||
@@ -40,10 +50,25 @@ class AppConfigTest {
|
||||
assertEquals(Path.of("/run/secrets/users.yaml"), config.usersFile)
|
||||
assertEquals("/usr/bin/ffmpeg", config.ffmpegPath)
|
||||
assertEquals("/usr/local/bin/yt-dlp", config.ytDlpPath)
|
||||
assertEquals("/usr/local/bin/rip", config.streamripPath)
|
||||
assertEquals("youtube", config.defaultSource)
|
||||
assertEquals("test-arl", config.deezerArl)
|
||||
assertEquals(1, config.deezerQuality)
|
||||
assertEquals("http://deezer.test", config.deezerApiBase)
|
||||
assertEquals(Path.of("/mnt/media"), config.mediaDir)
|
||||
assertEquals(Path.of("/var/tmp/downloads"), config.downloadDir)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `rejects unknown sources and qualities`() {
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
AppConfig.fromEnv(mapOf("DEFAULT_SOURCE" to "spotify"))
|
||||
}
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
AppConfig.fromEnv(mapOf("DEEZER_QUALITY" to "2"))
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `rejects a malformed port`() {
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
|
||||
Reference in new issue
Block a user