diff --git a/CHANGELOG.md b/CHANGELOG.md index fe1cf5c52..7b0d3bb16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ at the cost of longer loading times - Fixed shuffle shortcut and file opening not working on startup on some devices #### What's Changed +- Play and skip icons are filled again - Updated music hashing (Will wipe playback state) ## 2.5.0 diff --git a/app/src/main/java/org/oxycblt/auxio/music/Music.kt b/app/src/main/java/org/oxycblt/auxio/music/Music.kt index f11a563ac..a5c4a7d04 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/Music.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/Music.kt @@ -110,9 +110,9 @@ data class Song( ) : Music() { override val id: Long get() { - var result = rawName.hashCode().toLong() - result = 31 * result + album.rawName.hashCode() - result = 31 * result + (album.artist.rawName ?: MediaStore.UNKNOWN_STRING).hashCode() + var result = rawName.lowercase().hashCode().toLong() + result = 31 * result + album.rawName.lowercase().hashCode() + result = 31 * result + (album.artist.rawName?.lowercase() ?: MediaStore.UNKNOWN_STRING).hashCode() result = 31 * result + (track ?: 0) result = 31 * result + (disc ?: 0) result = 31 * result + durationMs @@ -218,8 +218,8 @@ data class Album( override val id: Long get() { - var result = rawName.hashCode().toLong() - result = 31 * result + (artist.rawName ?: MediaStore.UNKNOWN_STRING).hashCode() + var result = rawName.lowercase().hashCode().toLong() + result = 31 * result + (artist.rawName?.lowercase() ?: MediaStore.UNKNOWN_STRING).hashCode() result = 31 * result + (date?.year ?: 0) return result } @@ -262,7 +262,7 @@ data class Artist( } override val id: Long - get() = (rawName ?: MediaStore.UNKNOWN_STRING).hashCode().toLong() + get() = (rawName?.lowercase() ?: MediaStore.UNKNOWN_STRING).hashCode().toLong() override fun resolveName(context: Context) = rawName ?: context.getString(R.string.def_artist) @@ -283,7 +283,7 @@ data class Genre(override val rawName: String?, override val songs: List) get() = rawName override val id: Long - get() = (rawName ?: MediaStore.UNKNOWN_STRING).hashCode().toLong() + get() = (rawName?.lowercase() ?: MediaStore.UNKNOWN_STRING).hashCode().toLong() override fun resolveName(context: Context) = rawName ?: context.getString(R.string.def_genre) }