[Android] Fix folder path encoding in medialibrary settings

Geoffrey Métais git at videolan.org
Wed Feb 21 11:27:37 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb 21 11:26:47 2018 +0100| [3e7196da34838be68e176ee0f2948def165a9277] | committer: Geoffrey Métais

Fix folder path encoding in medialibrary settings

> https://code.videolan.org/videolan/vlc-android/commit/3e7196da34838be68e176ee0f2948def165a9277
---

 .../src/org/videolan/vlc/gui/helpers/MedialibraryUtils.java        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/MedialibraryUtils.java b/vlc-android/src/org/videolan/vlc/gui/helpers/MedialibraryUtils.java
index ed8e0590b..786a7d3b8 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/MedialibraryUtils.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/MedialibraryUtils.java
@@ -2,6 +2,7 @@ package org.videolan.vlc.gui.helpers;
 
 
 import android.content.Intent;
+import android.net.Uri;
 
 import org.videolan.vlc.MediaParsingService;
 import org.videolan.vlc.VLCApplication;
@@ -13,14 +14,14 @@ public class MedialibraryUtils {
         VLCApplication.runBackground(new Runnable() {
             @Override
             public void run() {
-                VLCApplication.getMLInstance().removeFolder(path);
+                VLCApplication.getMLInstance().removeFolder(Uri.decode(path));
             }
         });
     }
 
     public static void addDir(final String path) {
-        Intent intent = new Intent(Constants.ACTION_DISCOVER, null, VLCApplication.getAppContext(), MediaParsingService.class);
-        intent.putExtra(Constants.EXTRA_PATH, path);
+        final Intent intent = new Intent(Constants.ACTION_DISCOVER, null, VLCApplication.getAppContext(), MediaParsingService.class);
+        intent.putExtra(Constants.EXTRA_PATH, Uri.decode(path));
         VLCApplication.getAppContext().startService(intent);
     }
 }



More information about the Android mailing list