Fixing bug when preference is not set
This commit is contained in:
parent
991c4ee36e
commit
5d1a75bc13
1 changed files with 4 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
|||
package code.name.monkey.retromusic.model
|
||||
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import java.util.*
|
||||
|
||||
data class Artist(
|
||||
|
@ -25,10 +26,11 @@ data class Artist(
|
|||
val name: String
|
||||
get() {
|
||||
val name = safeGetFirstAlbum().safeGetFirstSong().albumArtist
|
||||
if (PreferenceUtil.albumArtistsOnly && MusicUtil.isVariousArtists(name)) {
|
||||
return VARIOUS_ARTISTS_DISPLAY_NAME
|
||||
}
|
||||
return if (MusicUtil.isArtistNameUnknown(name)) {
|
||||
UNKNOWN_ARTIST_DISPLAY_NAME
|
||||
} else if (MusicUtil.isVariousArtists(name)) {
|
||||
VARIOUS_ARTISTS_DISPLAY_NAME
|
||||
} else safeGetFirstAlbum().safeGetFirstSong().artistName
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue