Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.6.1 #886

Merged
merged 5 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<h1 align="center"><b>Auxio</b></h1>
<h4 align="center">A simple, rational music player for android.</h4>
<p align="center">
<a href="https://github.com/oxygencobalt/Auxio/releases/tag/v3.6.0">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v3.6.0&color=64B5F6&style=flat">
<a href="https://github.com/oxygencobalt/Auxio/releases/tag/v3.6.1">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v3.6.1&color=64B5F6&style=flat">
</a>
<a href="https://github.com/oxygencobalt/Auxio/releases/">
<img alt="Releases" src="https://img.shields.io/github/downloads/OxygenCobalt/Auxio/total.svg?color=4B95DE&style=flat">
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ android {

defaultConfig {
applicationId namespace
versionName "3.6.0"
versionCode 50
versionName "3.6.1"
versionCode 51

minSdk 24
targetSdk 34
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/oxycblt/auxio/AuxioService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
13 changes: 9 additions & 4 deletions app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -522,12 +524,13 @@ constructor(
}
}

private fun <T : MusicParent> refreshDetail(
private inline fun <T : MusicParent> refreshDetail(
detail: Detail<T>?,
parent: MutableStateFlow<T?>,
list: MutableStateFlow<List<Item>>,
instructions: MutableEvent<UpdateInstructions>,
replace: Int?
replace: Int?,
songHeader: (Int) -> Header = { SortHeader(it) }
) {
if (detail == null) {
parent.value = null
Expand All @@ -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)
Expand Down Expand Up @@ -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<Item>()
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/org/oxycblt/auxio/music/service/Indexer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/51.txt
Original file line number Diff line number Diff line change
@@ -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.
Loading