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

Geoffrey Métais git at videolan.org
Thu Jan 25 10:32:35 CET 2018


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

Fix Uri encoding in Medialibrary.getMedia()

> https://code.videolan.org/videolan/vlc-android/commit/0da85b0002e00b35011de8b1e5ba7162ce05c52c
---

 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 5d278ab55..182a22b0b 100644
--- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
@@ -271,7 +271,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