diff --git a/CHANGELOG.md b/CHANGELOG.md index 699da229b..37d5300c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 3.6.1 + +#### What's Fixed +- Fixed possible crash from poor service initalization +- Fixed issue where it was impossible to edit playlists +- Fixed issue where playlist would revert to older version when re-edited + +#### Dev/Meta +- Fixed service memory leaks + ## 3.6.0 #### What's New diff --git a/README.md b/README.md index 68a4139fe..b5373da18 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 2cd8a66fe..5c622439b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { defaultConfig { applicationId namespace - versionName "3.6.0" - versionCode 50 + versionName "3.6.1" + versionCode 51 minSdk 24 targetSdk 34 diff --git a/app/src/main/java/org/oxycblt/auxio/AuxioService.kt b/app/src/main/java/org/oxycblt/auxio/AuxioService.kt index da79b8a11..126a65a8c 100644 --- a/app/src/main/java/org/oxycblt/auxio/AuxioService.kt +++ b/app/src/main/java/org/oxycblt/auxio/AuxioService.kt @@ -51,8 +51,8 @@ class AuxioService : override fun onCreate() { super.onCreate() playbackFragment = playbackFragmentFactory.create(this, this) - sessionToken = playbackFragment.attach() musicFragment = musicFragmentFactory.create(this, this, this) + sessionToken = playbackFragment.attach() musicFragment.attach() } diff --git a/app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt b/app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt index 285a21d6f..1a999ef49 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt @@ -34,6 +34,7 @@ import org.oxycblt.auxio.detail.list.EditHeader import org.oxycblt.auxio.detail.list.SortHeader import org.oxycblt.auxio.list.BasicHeader import org.oxycblt.auxio.list.Divider +import org.oxycblt.auxio.list.Header import org.oxycblt.auxio.list.Item import org.oxycblt.auxio.list.ListSettings import org.oxycblt.auxio.list.adapter.UpdateInstructions @@ -430,6 +431,7 @@ constructor( // TODO: The user could probably press some kind of button if they were fast enough. // Think of a better way to handle this state. _editedPlaylist.value = null + refreshPlaylist(playlist.uid) } } @@ -522,12 +524,13 @@ constructor( } } - private fun refreshDetail( + private inline fun refreshDetail( detail: Detail?, parent: MutableStateFlow, list: MutableStateFlow>, instructions: MutableEvent, - replace: Int? + replace: Int?, + songHeader: (Int) -> Header = { SortHeader(it) } ) { if (detail == null) { parent.value = null @@ -540,7 +543,7 @@ constructor( when (section) { is DetailSection.PlainSection<*> -> { val header = - if (section is DetailSection.Songs) SortHeader(section.stringRes) + if (section is DetailSection.Songs) songHeader(section.stringRes) else BasicHeader(section.stringRes) newList.add(Divider(header)) newList.add(header) @@ -575,7 +578,9 @@ constructor( if (edited == null) { val playlist = detailGenerator.playlist(uid) refreshDetail( - playlist, _currentPlaylist, _playlistSongList, _playlistSongInstructions, null) + playlist, _currentPlaylist, _playlistSongList, _playlistSongInstructions, null) { + EditHeader(it) + } return } val list = mutableListOf() diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/Indexer.kt b/app/src/main/java/org/oxycblt/auxio/music/service/Indexer.kt index 6b3dfb29f..abc9eeaaf 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/Indexer.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/Indexer.kt @@ -90,10 +90,10 @@ private constructor( fun release() { contentObserver.release() - musicSettings.registerListener(this) - musicRepository.addIndexingListener(this) - musicRepository.addUpdateListener(this) + musicRepository.unregisterWorker(this) musicRepository.removeIndexingListener(this) + musicRepository.removeUpdateListener(this) + musicSettings.unregisterListener(this) } override fun requestIndex(withCache: Boolean) { diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionHolder.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionHolder.kt index b5724f6b4..dc33ca4ab 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionHolder.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionHolder.kt @@ -113,9 +113,9 @@ private constructor( */ fun release() { bitmapProvider.release() + playbackManager.removeListener(this) playbackSettings.unregisterListener(this) imageSettings.unregisterListener(this) - playbackManager.removeListener(this) mediaSession.apply { isActive = false release() diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/PlaybackServiceFragment.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/PlaybackServiceFragment.kt index 04af2a40f..26ce16237 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/PlaybackServiceFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/PlaybackServiceFragment.kt @@ -107,11 +107,11 @@ private constructor( fun release() { waitJob.cancel() + playbackManager.removeListener(this) + systemReceiver.release() widgetComponent.release() - context.unregisterReceiver(systemReceiver) sessionHolder.release() exoHolder.release() - playbackManager.removeListener(this) } override fun onSessionEnded() { diff --git a/fastlane/metadata/android/en-US/changelogs/51.txt b/fastlane/metadata/android/en-US/changelogs/51.txt new file mode 100644 index 000000000..131fed628 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/51.txt @@ -0,0 +1,3 @@ +Auxio 3.6.0 improves support for android auto and fixes several small regressions. +This release fixes critical 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