diff --git a/app/build.gradle b/app/build.gradle index efa21d646..628532ca4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -70,7 +70,7 @@ dependencies { // UI implementation "androidx.recyclerview:recyclerview:1.2.1" - implementation "androidx.constraintlayout:constraintlayout:2.1.2" + implementation 'androidx.constraintlayout:constraintlayout:2.1.3' implementation "androidx.dynamicanimation:dynamicanimation:1.0.0" implementation "androidx.viewpager2:viewpager2:1.1.0-beta01" @@ -102,7 +102,7 @@ dependencies { implementation 'io.coil-kt:coil:2.0.0-alpha06' // Material - implementation 'com.google.android.material:material:1.5.0-rc01' + implementation 'com.google.android.material:material:1.5.0' // --- DEBUG --- diff --git a/app/src/main/java/org/oxycblt/auxio/coil/AuxioFetcher.kt b/app/src/main/java/org/oxycblt/auxio/coil/AuxioFetcher.kt index fe8c853b0..344d5d634 100644 --- a/app/src/main/java/org/oxycblt/auxio/coil/AuxioFetcher.kt +++ b/app/src/main/java/org/oxycblt/auxio/coil/AuxioFetcher.kt @@ -161,7 +161,7 @@ abstract class AuxioFetcher : Fetcher { for (i in 0 until metadata.length()) { // We can only extract pictures from two tags with this method, ID3v2's APIC or - // FLAC's PICTURE. + // Vorbis picture comments. val pic: ByteArray? val type: Int @@ -190,7 +190,7 @@ abstract class AuxioFetcher : Fetcher { } else if (stream != null) { // In the case a front cover is not found, use the first image in the tag instead. // This can be corrected later on if a front cover frame is found. - logD("Image not a front cover, assigning image of type $type for now") + logD("No front cover image, using image of type $type instead") stream = ByteArrayInputStream(pic) } diff --git a/app/src/main/java/org/oxycblt/auxio/music/MusicLoader.kt b/app/src/main/java/org/oxycblt/auxio/music/MusicLoader.kt index 64af44427..968a37ca6 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicLoader.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicLoader.kt @@ -43,20 +43,20 @@ import org.oxycblt.auxio.excluded.ExcludedDatabase * blacklisting relies on a deprecated method, and the supposedly "modern" method is SLOWER and * causes even more problems since I have to manage databases across version boundaries. Sometimes * music will have a deformed clone that I can't filter out, sometimes Genres will just break for no - * reason, sometimes this spaghetti parser just completely falls apart and is unable to get any - * metadata. Everything is broken in it's own special unique way and I absolutely hate it. + * reason, and sometimes tags encoded in UTF-8 will be interpreted as anything from UTF-16 to Latin-1 + * to Shift JIS WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY * * Is there anything we can do about it? No. Google has routinely shut down issues that begged google * to fix glaring issues with MediaStore or to just take the API behind the woodshed and shoot it. - * Largely because they have zero incentive to improve it, especially for such obscure things - * as indexing music. As a result, some players like Vanilla and VLC just hack their own pidgin - * version of MediaStore from their own parsers, but this is both infeasible for Auxio due to how - * incredibly slow it is to get a file handle from the android sandbox AND how much harder it is - * to manage a database of your own media that mirrors the filesystem perfectly. And even if I set - * aside those crippling issues and changed my indexer to that, it would face the even larger - * problem of how google keeps trying to kill the filesystem and force you into their - * ContentResolver API. In the future MediaStore could be the only system we have, which is also the - * day that greenland melts and birthdays stop happening forever. + * Largely because they have zero incentive to improve it given how "obscure" music listening is. + * As a result, some players like Vanilla and VLC just hack their own pidgin version of MediaStore + * from their own parsers, but this is both infeasible for Auxio due to how incredibly slow it is + * to get a file handle from the android sandbox AND how much harder it is to manage a database of + * your own media that mirrors the filesystem perfectly. And even if I set aside those crippling + * issues and changed my indexer to that, it would face the even larger problem of how google keeps + * trying to kill the filesystem and force you into their ContentResolver API. In the future + * MediaStore could be the only system we have, which is also the day that greenland melts and + * birthdays stop happening forever. * * I'm pretty sure nothing is going to happen and MediaStore will continue to be neglected and * probably deprecated eventually for a "new" API that just coincidentally excludes music indexing. @@ -101,7 +101,7 @@ class MusicLoader { // DATA was deprecated on Android 10, but is set to be un-deprecated in Android 12L. // The only reason we'd want to change this is to add external partitions support, but - // that's less efficent and there's no demand for that right now. + // that's less efficient and there's no demand for that right now. for (path in paths) { selector += " AND ${MediaStore.Audio.Media.DATA} NOT LIKE ?" args += "$path%" // Append % so that the selector properly detects children diff --git a/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt b/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt index 32331bf5d..dc98592ac 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt @@ -241,19 +241,11 @@ class PlaybackService : Service(), Player.Listener, PlaybackStateManager.Callbac override fun onTracksInfoChanged(tracksInfo: TracksInfo) { super.onTracksInfoChanged(tracksInfo) - var consumed = false - for (info in tracksInfo.trackGroupInfos) { if (info.isSelected) { for (i in 0 until info.trackGroup.length) { if (info.isTrackSelected(i)) { - val metadata = info.trackGroup.getFormat(i).metadata - - if (metadata != null) { - audioReactor.applyReplayGain(metadata) - consumed = true - } - + audioReactor.applyReplayGain(info.trackGroup.getFormat(i).metadata) break } } @@ -261,11 +253,6 @@ class PlaybackService : Service(), Player.Listener, PlaybackStateManager.Callbac break } } - - if (!consumed) { - // Sadly we couldn't parse any ReplayGain tags. Revert to normal volume. - audioReactor.applyReplayGain(null) - } } // --- PLAYBACK STATE CALLBACK OVERRIDES --- diff --git a/prebuild.py b/prebuild.py index 7690d9569..92575429c 100755 --- a/prebuild.py +++ b/prebuild.py @@ -61,17 +61,17 @@ if ndk_path is None or not os.path.isfile(os.path.join(ndk_path, "ndk_build")): print("[" + str(i) + "] " + candidate) try: - ndk_path = candidates[int(input("Enter the ndk to use [Default 0]: "))] + ndk_path = candidates[int(input("enter the ndk to use [Default 0]: "))] except: ndk_path = candidates[0] else: - print(FATAL + "fatal:" + NC + " NDK_PATH is either invalid, or the android ndk was not installed at a recognized location.") + print(FATAL + "fatal:" + NC + " NDK_PATH is either not set/invalid, or the android ndk was not installed at a recognized location.") system.exit(1) # Now try to install ExoPlayer. sh("rm -rf deps") -print(INFO + "info:" + NC + " cloning ExoPlayer...") +print(INFO + "info:" + NC + " cloning exoplayer...") sh("git clone https://github.com/oxygencobalt/ExoPlayer.git " + exoplayer_path) os.chdir(exoplayer_path) sh("git checkout auxio")