From 7b4af3515dee24294edfb034a389709e9ccca270 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Thu, 15 Jun 2023 19:11:31 -0600 Subject: [PATCH] music: prioritize earlier album artist info Prioritize artist information from earlier albums (date-wise), as it's less likely to change with the addition of new music. --- .../java/org/oxycblt/auxio/music/device/DeviceLibrary.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/device/DeviceLibrary.kt b/app/src/main/java/org/oxycblt/auxio/music/device/DeviceLibrary.kt index 45034582d..8032c46d7 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/device/DeviceLibrary.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/device/DeviceLibrary.kt @@ -218,13 +218,13 @@ class DeviceLibraryFactoryImpl @Inject constructor(private val musicSettings: Mu // Immediately replace any songs that initially held the priority position. is SongImpl -> body.raw = PrioritizedRaw(rawArtist, album) is AlbumImpl -> { - // Album information from later dates is prioritized, as it is more - // likely to contain the "modern" name of the artist if the information - // really is in-consistent. Fall back to the name otherwise. + // Album artist information from earlier dates is prioritized, as it is + // less likely to change with the addition of new tracks. Fall back to + // the name otherwise. val prioritize = album.dates != null && (prioritized.dates == null || - album.dates > prioritized.dates || + album.dates < prioritized.dates || (album.dates == prioritized.dates && album.name < prioritized.name))