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

Allow all supported characters in ML strings

parent 1b29a336
......@@ -113,7 +113,7 @@ public class Medialibrary {
}
public boolean addDevice(@NonNull String uuid, @NonNull String path, boolean removable) {
return nativeAddDevice(VLCUtil.encodeVLCString(uuid), Tools.encodeVLCMrl(path), removable);
return nativeAddDevice(Tools.encodeVLCMrl(uuid), Tools.encodeVLCMrl(path), removable);
}
public void discover(@NonNull String path) {
......@@ -137,7 +137,7 @@ public class Medialibrary {
}
public boolean removeDevice(String uuid) {
return mIsInitiated && !TextUtils.isEmpty(uuid) && nativeRemoveDevice(VLCUtil.encodeVLCString(uuid));
return mIsInitiated && !TextUtils.isEmpty(uuid) && nativeRemoveDevice(Tools.encodeVLCMrl(uuid));
}
@Override
......@@ -263,7 +263,7 @@ public class Medialibrary {
}
public boolean addToHistory(String mrl, String title) {
return mIsInitiated && nativeAddToHistory(Tools.encodeVLCMrl(mrl), VLCUtil.encodeVLCString(title));
return mIsInitiated && nativeAddToHistory(Tools.encodeVLCMrl(mrl), Tools.encodeVLCMrl(title));
}
@Nullable
......
......@@ -6,7 +6,6 @@ import android.os.Environment;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import org.videolan.libvlc.util.VLCUtil;
import org.videolan.medialibrary.media.MediaLibraryItem;
import org.videolan.medialibrary.media.MediaWrapper;
......@@ -126,6 +125,6 @@ public class Tools {
static String encodeVLCMrl(String mrl) {
if (mrl.startsWith("/")) mrl = "file://"+mrl;
return VLCUtil.encodeVLCString(Uri.encode(Uri.decode(mrl), ":/@"));
return Uri.encode(Uri.decode(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