musikr: fix build issues

This commit is contained in:
Alexander Capehart 2025-02-25 16:00:18 -07:00
parent 10eb0be7d0
commit be270a422b
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 6 additions and 4 deletions

View file

@ -87,7 +87,8 @@ private class DeviceFilesImpl(private val contentResolver: ContentResolver) : De
if (mimeType == DocumentsContract.Document.MIME_TYPE_DIR) { if (mimeType == DocumentsContract.Document.MIME_TYPE_DIR) {
// This does NOT block the current coroutine. Instead, we will // This does NOT block the current coroutine. Instead, we will
// evaluate this flow in parallel later to maximize throughput. // evaluate this flow in parallel later to maximize throughput.
recursive.add(exploreImpl(contentResolver, rootUri, childId, newPath, ignoreHidden)) recursive.add(
exploreImpl(contentResolver, rootUri, childId, newPath, ignoreHidden))
} else if (mimeType.startsWith("audio/") && mimeType != "audio/x-mpegurl") { } else if (mimeType.startsWith("audio/") && mimeType != "audio/x-mpegurl") {
// Immediately emit all files given that it's just an O(1) op. // Immediately emit all files given that it's just an O(1) op.
// This also just makes sure the outer flow has a reason to exist // This also just makes sure the outer flow has a reason to exist

View file

@ -68,7 +68,8 @@ private class TagInterpreterImpl(private val interpretation: Interpretation) : T
val songNameOrFileWithoutExt = val songNameOrFileWithoutExt =
song.tags.name ?: requireNotNull(song.file.path.name).split('.').first() song.tags.name ?: requireNotNull(song.file.path.name).split('.').first()
val songNameOrFileWithoutExtCorrect = val songNameOrFileWithoutExtCorrect =
song.tags.name ?: requireNotNull(song.file.path.name).split('.').dropLast(1).joinToString('.') song.tags.name
?: requireNotNull(song.file.path.name).split('.').dropLast(1).joinToString(".")
val albumNameOrDir = song.tags.albumName ?: song.file.path.directory.name val albumNameOrDir = song.tags.albumName ?: song.file.path.directory.name
val musicBrainzId = song.tags.musicBrainzId?.toUuidOrNull() val musicBrainzId = song.tags.musicBrainzId?.toUuidOrNull()