From b8c885f0aac4b72f2077f3c93c2be4211fcc8c23 Mon Sep 17 00:00:00 2001 From: Omelette Du Fromage Date: Tue, 10 Sep 2024 15:55:25 -0400 Subject: [PATCH] Add algo to force encoding in lowercase for WebDAV compatibility --- jellyfin_kodi/helper/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jellyfin_kodi/helper/api.py b/jellyfin_kodi/helper/api.py index 0218cff1..96c0e52e 100644 --- a/jellyfin_kodi/helper/api.py +++ b/jellyfin_kodi/helper/api.py @@ -4,6 +4,7 @@ from __future__ import division, absolute_import, print_function, unicode_litera ################################################################################################## from requests.utils import requote_uri +import re from . import settings, LazyLogger @@ -233,6 +234,11 @@ class API(object): if protocol.lower() in ("http", "https", "ftp", "ftps", "dav", "davs"): path = requote_uri(path) + pattern = "%[A-Z,0-9][A-Z,0-9]" + result = set(re.findall(pattern,path)) + + for r in result: + path = path.replace(r,r.lower()) return path