From 6a0fd766362529f9b9f0bea674dd6f716d308da4 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Tue, 9 Jan 2024 13:50:02 -0700 Subject: [PATCH 01/12] music: fix selector error with malformed folders Forgot that i is not a good indicator of if we need to begin a selector or not since we may discard certain music folders. --- .../org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt index 23e58c80d..8a9a4e1df 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt @@ -137,7 +137,7 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) : val path = paths[i] val volume = path.volume.components ?: continue template += - if (i == 0) { + if (args.isEmpty()) { "${MediaStore.Audio.AudioColumns.DATA} LIKE ?" } else { " OR ${MediaStore.Audio.AudioColumns.DATA} LIKE ?" @@ -217,7 +217,7 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) : for (i in paths.indices) { val path = paths[i] template = - if (i == 0) { + if (args.isEmpty()) { "(${MediaStore.Audio.AudioColumns.VOLUME_NAME} LIKE ? " + "AND ${MediaStore.Audio.AudioColumns.RELATIVE_PATH} LIKE ?)" } else { From f525abdba3fc055c9662351465f6240a5f3c85a9 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 13 Jan 2024 20:28:34 -0700 Subject: [PATCH 02/12] playback: fix marquee on playback screen --- .../org/oxycblt/auxio/playback/PlaybackPanelFragment.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackPanelFragment.kt b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackPanelFragment.kt index d03e0cb1c..08befa950 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackPanelFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackPanelFragment.kt @@ -104,7 +104,10 @@ class PlaybackPanelFragment : } binding.playbackCover.onSwipeListener = this - binding.playbackSong.setOnClickListener { navigateToCurrentSong() } + binding.playbackSong.apply { + isSelected = true + setOnClickListener { navigateToCurrentSong() } + } binding.playbackArtist.setOnClickListener { navigateToCurrentArtist() } binding.playbackAlbum.setOnClickListener { navigateToCurrentAlbum() } @@ -130,6 +133,7 @@ class PlaybackPanelFragment : override fun onDestroyBinding(binding: FragmentPlaybackPanelBinding) { equalizerLauncher = null coverAdapter = null + binding.playbackSong.isSelected = false binding.playbackToolbar.setOnMenuItemClickListener(null) } From 9652fb0221f82d7b26dc41d1c092694137e803cf Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 13 Jan 2024 20:28:46 -0700 Subject: [PATCH 03/12] info: update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a01e2ec..767114f8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ #### What's Fixed - Fixed a crash occuring if you navigated to the settings page from the playlist view and then back +- Fixed music loading failing with an SQL error with certain music folder configurations +- Fixed issue where song title on playback screen would not scroll ## 3.3.0 From dea0ee1432b3ca9ac659137bd3798c8dba2b4053 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 13 Jan 2024 21:14:26 -0700 Subject: [PATCH 04/12] info: bump to 3.3.1 Bump to version 3.3.1 (38). --- CHANGELOG.md | 2 +- README.md | 4 ++-- app/build.gradle | 4 ++-- fastlane/metadata/android/en-US/changelogs/38.txt | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/38.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 767114f8a..04987976c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## dev +## 3.3.1 #### What's Improved - The OPUS base volume adjustment field is now parsed and used as a ReplayGain adjustment diff --git a/README.md b/README.md index cac2abd16..b78bca77d 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 999ea5e8c..c908a0094 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { defaultConfig { applicationId namespace - versionName "3.3.0" - versionCode 37 + versionName "3.3.1" + versionCode 38 minSdk 24 targetSdk 34 diff --git a/fastlane/metadata/android/en-US/changelogs/38.txt b/fastlane/metadata/android/en-US/changelogs/38.txt new file mode 100644 index 000000000..8c0701516 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/38.txt @@ -0,0 +1,3 @@ +Auxio 3.3.1 adds the ability to import and export playlists, skip gestures, and fixes/improvements to the music loader. +This release fixes a critical bug with the music loader, among other issues. +For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v3.3.1 \ No newline at end of file From b4833918cfd179176f3bcc4694329effea491b41 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 13 Jan 2024 22:15:17 -0700 Subject: [PATCH 05/12] music: fix opus base gain extraction I have no idea how it ended up this mangled. --- .../org/oxycblt/auxio/music/metadata/TagWorker.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/metadata/TagWorker.kt b/app/src/main/java/org/oxycblt/auxio/music/metadata/TagWorker.kt index 6a5880f7d..2167c195d 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/metadata/TagWorker.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/metadata/TagWorker.kt @@ -105,12 +105,15 @@ private class TagWorkerImpl( format.initializationData.isNotEmpty() && format.initializationData[0].size >= 18) { val header = format.initializationData[0] - val gain = header[1].toInt() or ((header[0].toInt() shl 8) and 0xFF) - logD("Obtained opus base gain: ${gain / 256f} dB") - rawSong.replayGainTrackAdjustment = - rawSong.replayGainTrackAdjustment?.plus(gain / 256f) - rawSong.replayGainAlbumAdjustment = - rawSong.replayGainAlbumAdjustment?.plus(gain / 256f) + val gain = (((header[16]).toInt() and 0xFF) or ((header[17].toInt() shl 8))) / 256f + logD("Obtained opus base gain: $gain dB") + if (gain != 0f) { + logD("Applying opus base gain") + rawSong.replayGainTrackAdjustment = + (rawSong.replayGainTrackAdjustment ?: 0f) + gain + rawSong.replayGainAlbumAdjustment = + (rawSong.replayGainAlbumAdjustment ?: 0f) + gain + } } } else { logD("No metadata could be extracted for ${rawSong.name}") From 4234f5b8f19e8679406dec371fca070aeb1740c7 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 13 Jan 2024 22:23:42 -0700 Subject: [PATCH 06/12] music: update cache db --- .../main/java/org/oxycblt/auxio/music/cache/CacheDatabase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/cache/CacheDatabase.kt b/app/src/main/java/org/oxycblt/auxio/music/cache/CacheDatabase.kt index 9eb52bbc6..f64345de2 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/cache/CacheDatabase.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/cache/CacheDatabase.kt @@ -32,7 +32,7 @@ import org.oxycblt.auxio.music.info.Date import org.oxycblt.auxio.music.metadata.correctWhitespace import org.oxycblt.auxio.music.metadata.splitEscaped -@Database(entities = [CachedSong::class], version = 36, exportSchema = false) +@Database(entities = [CachedSong::class], version = 38, exportSchema = false) abstract class CacheDatabase : RoomDatabase() { abstract fun cachedSongsDao(): CachedSongsDao } From f1a6b77d303359ccde98071d62fe4e456967c60a Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sun, 14 Jan 2024 09:55:43 -0700 Subject: [PATCH 07/12] music: fix other music loading failure from dirs Turns out there are two ways the selector can go malformed. One was the complicated issue where you can't resolve a directory, the other was me *missing a character* and not even building the selector right. --- .../org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt index 8a9a4e1df..49c068a0b 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt @@ -216,7 +216,7 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) : var template = "" for (i in paths.indices) { val path = paths[i] - template = + template += if (args.isEmpty()) { "(${MediaStore.Audio.AudioColumns.VOLUME_NAME} LIKE ? " + "AND ${MediaStore.Audio.AudioColumns.RELATIVE_PATH} LIKE ?)" From 3d1fa6e4ffebbb42d6ef2d9aab04adbad319f6fc Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sun, 14 Jan 2024 09:57:36 -0700 Subject: [PATCH 08/12] info: bump to 3.3.2 Bump to version 3.3.2 (39). --- CHANGELOG.md | 5 +++++ README.md | 4 ++-- app/build.gradle | 4 ++-- fastlane/metadata/android/en-US/changelogs/39.txt | 3 +++ 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/39.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 04987976c..e723a7831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 3.3.2 + +#### What's Fixed +- Fixed music loading failing with an SQL error with certain music folder configurations + ## 3.3.1 #### What's Improved diff --git a/README.md b/README.md index b78bca77d..e40ed0b5e 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 c908a0094..13aa46703 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { defaultConfig { applicationId namespace - versionName "3.3.1" - versionCode 38 + versionName "3.3.2" + versionCode 39 minSdk 24 targetSdk 34 diff --git a/fastlane/metadata/android/en-US/changelogs/39.txt b/fastlane/metadata/android/en-US/changelogs/39.txt new file mode 100644 index 000000000..722f36bdc --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/39.txt @@ -0,0 +1,3 @@ +Auxio 3.3.2 adds the ability to import and export playlists, skip gestures, and fixes/improvements to the music loader. +This release fixes a critical bug with the music loader, among other issues. +For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v3.3.2 \ No newline at end of file From 07acb4f5b91e0cd6229c6f8ce2801fe26176cf08 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sun, 14 Jan 2024 11:00:52 -0700 Subject: [PATCH 09/12] music: fix data selector creation More or less, the paths being selected for were extremely malformed, stuff like storage/emulated/0Music. This completely broke music folders below API 29. --- .../org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt index 49c068a0b..f3a6f6aa4 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt @@ -142,7 +142,7 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) : } else { " OR ${MediaStore.Audio.AudioColumns.DATA} LIKE ?" } - args.add("${volume}${path.components}%") + args.add("/${volume}/${path.components}%") } if (template.isEmpty()) { From 4f42695812aea718fd59204876741bc997781520 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sun, 14 Jan 2024 11:19:41 -0700 Subject: [PATCH 10/12] info: bump to 3.3.3 Bump the app version to 3.3.3 (40). --- README.md | 4 ++-- app/build.gradle | 4 ++-- fastlane/metadata/android/en-US/changelogs/40.txt | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/40.txt diff --git a/README.md b/README.md index e40ed0b5e..be40f6388 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 13aa46703..915f58a3e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { defaultConfig { applicationId namespace - versionName "3.3.2" - versionCode 39 + versionName "3.3.3" + versionCode 40 minSdk 24 targetSdk 34 diff --git a/fastlane/metadata/android/en-US/changelogs/40.txt b/fastlane/metadata/android/en-US/changelogs/40.txt new file mode 100644 index 000000000..722f36bdc --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40.txt @@ -0,0 +1,3 @@ +Auxio 3.3.2 adds the ability to import and export playlists, skip gestures, and fixes/improvements to the music loader. +This release fixes a critical bug with the music loader, among other issues. +For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v3.3.2 \ No newline at end of file From 8b623b40ff841197f01213df8d3995a02a397bcb Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sun, 14 Jan 2024 11:40:53 -0700 Subject: [PATCH 11/12] info: update changelog --- fastlane/metadata/android/en-US/changelogs/40.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/metadata/android/en-US/changelogs/40.txt b/fastlane/metadata/android/en-US/changelogs/40.txt index 722f36bdc..190c31d23 100644 --- a/fastlane/metadata/android/en-US/changelogs/40.txt +++ b/fastlane/metadata/android/en-US/changelogs/40.txt @@ -1,3 +1,3 @@ -Auxio 3.3.2 adds the ability to import and export playlists, skip gestures, and fixes/improvements to the music loader. +Auxio 3.3.3 adds the ability to import and export playlists, skip gestures, and fixes/improvements to the music loader. This release fixes a critical bug with the music loader, among other issues. -For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v3.3.2 \ No newline at end of file +For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v3.3.3 \ No newline at end of file From 8ca63047d7393ede07ab22f1b98c2297df9542b8 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sun, 14 Jan 2024 11:45:34 -0700 Subject: [PATCH 12/12] info: add changelog entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e723a7831..a04afeb75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 3.3.3 + +#### What's Fixed +- Fixed music folders not behaving correctly below Android 11 + ## 3.3.2 #### What's Fixed