Uri encoding for local filenames. (#710)
* Uri encoding for local filenames. Kodi should now be able to play http-served files with spaces or other special characters in their name. * Uri encoding for local files served with "share with Kore".
This commit is contained in:
parent
e63fd40d9f
commit
571e3ceae8
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue