[Android] Medialibrary: Set forceParserRetry() before start

Geoffrey Métais git at videolan.org
Fri Sep 14 17:25:08 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Sep 14 17:11:45 2018 +0200| [99f574a52b13a11b78ef40862382c9643fd0eafc] | committer: Geoffrey Métais

Medialibrary: Set forceParserRetry() before start

> https://code.videolan.org/videolan/vlc-android/commit/99f574a52b13a11b78ef40862382c9643fd0eafc
---

 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 33148d51d..bdfc4d32e 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -195,6 +195,7 @@ class MediaParsingService : Service(), DevicesDiscoveryCb {
 
     private suspend fun initMedialib(parse: Boolean, context: Context, shouldInit: Boolean, upgrade: Boolean) {
         addDevices(context, parse)
+        if (upgrade) medialibrary.forceParserRetry()
         medialibrary.start()
         localBroadcastManager.sendBroadcast(Intent(VLCApplication.ACTION_MEDIALIBRARY_READY))
         if (parse) startScan(shouldInit, upgrade)
@@ -227,7 +228,6 @@ class MediaParsingService : Service(), DevicesDiscoveryCb {
             upgrade -> {
                 medialibrary.unbanFolder("${AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY}/WhatsApp/")
                 medialibrary.banFolder("${AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY}/WhatsApp/Media/WhatsApp Animated Gifs/")
-                medialibrary.forceParserRetry()
             }
             settings.getBoolean("auto_rescan", true) -> reload(null)
             else -> exitCommand()



More information about the Android mailing list