diff --git a/CHANGELOG.md b/CHANGELOG.md index 891991233..1b9a0b8dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ # Changelog ## dev [v2.2.1 or v2.3.0] +- Updated chinese translations [courtesy of cccClyde] ## v2.2.0 #### What's New: -- Added arabic translations [courtesy of hasanpasha] -- Better russian translations [courtesy of lisiczka43] +- Added Arabic translations [Courtesy of hasanpasha] +- Improved Russian translations [Courtesy of lisiczka43] - Added option to reload the music library #### What's Improved: @@ -18,9 +19,10 @@ artist they are grouped up in #### What's Fixed: - Fixed crash on some devices configured to use French or Czech translations -- Malformed indicies should now be corrected when the playback state is restored +- Malformed indices should now be corrected when the playback state is restored - Fixed issue where track numbers would not be shown in the native language's numeric format - Fixed issue where the preference view would apply the M3 switches inconsistently +- Fixed issue where the now playing indicator on the playback screen would use an internal name #### Dev/Meta: - Removed 1.4.X compat 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 d978a4a71..f6a5cbdc6 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicLoader.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicLoader.kt @@ -72,7 +72,6 @@ import java.lang.Exception * * @author OxygenCobalt */ -@Suppress("InlinedApi") class MusicLoader { data class Library( val genres: List, @@ -107,6 +106,7 @@ class MusicLoader { ) } + @Suppress("InlinedApi") private fun loadSongs(context: Context): List { var songs = mutableListOf() val blacklistDatabase = ExcludedDatabase.getInstance(context) @@ -285,7 +285,7 @@ class MusicLoader { private fun readGenres(context: Context, songs: List): List { val genres = mutableListOf() - val genreCursor = context.contentResolver.query( + val genreCursor = context.applicationContext.contentResolver.query( MediaStore.Audio.Genres.EXTERNAL_CONTENT_URI, arrayOf( MediaStore.Audio.Genres._ID, @@ -338,7 +338,7 @@ class MusicLoader { val genreSongs = mutableListOf() // Don't even bother blacklisting here as useless iterations are less expensive than IO - val songCursor = context.contentResolver.query( + val songCursor = context.applicationContext.contentResolver.query( MediaStore.Audio.Genres.Members.getContentUri("external", genreId), arrayOf(MediaStore.Audio.Genres.Members._ID), null, null, null @@ -356,7 +356,7 @@ class MusicLoader { } } - // Some genres might be empty due to MediaStore empty. + // Some genres might be empty due to MediaStore insanity. // If that is the case, we drop them. return genreSongs.ifEmpty { null } } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt index 0fe3b6348..171fa7cb1 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt @@ -519,8 +519,6 @@ class PlaybackStateManager private constructor() { val database = PlaybackStateDatabase.getInstance(context) - logD("$mPlaybackMode") - database.writeState( PlaybackStateDatabase.SavedState( mSong, mPosition, mParent, mIndex, @@ -595,14 +593,6 @@ class PlaybackStateManager private constructor() { private fun unpackQueue(queue: MutableList) { mQueue = queue - - // Sanity check: Ensure that the - mSong?.let { song -> - while (mQueue.getOrNull(mIndex) != song) { - mIndex-- - } - } - pushQueueUpdate() } @@ -633,6 +623,7 @@ class PlaybackStateManager private constructor() { if (correctedIndex > -1) { logD("Correcting malformed index to $correctedIndex") mIndex = correctedIndex + pushQueueUpdate() } } } diff --git a/app/src/main/res/values-ar-rIQ/strings.xml b/app/src/main/res/values-ar-rIQ/strings.xml index 475457b40..bff4fce1b 100644 --- a/app/src/main/res/values-ar-rIQ/strings.xml +++ b/app/src/main/res/values-ar-rIQ/strings.xml @@ -177,7 +177,7 @@ - ألبومات d% + %d ألبومات %d البوم %d ألبومات %d ألبومات