[Android] Fix ML crash due to bad blacklist url encoding

Nicolas Pomepuy git at videolan.org
Mon May 18 13:48:42 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon May 18 09:32:22 2020 +0200| [4a144b479c6f050d684af61673e2774a64b9551c] | committer: Nicolas Pomepuy

Fix ML crash due to bad blacklist url encoding

> https://code.videolan.org/videolan/vlc-android/commit/4a144b479c6f050d684af61673e2774a64b9551c
---

 application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt   | 4 ++--
 .../src/org/videolan/medialibrary/interfaces/Medialibrary.java        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
index e8f8d1601..5fa9a21b9 100644
--- a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -106,7 +106,7 @@ class MediaParsingService : LifecycleService(), DevicesDiscoveryCb {
         }
     } else if (BuildConfig.DEBUG) Medialibrary.MedialibraryExceptionHandler { context, errMsg, _ ->
         throw IllegalStateException("$context:\n$errMsg")
-    } else null
+    } else  null
 
     override fun attachBaseContext(newBase: Context?) {
         super.attachBaseContext(newBase?.getContextWithLocale(AppContextProvider.locale))
@@ -293,7 +293,7 @@ class MediaParsingService : LifecycleService(), DevicesDiscoveryCb {
             }
             upgrade -> {
                 medialibrary.unbanFolder("${AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY}/WhatsApp/")
-                medialibrary.banFolder("${AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY}/WhatsApp/Media/WhatsApp Animated Gifs/")
+                medialibrary.banFolder("${AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY}/WhatsApp/Media/WhatsApp%20Animated%20Gifs/")
             }
             settings.getBoolean(KEY_MEDIALIBRARY_AUTO_RESCAN, true) -> reload(null)
             else -> exitCommand()
diff --git a/medialibrary/src/org/videolan/medialibrary/interfaces/Medialibrary.java b/medialibrary/src/org/videolan/medialibrary/interfaces/Medialibrary.java
index 769c081c4..3b49d01be 100644
--- a/medialibrary/src/org/videolan/medialibrary/interfaces/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/interfaces/Medialibrary.java
@@ -176,7 +176,7 @@ abstract public class Medialibrary {
                 "/audio/alarms/",
                 "/audio/ringtones/",
                 "/audio/notifications/",
-                "/WhatsApp/Media/WhatsApp Animated Gifs/",
+                "/WhatsApp/Media/WhatsApp%20Animated%20Gifs/",
         };
     }
 



More information about the Android mailing list