[Android] Check ML is started instead of initialized
Geoffrey Métais
git at videolan.org
Tue Jul 24 17:00:54 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jul 23 17:11:05 2018 +0200| [238a9bfe0bae35ba569b93801322b50503dde6d9] | committer: Geoffrey Métais
Check ML is started instead of initialized
> https://code.videolan.org/videolan/vlc-android/commit/238a9bfe0bae35ba569b93801322b50503dde6d9
---
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 7af4557f8..10eca84b4 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -408,7 +408,7 @@ fun reload(ctx: Context) {
}
fun Context.startMedialibrary(firstRun: Boolean = false, upgrade: Boolean = false, parse: Boolean = true) = uiJob {
- if (Medialibrary.getInstance().isInitiated || !Permissions.canReadStorage(this at startMedialibrary)) return at uiJob
+ if (Medialibrary.getInstance().isStarted || !Permissions.canReadStorage(this at startMedialibrary)) return at uiJob
val prefs = withContext(VLCIO) { VLCApplication.getSettings() ?: android.preference.PreferenceManager.getDefaultSharedPreferences(this at startMedialibrary) }
val scanOpt = if (VLCApplication.showTvUi()) Constants.ML_SCAN_ON else prefs.getInt(Constants.KEY_MEDIALIBRARY_SCAN, -1)
if (parse && scanOpt == -1) {
More information about the Android
mailing list