musikr: simplify fixed extension stripping
This commit is contained in:
@@ -69,7 +69,7 @@ private class TagInterpreterImpl(private val interpretation: Interpretation) : T
|
|||||||
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
|
song.tags.name
|
||||||
?: requireNotNull(song.file.path.name).split('.').dropLast(1).joinToString(".")
|
?: requireNotNull(song.file.path.name).substringBeforeLast(".")
|
||||||
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()
|
||||||
|
|||||||
Reference in New Issue
Block a user