diff --git a/app/src/main/java/org/xbmc/kore/ui/sections/localfile/HttpApp.java b/app/src/main/java/org/xbmc/kore/ui/sections/localfile/HttpApp.java index 0c6b77c..abab3c9 100644 --- a/app/src/main/java/org/xbmc/kore/ui/sections/localfile/HttpApp.java +++ b/app/src/main/java/org/xbmc/kore/ui/sections/localfile/HttpApp.java @@ -160,11 +160,11 @@ public class HttpApp extends NanoHTTPD { } String path = null; if (currentIsFile) { - path = localFileLocationList.get(currentIndex).fileName + "?number=" + currentIndex; + String filename = localFileLocationList.get(currentIndex).fileName; + path = Uri.encode(filename) + "?number=" + currentIndex; } else { - Uri uri = localUriList.get(currentIndex); - String filename = getFileNameFromUri(uri); - path = filename + "?uri=" + currentIndex; + String filename = getFileNameFromUri(localUriList.get(currentIndex)); + path = Uri.encode(filename) + "?uri=" + currentIndex; } return "http://" + ip + ":" + getListeningPort() + "/" + path + "&token=" + token; }