Commit f853e2b8 authored by Geoffrey Métais's avatar Geoffrey Métais

Encode every mrl sent to medialibrary

parent e18a7944
......@@ -15,7 +15,6 @@ import android.support.v4.content.LocalBroadcastManager;
import android.text.TextUtils;
import android.util.Log;
import org.videolan.libvlc.LibVLC;
import org.videolan.libvlc.util.VLCUtil;
import org.videolan.medialibrary.interfaces.DevicesDiscoveryCb;
import org.videolan.medialibrary.interfaces.EntryPointsEventsCb;
......@@ -99,12 +98,12 @@ public class Medialibrary {
public void banFolder(@NonNull String path) {
if (mIsInitiated && new File(path).exists())
nativeBanFolder(Tools.encodeVLCMrl(Uri.encode(path, "/")));
nativeBanFolder(path);
}
public void unbanFolder(@NonNull String path) {
if (mIsInitiated && new File(path).exists())
nativeUnbanFolder(Tools.encodeVLCMrl(Uri.encode(path, "/")));
nativeUnbanFolder(path);
}
public String[] getDevices() {
......
......@@ -125,9 +125,9 @@ public class Tools {
return sb.toString();
}
public static String encodeVLCMrl(String mrl) {
static String encodeVLCMrl(String mrl) {
if (mrl.startsWith("/"))
mrl = "file://"+mrl;
return VLCUtil.encodeVLCString(mrl);
return VLCUtil.encodeVLCString(Uri.encode(mrl, ":/"));
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment