music: check compilation flag value
Only map compilation flags if the value is "1".
This commit is contained in:
@@ -159,7 +159,8 @@ private constructor(private val rawSong: RawSong, private val future: Future<Tra
|
||||
textFrames["TCON"]?.let { rawSong.genreNames = it }
|
||||
|
||||
// Compilation Flag
|
||||
(textFrames["TXXX:compilation"] ?: textFrames["TXXX:itunescompilation"])?.let {
|
||||
(textFrames["TCMP"] ?: textFrames["TXXX:compilation"] ?: textFrames["TXXX:itunescompilation"])?.let {
|
||||
if (it.size != 1 || it[0] != "1") return@let
|
||||
rawSong.albumArtistNames = rawSong.albumArtistNames.ifEmpty { COMPILATION_ALBUM_ARTISTS }
|
||||
rawSong.releaseTypes = rawSong.releaseTypes.ifEmpty { COMPILATION_RELEASE_TYPES }
|
||||
}
|
||||
@@ -266,6 +267,7 @@ private constructor(private val rawSong: RawSong, private val future: Future<Tra
|
||||
|
||||
// Compilation Flag
|
||||
(comments["compilation"] ?: comments["itunescompilation"])?.let {
|
||||
if (it.size != 1 || it[0] != "1") return@let
|
||||
rawSong.albumArtistNames = rawSong.albumArtistNames.ifEmpty { COMPILATION_ALBUM_ARTISTS }
|
||||
rawSong.releaseTypes = rawSong.releaseTypes.ifEmpty { COMPILATION_RELEASE_TYPES }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user