From 4eacb65aff74f5dd39efccbe028bc4913ccebc86 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Mon, 16 Oct 2023 20:28:29 -0600 Subject: [PATCH] music: fix incorrect hashing Forgot a + hashCode in like half of the hashing statements, ended up causing incorrect image cache hits. --- .../org/oxycblt/auxio/music/device/DeviceMusicImpl.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/device/DeviceMusicImpl.kt b/app/src/main/java/org/oxycblt/auxio/music/device/DeviceMusicImpl.kt index d9f381ec9..500711d42 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/device/DeviceMusicImpl.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/device/DeviceMusicImpl.kt @@ -182,8 +182,8 @@ class SongImpl( .toList() .ifEmpty { listOf(RawGenre()) } - hashCode = 31 * rawSong.hashCode() - hashCode = 31 * nameFactory.hashCode() + hashCode = 31 * hashCode + rawSong.hashCode() + hashCode = 31 * hashCode + nameFactory.hashCode() } override fun hashCode() = hashCode @@ -332,7 +332,7 @@ class AlbumImpl( dateAdded = earliestDateAdded hashCode = 31 * hashCode + rawAlbum.hashCode() - hashCode = 31 * nameFactory.hashCode() + hashCode = 31 * hashCode + nameFactory.hashCode() hashCode = 31 * hashCode + songs.hashCode() } @@ -529,7 +529,7 @@ class GenreImpl( durationMs = totalDuration hashCode = 31 * hashCode + rawGenre.hashCode() - hashCode = 31 * nameFactory.hashCode() + hashCode = 31 * hashCode + nameFactory.hashCode() hashCode = 31 * hashCode + songs.hashCode() }