music: fix testing artifacts in loading process
Fix testing lines created when working on the prior commit.
This commit is contained in:
parent
036d952085
commit
19e8536323
1 changed files with 25 additions and 22 deletions
|
@ -23,8 +23,6 @@ import android.content.pm.PackageManager
|
|||
import androidx.core.content.ContextCompat
|
||||
import java.util.LinkedList
|
||||
import javax.inject.Inject
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.coroutines.EmptyCoroutineContext
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -372,8 +370,10 @@ constructor(
|
|||
|
||||
// Do the initial query of the cache and media databases in parallel.
|
||||
logD("Starting MediaStore query")
|
||||
val mediaStoreQueryJob = worker.scope.async {
|
||||
val query = try {
|
||||
val mediaStoreQueryJob =
|
||||
worker.scope.async {
|
||||
val query =
|
||||
try {
|
||||
mediaStoreExtractor.query()
|
||||
} catch (e: Exception) {
|
||||
return@async Result.failure(e)
|
||||
|
@ -424,7 +424,8 @@ constructor(
|
|||
logD("Starting DeviceLibrary creation")
|
||||
val deviceLibraryJob =
|
||||
worker.scope.async(Dispatchers.Default) {
|
||||
val deviceLibrary = try {
|
||||
val deviceLibrary =
|
||||
try {
|
||||
deviceLibraryFactory.create(completeSongs, processedSongs)
|
||||
} catch (e: Exception) {
|
||||
processedSongs.close(e)
|
||||
|
@ -455,8 +456,10 @@ constructor(
|
|||
logD("Discovered ${rawSongs.size} songs, starting finalization")
|
||||
emitIndexingProgress(IndexingProgress.Indeterminate)
|
||||
logD("Starting UserLibrary query")
|
||||
val userLibraryQueryJob = worker.scope.async {
|
||||
val rawPlaylists = try {
|
||||
val userLibraryQueryJob =
|
||||
worker.scope.async {
|
||||
val rawPlaylists =
|
||||
try {
|
||||
userLibraryFactory.query()
|
||||
} catch (e: Exception) {
|
||||
return@async Result.failure(e)
|
||||
|
|
Loading…
Reference in a new issue