Skip to content

Commit

Permalink
Merge pull request #899 from OxygenCobalt/hotfixes
Browse files Browse the repository at this point in the history
v3.6.3
  • Loading branch information
OxygenCobalt authored Oct 21, 2024
2 parents 03be2ef + 5751725 commit bfeae6a
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 23 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
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.2">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v3.6.2&color=64B5F6&style=flat">
<a href="https://github.com/oxygencobalt/Auxio/releases/tag/v3.6.3">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v3.6.3&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.2"
versionCode 52
versionName "3.6.3"
versionCode 53

minSdk 24
targetSdk 34
Expand Down
21 changes: 11 additions & 10 deletions app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,19 @@ 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, Collection<Album>>)[
DetailSection.Albums.Category.APPEARANCES] = artist.implicitAlbums
grouping[DetailSection.Albums.Category.APPEARANCES] =
artist.implicitAlbums.toMutableList()
}

val sections =
grouping.mapTo(mutableListOf<DetailSection>()) { (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)
}

Expand All @@ -183,8 +181,11 @@ private class DetailGeneratorImpl(

override fun playlist(uid: Music.UID): Detail<Playlist>? {
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 {
Expand Down
14 changes: 9 additions & 5 deletions app/src/main/java/org/oxycblt/auxio/home/HomeGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/53.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 UI and playback issues identified in the previous version.
For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v3.6.0.

0 comments on commit bfeae6a

Please sign in to comment.