[Android] Init medialibrary in IO threadpool

Geoffrey Métais git at videolan.org
Fri Sep 28 17:18:33 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Sep 28 17:18:15 2018 +0200| [8d4179636100b74cf78e93bc5c8354cebdf54a50] | committer: Geoffrey Métais

Init medialibrary in IO threadpool

> https://code.videolan.org/videolan/vlc-android/commit/8d4179636100b74cf78e93bc5c8354cebdf54a50
---

 vlc-android/src/org/videolan/vlc/MediaParsingService.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
index 6c9c43038..cd8edf287 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -356,7 +356,7 @@ class MediaParsingService : Service(), DevicesDiscoveryCb, CoroutineScope {
         progress.value = if (status === null) ScanProgress(parsing, discovery) else status.copy(parsing = parsing, discovery = discovery)
     }
 
-    private val actions = actor<MLAction>(capacity = Channel.UNLIMITED) {
+    private val actions = actor<MLAction>(context = Dispatchers.IO, capacity = Channel.UNLIMITED) {
         for (action in channel) when (action) {
             is DiscoverStorage -> {
                 for (folder in Medialibrary.getBlackList()) medialibrary.banFolder(action.path + folder)



More information about the Android mailing list