mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-10-14 12:52:04 +00:00
Add algo to force encoding in lowercase for WebDAV compatibility
This commit is contained in:
parent
69f44d6722
commit
b8c885f0aa
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue