Merge branch 'master' into dev

This commit is contained in:
Alexander Capehart 2024-10-23 08:55:45 -06:00
commit 0ed7938be9
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
7 changed files with 41 additions and 20 deletions

View file

@ -20,6 +20,14 @@
#### Dev/Meta #### Dev/Meta
- No longer using custom logging setup - No longer using custom logging setup
## 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 ## 3.6.2
#### What's Fixed #### What's Fixed

View file

@ -2,8 +2,8 @@
<h1 align="center"><b>Auxio</b></h1> <h1 align="center"><b>Auxio</b></h1>
<h4 align="center">A simple, rational music player for android.</h4> <h4 align="center">A simple, rational music player for android.</h4>
<p align="center"> <p align="center">
<a href="https://github.com/oxygencobalt/Auxio/releases/tag/v3.6.2"> <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.2&color=64B5F6&style=flat"> <img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v3.6.3&color=64B5F6&style=flat">
</a> </a>
<a href="https://github.com/oxygencobalt/Auxio/releases/"> <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"> <img alt="Releases" src="https://img.shields.io/github/downloads/OxygenCobalt/Auxio/total.svg?color=4B95DE&style=flat">

View file

@ -21,8 +21,8 @@ android {
defaultConfig { defaultConfig {
applicationId namespace applicationId namespace
versionName "3.6.2" versionName "3.6.3"
versionCode 52 versionCode 53
minSdk 24 minSdk 24
targetSdk 35 targetSdk 35

View file

@ -156,21 +156,19 @@ private class DetailGeneratorImpl(
} }
if (artist.implicitAlbums.isNotEmpty()) { 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.
L.d("Implicit albums present, adding to list") L.d("Implicit albums present, adding to list")
@Suppress("UNCHECKED_CAST") grouping[DetailSection.Albums.Category.APPEARANCES] =
(grouping as MutableMap<DetailSection.Albums.Category, Collection<Album>>)[ artist.implicitAlbums.toMutableList()
DetailSection.Albums.Category.APPEARANCES] = artist.implicitAlbums
} }
val sections = val sections =
grouping.mapTo(mutableListOf<DetailSection>()) { (category, albums) -> grouping.mapTo(mutableListOf<DetailSection>()) { (category, albums) ->
DetailSection.Albums(category, ARTIST_ALBUM_SORT.albums(albums)) DetailSection.Albums(category, ARTIST_ALBUM_SORT.albums(albums))
} }
if (artist.songs.isNotEmpty()) {
val songs = DetailSection.Songs(listSettings.artistSongSort.songs(artist.songs)) val songs = DetailSection.Songs(listSettings.artistSongSort.songs(artist.songs))
sections.add(songs) sections.add(songs)
}
return Detail(artist, sections) return Detail(artist, sections)
} }
@ -183,9 +181,12 @@ private class DetailGeneratorImpl(
override fun playlist(uid: Music.UID): Detail<Playlist>? { override fun playlist(uid: Music.UID): Detail<Playlist>? {
val playlist = musicRepository.userLibrary?.findPlaylist(uid) ?: return null val playlist = musicRepository.userLibrary?.findPlaylist(uid) ?: return null
if (playlist.songs.isNotEmpty()) {
val songs = DetailSection.Songs(playlist.songs) val songs = DetailSection.Songs(playlist.songs)
return Detail(playlist, listOf(songs)) return Detail(playlist, listOf(songs))
} }
return Detail(playlist, listOf())
}
private companion object { private companion object {
val ARTIST_ALBUM_SORT = Sort(Sort.Mode.ByDate, Sort.Direction.DESCENDING) val ARTIST_ALBUM_SORT = Sort(Sort.Mode.ByDate, Sort.Direction.DESCENDING)

View file

@ -90,7 +90,7 @@ private class HomeGeneratorImpl(
// Changes in the hide collaborator setting will change the artist contents // Changes in the hide collaborator setting will change the artist contents
// of the library, consider it a library update. // of the library, consider it a library update.
L.d("Collaborator setting changed, forwarding update") L.d("Collaborator setting changed, forwarding update")
onMusicChanges(MusicRepository.Changes(deviceLibrary = true, userLibrary = false)) invalidator.invalidateMusic(MusicType.ARTISTS, UpdateInstructions.Diff)
} }
override fun onSongSortChanged() { override fun onSongSortChanged() {
@ -151,7 +151,14 @@ private class HomeGeneratorImpl(
?: emptyList() ?: emptyList()
override fun artists() = 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() ?: emptyList()
override fun genres() = override fun genres() =

View file

@ -87,20 +87,22 @@ class ExoPlaybackStateHolder(
private set private set
fun attach() { fun attach() {
imageSettings.registerListener(this)
player.addListener(this)
playbackManager.registerStateHolder(this) playbackManager.registerStateHolder(this)
playbackSettings.registerListener(this)
musicRepository.addUpdateListener(this) musicRepository.addUpdateListener(this)
player.addListener(this)
replayGainProcessor.attach()
playbackSettings.registerListener(this)
imageSettings.registerListener(this)
} }
fun release() { fun release() {
saveJob.cancel() saveJob.cancel()
player.removeListener(this)
playbackManager.unregisterStateHolder(this) playbackManager.unregisterStateHolder(this)
musicRepository.removeUpdateListener(this) musicRepository.removeUpdateListener(this)
player.removeListener(this)
replayGainProcessor.release() replayGainProcessor.release()
imageSettings.unregisterListener(this) imageSettings.unregisterListener(this)
playbackSettings.unregisterListener(this)
player.release() player.release()
} }

View file

@ -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.