[Android] Fix Uri encoding in Medialibrary.getMedia()

Geoffrey Métais git at videolan.org
Mon Jan 22 16:29:08 CET 2018


vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 22 16:28:34 2018 +0100| [2bc90998decba8f5a8bb9c70d9d9f0a75645dce0] | committer: Geoffrey Métais

Fix Uri encoding in Medialibrary.getMedia()

> https://code.videolan.org/videolan/vlc-android/commit/2bc90998decba8f5a8bb9c70d9d9f0a75645dce0
---

 medialibrary/src/org/videolan/medialibrary/Medialibrary.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
index 3ec20e529..894cedbcc 100644
--- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
@@ -269,7 +269,7 @@ public class Medialibrary {
 
     @Nullable
     public MediaWrapper getMedia(Uri uri) {
-        final String vlcMrl = Tools.encodeVLCMrl(uri.toString());
+        final String vlcMrl = Tools.encodeVLCMrl(Uri.decode(uri.toString()));
         return mIsInitiated && !TextUtils.isEmpty(vlcMrl) ? nativeGetMediaFromMrl(vlcMrl) : null;
     }
 



More information about the Android mailing list