deps: upgrade
AndroidX core -> 1.8.0 Material Components -> 1.6.1
This commit is contained in:
parent
b0ec6faa33
commit
66b95cef42
5 changed files with 16 additions and 14 deletions
|
@ -1,6 +1,8 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## dev [v2.3.1, v2.4.0, or v3.0.0]
|
## dev [v2.3.2, v2.4.0, or v3.0.0]
|
||||||
|
|
||||||
|
## v2.3.1
|
||||||
|
|
||||||
#### What's Improved
|
#### What's Improved
|
||||||
- Loading UI is now more clear and easy-to-use
|
- Loading UI is now more clear and easy-to-use
|
||||||
|
|
|
@ -56,12 +56,12 @@ dependencies {
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2'
|
||||||
|
|
||||||
// --- SUPPORT ---
|
// --- SUPPORT ---
|
||||||
|
|
||||||
// General
|
// General
|
||||||
implementation "androidx.core:core-ktx:1.7.0"
|
implementation "androidx.core:core-ktx:1.8.0"
|
||||||
implementation "androidx.activity:activity-ktx:1.4.0"
|
implementation "androidx.activity:activity-ktx:1.4.0"
|
||||||
implementation "androidx.fragment:fragment-ktx:1.4.1"
|
implementation "androidx.fragment:fragment-ktx:1.4.1"
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ dependencies {
|
||||||
implementation "io.coil-kt:coil:2.1.0"
|
implementation "io.coil-kt:coil:2.1.0"
|
||||||
|
|
||||||
// Material
|
// Material
|
||||||
implementation "com.google.android.material:material:1.6.0"
|
implementation "com.google.android.material:material:1.6.1"
|
||||||
|
|
||||||
// LeakCanary
|
// LeakCanary
|
||||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
||||||
|
|
|
@ -28,8 +28,9 @@ import com.google.android.exoplayer2.source.TrackGroupArray
|
||||||
import com.google.common.util.concurrent.FutureCallback
|
import com.google.common.util.concurrent.FutureCallback
|
||||||
import com.google.common.util.concurrent.Futures
|
import com.google.common.util.concurrent.Futures
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue
|
import java.util.concurrent.ConcurrentLinkedQueue
|
||||||
import java.util.concurrent.Executors
|
|
||||||
import java.util.concurrent.Future
|
import java.util.concurrent.Future
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.asExecutor
|
||||||
import org.oxycblt.auxio.music.MusicStore
|
import org.oxycblt.auxio.music.MusicStore
|
||||||
import org.oxycblt.auxio.music.Song
|
import org.oxycblt.auxio.music.Song
|
||||||
import org.oxycblt.auxio.util.logW
|
import org.oxycblt.auxio.util.logW
|
||||||
|
@ -92,7 +93,9 @@ class ExoPlayerBackend(private val inner: MediaStoreBackend) : Indexer.Backend {
|
||||||
callback.onLoadStateChanged(
|
callback.onLoadStateChanged(
|
||||||
MusicStore.LoadState.Indexing(songs.size, cursor.count))
|
MusicStore.LoadState.Indexing(songs.size, cursor.count))
|
||||||
},
|
},
|
||||||
CALLBACK_EXECUTOR)
|
// Normal JVM dispatcher will suffice here, as there is no IO work
|
||||||
|
// going on (and there is no cost from switching contexts with executors)
|
||||||
|
Dispatchers.Default.asExecutor())
|
||||||
|
|
||||||
runningTasks[index] = task
|
runningTasks[index] = task
|
||||||
|
|
||||||
|
@ -114,7 +117,7 @@ class ExoPlayerBackend(private val inner: MediaStoreBackend) : Indexer.Backend {
|
||||||
) : FutureCallback<TrackGroupArray> {
|
) : FutureCallback<TrackGroupArray> {
|
||||||
override fun onSuccess(result: TrackGroupArray) {
|
override fun onSuccess(result: TrackGroupArray) {
|
||||||
val metadata = result[0].getFormat(0).metadata
|
val metadata = result[0].getFormat(0).metadata
|
||||||
|
|
||||||
if (metadata != null) {
|
if (metadata != null) {
|
||||||
completeAudio(audio, metadata)
|
completeAudio(audio, metadata)
|
||||||
} else {
|
} else {
|
||||||
|
@ -217,7 +220,5 @@ class ExoPlayerBackend(private val inner: MediaStoreBackend) : Indexer.Backend {
|
||||||
companion object {
|
companion object {
|
||||||
/** The amount of tasks this backend can run efficiently at once. */
|
/** The amount of tasks this backend can run efficiently at once. */
|
||||||
private const val TASK_CAPACITY = 8
|
private const val TASK_CAPACITY = 8
|
||||||
|
|
||||||
private val CALLBACK_EXECUTOR = Executors.newSingleThreadExecutor()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ object Indexer {
|
||||||
else -> Api21MediaStoreBackend()
|
else -> Api21MediaStoreBackend()
|
||||||
}
|
}
|
||||||
|
|
||||||
val songs = buildSongs(context, mediaStoreBackend, callback)
|
val songs = buildSongs(context, ExoPlayerBackend(mediaStoreBackend), callback)
|
||||||
if (songs.isEmpty()) {
|
if (songs.isEmpty()) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,10 +103,9 @@ val String.id3v2GenreName: String
|
||||||
// should copy mutagen's implementation?
|
// should copy mutagen's implementation?
|
||||||
// https://github.com/quodlibet/mutagen/blob/master/mutagen/id3/_frames.py
|
// https://github.com/quodlibet/mutagen/blob/master/mutagen/id3/_frames.py
|
||||||
|
|
||||||
val genreInt = substring(1 until lastIndex).toIntOrNull()
|
return substring(1 until lastIndex).toIntOrNull()?.run {
|
||||||
if (genreInt != null) {
|
genreConstantTable.getOrNull(this)
|
||||||
return genreConstantTable.getOrNull(genreInt) ?: this
|
} ?: this
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Current name is fine.
|
// Current name is fine.
|
||||||
|
|
Loading…
Reference in a new issue