music: fix incorrect hashing

Forgot a + hashCode in like half of the hashing statements, ended up
causing incorrect image cache hits.
This commit is contained in:
Alexander Capehart 2023-10-16 20:28:29 -06:00
parent 73ef51c8be
commit 4eacb65aff
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -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()
}