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
@@ -64,13 +64,14 @@ class MediaScanner(
|
||||
return@forEach
|
||||
}
|
||||
val relativePath = root.relativize(file).joinToString("/") { it.toString() }
|
||||
val videoId = mediaStore.videoIdFrom(relativePath)
|
||||
if (videoId == null) {
|
||||
log.debug("Skipping file outside a video folder: {}", file)
|
||||
val sourceAndId = mediaStore.sourceAndIdFromPath(relativePath)
|
||||
if (sourceAndId == null) {
|
||||
log.debug("Skipping file outside a media folder: {}", file)
|
||||
return@forEach
|
||||
}
|
||||
val (source, externalId) = sourceAndId
|
||||
try {
|
||||
val existing = SongRepository.byVideoId(videoId)
|
||||
val existing = SongRepository.byExternalId(source, externalId)
|
||||
val attributes = Files.readAttributes(
|
||||
file,
|
||||
BasicFileAttributes::class.java,
|
||||
@@ -85,7 +86,7 @@ class MediaScanner(
|
||||
return@forEach
|
||||
}
|
||||
|
||||
val song = indexer.index(videoId, file)
|
||||
val song = indexer.index(source, externalId, file)
|
||||
if (song == null) {
|
||||
if (existing != null) seenSongIds += existing.id
|
||||
log.warn("Could not read MP3 metadata: {}", file)
|
||||
@@ -95,7 +96,7 @@ class MediaScanner(
|
||||
count++
|
||||
status.set(ScanStatus(scanning = true, count = count))
|
||||
} catch (e: Exception) {
|
||||
SongRepository.byVideoId(videoId)?.let { seenSongIds += it.id }
|
||||
SongRepository.byExternalId(source, externalId)?.let { seenSongIds += it.id }
|
||||
log.warn("Could not index file: $file", e)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user