[Android] ClearDb: use service to get discovery updates
Duncan McNamara
git at videolan.org
Tue Apr 19 08:46:38 UTC 2022
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Fri Apr 15 18:03:11 2022 +0200| [e5151b5a2278a61ee2bdb208877c45a166aa183b] | committer: Nicolas Pomepuy
ClearDb: use service to get discovery updates
After a clearDatabase, the medialibrary was called for a discovery
without using the MediaParsingService, which means no callbacks set
to get progress, and progress couldn't be displayed.
> https://code.videolan.org/videolan/vlc-android/commit/e5151b5a2278a61ee2bdb208877c45a166aa183b
---
.../src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
index 8d4d43c6d..d16ccd50d 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
@@ -51,6 +51,7 @@ import org.videolan.vlc.R
import org.videolan.vlc.gui.DebugLogActivity
import org.videolan.vlc.gui.dialogs.ConfirmDeleteDialog
import org.videolan.vlc.gui.dialogs.RenameDialog
+import org.videolan.vlc.gui.helpers.MedialibraryUtils
import org.videolan.vlc.gui.helpers.UiTools
import org.videolan.vlc.gui.helpers.hf.StoragePermissionsDelegate.Companion.getWritePermission
import org.videolan.vlc.util.FeatureFlag
@@ -151,7 +152,7 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
Log.e(this::class.java.simpleName, e.message, e)
}
}
- medialibrary.discover(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY)
+ MedialibraryUtils.addDir(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY, requireContext())
}
}
return true
More information about the Android
mailing list