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 androidx.core.content.ContextCompat
|
||||||
import java.util.LinkedList
|
import java.util.LinkedList
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlin.coroutines.CoroutineContext
|
|
||||||
import kotlin.coroutines.EmptyCoroutineContext
|
|
||||||
import kotlinx.coroutines.CancellationException
|
import kotlinx.coroutines.CancellationException
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
@ -372,8 +370,10 @@ constructor(
|
||||||
|
|
||||||
// Do the initial query of the cache and media databases in parallel.
|
// Do the initial query of the cache and media databases in parallel.
|
||||||
logD("Starting MediaStore query")
|
logD("Starting MediaStore query")
|
||||||
val mediaStoreQueryJob = worker.scope.async {
|
val mediaStoreQueryJob =
|
||||||
val query = try {
|
worker.scope.async {
|
||||||
|
val query =
|
||||||
|
try {
|
||||||
mediaStoreExtractor.query()
|
mediaStoreExtractor.query()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
return@async Result.failure(e)
|
return@async Result.failure(e)
|
||||||
|
@ -424,7 +424,8 @@ constructor(
|
||||||
logD("Starting DeviceLibrary creation")
|
logD("Starting DeviceLibrary creation")
|
||||||
val deviceLibraryJob =
|
val deviceLibraryJob =
|
||||||
worker.scope.async(Dispatchers.Default) {
|
worker.scope.async(Dispatchers.Default) {
|
||||||
val deviceLibrary = try {
|
val deviceLibrary =
|
||||||
|
try {
|
||||||
deviceLibraryFactory.create(completeSongs, processedSongs)
|
deviceLibraryFactory.create(completeSongs, processedSongs)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
processedSongs.close(e)
|
processedSongs.close(e)
|
||||||
|
@ -455,8 +456,10 @@ constructor(
|
||||||
logD("Discovered ${rawSongs.size} songs, starting finalization")
|
logD("Discovered ${rawSongs.size} songs, starting finalization")
|
||||||
emitIndexingProgress(IndexingProgress.Indeterminate)
|
emitIndexingProgress(IndexingProgress.Indeterminate)
|
||||||
logD("Starting UserLibrary query")
|
logD("Starting UserLibrary query")
|
||||||
val userLibraryQueryJob = worker.scope.async {
|
val userLibraryQueryJob =
|
||||||
val rawPlaylists = try {
|
worker.scope.async {
|
||||||
|
val rawPlaylists =
|
||||||
|
try {
|
||||||
userLibraryFactory.query()
|
userLibraryFactory.query()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
return@async Result.failure(e)
|
return@async Result.failure(e)
|
||||||
|
|
Loading…
Reference in a new issue