From 64fbd0acbf89c70089ab327616458ab160e3fea3 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Mon, 21 Oct 2024 09:35:54 -0600 Subject: [PATCH 1/5] home: re-add removed hcollaborator hiding --- .../java/org/oxycblt/auxio/home/HomeGenerator.kt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/home/HomeGenerator.kt b/app/src/main/java/org/oxycblt/auxio/home/HomeGenerator.kt index 52135d3d4..e8b9c5451 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/HomeGenerator.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/HomeGenerator.kt @@ -87,10 +87,7 @@ private class HomeGeneratorImpl( } override fun onHideCollaboratorsChanged() { - // Changes in the hide collaborator setting will change the artist contents - // of the library, consider it a library update. - logD("Collaborator setting changed, forwarding update") - onMusicChanges(MusicRepository.Changes(deviceLibrary = true, userLibrary = false)) + invalidator.invalidateMusic(MusicType.ARTISTS, UpdateInstructions.Diff) } override fun onSongSortChanged() { @@ -151,7 +148,14 @@ private class HomeGeneratorImpl( ?: emptyList() override fun artists() = - musicRepository.deviceLibrary?.let { listSettings.artistSort.artists(it.artists) } + musicRepository.deviceLibrary?.let { deviceLibrary -> + val sorted = listSettings.artistSort.artists(deviceLibrary.artists) + if (homeSettings.shouldHideCollaborators) { + sorted.filter { it.explicitAlbums.isNotEmpty() } + } else { + sorted + } + } ?: emptyList() override fun genres() = From 147f7f426c0196b75d9aaa0ac575439eddfd877e Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Mon, 21 Oct 2024 09:41:51 -0600 Subject: [PATCH 2/5] detail: fix crash on artists w/appearances --- .../main/java/org/oxycblt/auxio/detail/DetailGenerator.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt b/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt index 348badcdb..f999b3e53 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt @@ -156,13 +156,9 @@ private class DetailGeneratorImpl( } if (artist.implicitAlbums.isNotEmpty()) { - // groupByTo normally returns a mapping to a MutableList mapping. Since MutableList - // inherits list, we can cast upwards and save a copy by directly inserting the - // implicit album list into the mapping. logD("Implicit albums present, adding to list") - @Suppress("UNCHECKED_CAST") - (grouping as MutableMap>)[ - DetailSection.Albums.Category.APPEARANCES] = artist.implicitAlbums + grouping[DetailSection.Albums.Category.APPEARANCES] = + artist.implicitAlbums.toMutableList() } val sections = From 47fa41715d62b4782a83bfc560351ea010c06cd8 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Mon, 21 Oct 2024 09:42:00 -0600 Subject: [PATCH 3/5] detail: fix empty sections having headers --- .../org/oxycblt/auxio/detail/DetailGenerator.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt b/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt index f999b3e53..1f1670957 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt @@ -165,8 +165,10 @@ private class DetailGeneratorImpl( grouping.mapTo(mutableListOf()) { (category, albums) -> DetailSection.Albums(category, ARTIST_ALBUM_SORT.albums(albums)) } - val songs = DetailSection.Songs(listSettings.artistSongSort.songs(artist.songs)) - sections.add(songs) + if (artist.songs.isNotEmpty()) { + val songs = DetailSection.Songs(listSettings.artistSongSort.songs(artist.songs)) + sections.add(songs) + } return Detail(artist, sections) } @@ -179,8 +181,11 @@ private class DetailGeneratorImpl( override fun playlist(uid: Music.UID): Detail? { val playlist = musicRepository.userLibrary?.findPlaylist(uid) ?: return null - val songs = DetailSection.Songs(playlist.songs) - return Detail(playlist, listOf(songs)) + if (playlist.songs.isNotEmpty()) { + val songs = DetailSection.Songs(playlist.songs) + return Detail(playlist, listOf(songs)) + } + return Detail(playlist, listOf()) } private companion object { From b0af681390957584c66629bbb415136761dd54a7 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Mon, 21 Oct 2024 09:46:43 -0600 Subject: [PATCH 4/5] playback: fix broken stateholder lifecycle - Broken ReplayGain setup - Wasn't releasing playback settings --- .../auxio/playback/service/ExoPlaybackStateHolder.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/ExoPlaybackStateHolder.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/ExoPlaybackStateHolder.kt index 2947052c2..95dd0ae73 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/ExoPlaybackStateHolder.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/ExoPlaybackStateHolder.kt @@ -88,20 +88,22 @@ class ExoPlaybackStateHolder( private set fun attach() { - imageSettings.registerListener(this) - player.addListener(this) playbackManager.registerStateHolder(this) - playbackSettings.registerListener(this) musicRepository.addUpdateListener(this) + player.addListener(this) + replayGainProcessor.attach() + playbackSettings.registerListener(this) + imageSettings.registerListener(this) } fun release() { saveJob.cancel() - player.removeListener(this) playbackManager.unregisterStateHolder(this) musicRepository.removeUpdateListener(this) + player.removeListener(this) replayGainProcessor.release() imageSettings.unregisterListener(this) + playbackSettings.unregisterListener(this) player.release() } From 5751725e8ec1e588148ee0001dfe092e5f52b66b Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Mon, 21 Oct 2024 10:24:39 -0600 Subject: [PATCH 5/5] build: bump to 3.6.3 --- CHANGELOG.md | 8 ++++++++ README.md | 4 ++-- app/build.gradle | 4 ++-- fastlane/metadata/android/en-US/changelogs/53.txt | 3 +++ 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/53.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eba3282f..8901e55c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.6.3 + +#### What's Fixed +- Fixed broken replaygain +- Fixed hide collaborators being broken +- Fixed crash when navigating to artists w/appearances +- Fixed headers appearing on empty detail sections + ## 3.6.2 #### What's Fixed diff --git a/README.md b/README.md index 3fe6cd628..3e99eeb61 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@

Auxio

A simple, rational music player for android.

- - Latest Version + + Latest Version Releases diff --git a/app/build.gradle b/app/build.gradle index f5dbf1b1f..66642458e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { defaultConfig { applicationId namespace - versionName "3.6.2" - versionCode 52 + versionName "3.6.3" + versionCode 53 minSdk 24 targetSdk 34 diff --git a/fastlane/metadata/android/en-US/changelogs/53.txt b/fastlane/metadata/android/en-US/changelogs/53.txt new file mode 100644 index 000000000..e4ffd070e --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/53.txt @@ -0,0 +1,3 @@ +Auxio 3.6.0 improves support for android auto and fixes several small regressions. +This release fixes critical UI and playback issues identified in the previous version. +For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v3.6.0. \ No newline at end of file