File tree 1 file changed +5
-2
lines changed
app/desktop/src/main/kotlin
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ import kotlinx.coroutines.flow.firstOrNull
47
47
import kotlinx.coroutines.joinAll
48
48
import kotlinx.coroutines.launch
49
49
import kotlinx.coroutines.runBlocking
50
+ import kotlinx.coroutines.withContext
50
51
import me.him188.ani.app.data.models.preference.DarkMode
51
52
import me.him188.ani.app.data.repository.SavedWindowState
52
53
import me.him188.ani.app.data.repository.WindowStateRepository
@@ -287,7 +288,7 @@ object AniDesktop {
287
288
}
288
289
}
289
290
290
- val loadAnitorrentJob = coroutineScope.launch {
291
+ val loadAnitorrentJob = coroutineScope.launch( Dispatchers . IO ) {
291
292
try {
292
293
AnitorrentLibraryLoader .loadLibraries()
293
294
} catch (e: Throwable ) {
@@ -324,7 +325,9 @@ object AniDesktop {
324
325
325
326
// 预先加载 VLC, https://github.com/open-ani/ani/issues/618
326
327
kotlin.runCatching {
327
- VlcMediampPlayer .prepareLibraries()
328
+ withContext(Dispatchers .IO ) {
329
+ VlcMediampPlayer .prepareLibraries()
330
+ }
328
331
}.onFailure {
329
332
logger.error(it) { " Failed to prepare VLC" }
330
333
}
You can’t perform that action at this time.
0 commit comments