Merge branch 'master' into dev

This commit is contained in:
Alexander Capehart
2025-09-26 23:59:27 -06:00
10 changed files with 63 additions and 62 deletions
+23 -1
View File
@@ -1,4 +1,19 @@
# Changelog ## v4.0.9
## What's new
- Stepping gestures added to playback screen
- This was prioritized by a sponsor, @kalex8!
- Gesture indicators for skipping/stepping coming in the next update!
#### What's Improved
- Sped up loading signifigantly on large libraries
- Play next result text has been made more distinct
- Fix incorrect/inconsistent items in playlist song menu
#### What's Fixed
- Fix System loading failing on some devices
- Fixed some libraries producing invalid artists that freeze the app when navigated to
- Enabled support for m4b decoding below Android 8
## 4.0.7 ## 4.0.7
@@ -27,6 +42,13 @@ to prevent the library from not being updated on Samsung devices
## 4.0.5 ## 4.0.5
#### Date Added
- Date added now reflects FileSystem date added
#### What's Fixed
- Fixed playlist songs incorrectly updating when resorting
- Fixed artists without songs having enabled play/pause toolbar options
#### What's Improved #### What's Improved
- Re-added folder exclusion - Re-added folder exclusion
+2 -2
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/v4.0.8"> <a href="https://github.com/oxygencobalt/Auxio/releases/tag/v4.0.9">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v4.0.8&color=64B5F6&style=flat"> <img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v4.0.9&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">
+2 -2
View File
@@ -18,8 +18,8 @@ android {
defaultConfig { defaultConfig {
applicationId namespace applicationId namespace
versionName "4.0.8" versionName "4.0.9"
versionCode 67 versionCode 68
minSdk min_sdk minSdk min_sdk
targetSdk target_sdk targetSdk target_sdk
@@ -65,16 +65,12 @@ class AboutFragment : ViewBindingFragment<FragmentAboutBinding>() {
view.updatePadding(bottom = insets.systemBarInsetsCompat.bottom) view.updatePadding(bottom = insets.systemBarInsetsCompat.bottom)
insets insets
} }
binding.aboutVersion.text = BuildConfig.VERSION_NAME binding.aboutVersion.text = BuildConfig.VERSION_NAME
binding.aboutCode.setOnClickListener { requireContext().openInBrowser(LINK_SOURCE) } binding.aboutCode.setOnClickListener { requireContext().openInBrowser(LINK_SOURCE) }
binding.aboutWiki.setOnClickListener { requireContext().openInBrowser(LINK_WIKI) } binding.aboutWiki.setOnClickListener { requireContext().openInBrowser(LINK_WIKI) }
binding.aboutLicenses.setOnClickListener { requireContext().openInBrowser(LINK_LICENSES) } binding.aboutLicenses.setOnClickListener { requireContext().openInBrowser(LINK_LICENSES) }
binding.aboutProfile.setOnClickListener { requireContext().openInBrowser(LINK_PROFILE) } binding.aboutProfile.setOnClickListener { requireContext().openInBrowser(LINK_PROFILE) }
binding.aboutDonate.setOnClickListener { requireContext().openInBrowser(LINK_DONATE) } binding.aboutDonate.setOnClickListener { requireContext().openInBrowser(LINK_DONATE) }
binding.aboutSupMarkPitblado.setOnClickListener {
requireContext().openInBrowser(LINK_SUP_MARK_PITBLADO)
}
binding.aboutFeedbackGithub.setOnClickListener { binding.aboutFeedbackGithub.setOnClickListener {
requireContext().openInBrowser(LINK_NEW_ISSUE) requireContext().openInBrowser(LINK_NEW_ISSUE)
} }
@@ -116,6 +112,5 @@ class AboutFragment : ViewBindingFragment<FragmentAboutBinding>() {
const val LINK_NEW_ISSUE = "$LINK_SOURCE/issues/new" const val LINK_NEW_ISSUE = "$LINK_SOURCE/issues/new"
const val LINK_PROFILE = "https://github.com/OxygenCobalt" const val LINK_PROFILE = "https://github.com/OxygenCobalt"
const val LINK_DONATE = "https://github.com/sponsors/OxygenCobalt" const val LINK_DONATE = "https://github.com/sponsors/OxygenCobalt"
const val LINK_SUP_MARK_PITBLADO = "https://github.com/mark-pitblado"
} }
} }
@@ -226,17 +226,6 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/about_sup_mark_pitblado"
style="@style/Widget.Auxio.TextView.Icon.Clickable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sup_mark_pitblado"
app:layout_constraintEnd_toEndOf="parent"
app:drawableStartCompat="@drawable/ic_person_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_licenses" />
<TextView <TextView
android:id="@+id/about_supporters_promo" android:id="@+id/about_supporters_promo"
style="@style/Widget.Auxio.TextView.Icon.Clickable" style="@style/Widget.Auxio.TextView.Icon.Clickable"
@@ -0,0 +1,5 @@
Auxio 4.0.0 completely overhauls the user experience, with a refreshed design based on the latest Material Design specs
and a brand new music loader with signifigant improvements to device and tag support.
This patch introducess several optimizations and fixes to the music loader, alongside several UX improvements.
New features are coming soon!
For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v4.0.9.
@@ -253,19 +253,16 @@ private class MusicGraphBuilderImpl : MusicGraph.Builder {
for (cluster in artistClusters.values) { for (cluster in artistClusters.values) {
simplifyArtistCluster(cluster) simplifyArtistCluster(cluster)
} }
// second pass: cluster artists by mbid and identify invalid ones // second pass: check for identical uids and meld together vertices w/the same uid
// (i.e artists with the same mbid but different metadata) // to prevent broken artist objects
// this only applies to artists w/mbids, if we dont do this well meld all non-mbid val artistUidClusters = artistVertices.values.groupBy { it.preArtist.uid }
// artists into a single vertex which is incorrect for (cluster in artistUidClusters.values) {
val mbidClusters =
artistVertices.values.groupBy { it.preArtist.musicBrainzId }.filter { it.key != null }
for (cluster in mbidClusters.values) {
// everything in the cluster must have the same pre-artist // everything in the cluster must have the same pre-artist
val canon = cluster.maxBy { it.songVertices.size }.preArtist val canon = cluster.maxBy { it.songVertices.size }.preArtist
val same = cluster.all { it.preArtist == canon } val same = cluster.all { it.preArtist == canon }
if (!same) { if (!same) {
// invalid mbid setup, strip mbids from all artists in the cluster // invalid mbid setup, strip mbids from all artists in the cluster
val noMbidPreArtist = canon.copy(musicBrainzId = null) val noMbidPreArtist = canon
val simpleMbidVertex = val simpleMbidVertex =
artistVertices.getOrPut(noMbidPreArtist) { ArtistVertex(noMbidPreArtist) } artistVertices.getOrPut(noMbidPreArtist) { ArtistVertex(noMbidPreArtist) }
for (artist in cluster) { for (artist in cluster) {
@@ -279,19 +276,14 @@ private class MusicGraphBuilderImpl : MusicGraph.Builder {
for (cluster in albumClusters.values) { for (cluster in albumClusters.values) {
simplifyAlbumCluster(cluster) simplifyAlbumCluster(cluster)
} }
// second pass: cluster albums by mbid and identify invalid ones // second pass: check for identical uids and meld together vertices w/the same uid
// (i.e albums with the same mbid but different metadata) // to prevent broken album objects
// this only applies to albums w/mbids, if we dont do this well meld all non-mbid val uidClusters = albumVertices.values.groupBy { it.preAlbum.uid }
// albums into a single vertex which is incorrect for (cluster in uidClusters.values) {
val mbidAlbumClusters =
albumVertices.values.groupBy { it.preAlbum.musicBrainzId }.filter { it.key != null }
for (cluster in mbidAlbumClusters.values) {
// everything in the cluster must have the same pre-album
val canon = cluster.maxBy { it.songVertices.size }.preAlbum val canon = cluster.maxBy { it.songVertices.size }.preAlbum
val same = cluster.all { it.preAlbum == canon } val same = cluster.all { it.preAlbum == canon }
if (!same) { if (!same) {
// invalid mbid setup, strip mbids from all albums in the cluster val noMbidPreAlbum = canon
val noMbidPreAlbum = canon.copy(musicBrainzId = null)
val simpleMbidVertex = val simpleMbidVertex =
albumVertices.getOrPut(noMbidPreAlbum) { albumVertices.getOrPut(noMbidPreAlbum) {
AlbumVertex(noMbidPreAlbum, mutableListOf()) AlbumVertex(noMbidPreAlbum, mutableListOf())
@@ -20,12 +20,10 @@ package org.oxycblt.musikr.model
import org.oxycblt.musikr.Album import org.oxycblt.musikr.Album
import org.oxycblt.musikr.Artist import org.oxycblt.musikr.Artist
import org.oxycblt.musikr.Music
import org.oxycblt.musikr.Song import org.oxycblt.musikr.Song
import org.oxycblt.musikr.covers.CoverCollection import org.oxycblt.musikr.covers.CoverCollection
import org.oxycblt.musikr.tag.Date import org.oxycblt.musikr.tag.Date
import org.oxycblt.musikr.tag.interpret.PreAlbum import org.oxycblt.musikr.tag.interpret.PreAlbum
import org.oxycblt.musikr.util.update
internal interface AlbumCore { internal interface AlbumCore {
val preAlbum: PreAlbum val preAlbum: PreAlbum
@@ -42,16 +40,7 @@ internal interface AlbumCore {
class AlbumImpl internal constructor(private val core: AlbumCore) : Album { class AlbumImpl internal constructor(private val core: AlbumCore) : Album {
private val preAlbum = core.preAlbum private val preAlbum = core.preAlbum
override val uid = override val uid = preAlbum.uid
// Attempt to use a MusicBrainz ID first before falling back to a hashed UID.
preAlbum.musicBrainzId?.let { Music.UID.musicBrainz(Music.UID.Item.ALBUM, it) }
?: Music.UID.auxio(Music.UID.Item.ALBUM) {
// Hash based on only names despite the presence of a date to increase stability.
// I don't know if there is any situation where an artist will have two albums with
// the exact same name, but if there is, I would love to know.
update(preAlbum.rawName)
update(preAlbum.preArtists.preArtists.mapNotNull { it.rawName })
}
override val name = preAlbum.name override val name = preAlbum.name
override val releaseType = preAlbum.releaseType override val releaseType = preAlbum.releaseType
override val durationMs = core.songs.sumOf { it.durationMs } override val durationMs = core.songs.sumOf { it.durationMs }
@@ -18,15 +18,12 @@
package org.oxycblt.musikr.model package org.oxycblt.musikr.model
import android.util.Log
import org.oxycblt.musikr.Album import org.oxycblt.musikr.Album
import org.oxycblt.musikr.Artist import org.oxycblt.musikr.Artist
import org.oxycblt.musikr.Genre import org.oxycblt.musikr.Genre
import org.oxycblt.musikr.Music
import org.oxycblt.musikr.Song import org.oxycblt.musikr.Song
import org.oxycblt.musikr.covers.CoverCollection import org.oxycblt.musikr.covers.CoverCollection
import org.oxycblt.musikr.tag.interpret.PreArtist import org.oxycblt.musikr.tag.interpret.PreArtist
import org.oxycblt.musikr.util.update
internal interface ArtistCore { internal interface ArtistCore {
val preArtist: PreArtist val preArtist: PreArtist
@@ -42,12 +39,7 @@ internal interface ArtistCore {
* @author Alexander Capehart (OxygenCobalt) * @author Alexander Capehart (OxygenCobalt)
*/ */
internal class ArtistImpl(private val core: ArtistCore) : Artist { internal class ArtistImpl(private val core: ArtistCore) : Artist {
override val uid = override val uid = core.preArtist.uid
// Attempt to use a MusicBrainz ID first before falling back to a hashed UID.
core.preArtist.musicBrainzId?.let { Music.UID.musicBrainz(Music.UID.Item.ARTIST, it) }
?: Music.UID.auxio(Music.UID.Item.ARTIST) {
update(core.preArtist.rawName.also { Log.d("ArtistImpl", it.toString()) })
}
override val name = core.preArtist.name override val name = core.preArtist.name
override val songs = core.songs override val songs = core.songs
@@ -29,6 +29,7 @@ import org.oxycblt.musikr.tag.Disc
import org.oxycblt.musikr.tag.Name import org.oxycblt.musikr.tag.Name
import org.oxycblt.musikr.tag.ReleaseType import org.oxycblt.musikr.tag.ReleaseType
import org.oxycblt.musikr.tag.ReplayGainAdjustment import org.oxycblt.musikr.tag.ReplayGainAdjustment
import org.oxycblt.musikr.util.update
internal data class PreSong( internal data class PreSong(
val v363Uid: Music.UID, val v363Uid: Music.UID,
@@ -62,7 +63,18 @@ internal data class PreAlbum(
val rawName: String?, val rawName: String?,
val releaseType: ReleaseType, val releaseType: ReleaseType,
val preArtists: PreArtistsFrom, val preArtists: PreArtistsFrom,
) ) {
val uid =
// Attempt to use a MusicBrainz ID first before falling back to a hashed UID.
musicBrainzId?.let { Music.UID.musicBrainz(Music.UID.Item.ALBUM, it) }
?: Music.UID.auxio(Music.UID.Item.ALBUM) {
// Hash based on only names despite the presence of a date to increase stability.
// I don't know if there is any situation where an artist will have two albums with
// the exact same name, but if there is, I would love to know.
update(rawName)
update(preArtists.preArtists.mapNotNull { it.rawName })
}
}
internal sealed interface PreArtistsFrom { internal sealed interface PreArtistsFrom {
val preArtists: List<PreArtist> val preArtists: List<PreArtist>
@@ -72,7 +84,12 @@ internal sealed interface PreArtistsFrom {
data class Album(override val preArtists: List<PreArtist>) : PreArtistsFrom data class Album(override val preArtists: List<PreArtist>) : PreArtistsFrom
} }
internal data class PreArtist(val musicBrainzId: UUID?, val name: Name, val rawName: String?) internal data class PreArtist(val musicBrainzId: UUID?, val name: Name, val rawName: String?) {
val uid =
// Attempt to use a MusicBrainz ID first before falling back to a hashed UID.
musicBrainzId?.let { Music.UID.musicBrainz(Music.UID.Item.ARTIST, it) }
?: Music.UID.auxio(Music.UID.Item.ARTIST) { update(rawName) }
}
internal data class PreGenre( internal data class PreGenre(
val name: Name, val name: Name,