escape uri of path in get_file_path for http, https, ftp, ftps, dav, davs

This change aims to import a working path into Kodi if the network shared path is using http, https, ftp, ftps, dav or davs protocol.
This commit is contained in:
Omelette Du Fromage 2023-11-28 19:32:17 -05:00
commit 62e8a46d95

View file

@ -3,6 +3,8 @@ from __future__ import division, absolute_import, print_function, unicode_litera
##################################################################################################
from requests.utils import requote_uri
from . import settings, LazyLogger
##################################################################################################
@ -213,6 +215,9 @@ class API(object):
protocol = path.split('://')[0]
path = path.replace(protocol, protocol.lower())
if protocol.lower() in ("http", "https", "ftp", "ftps", "dav", "davs"):
path = requote_uri(path)
return path
def get_user_artwork(self, user_id):