Skip to content

Commit 59d082d

Browse files
authored
Merge pull request #1652 from ims21/master
Fix crash in Movies on subdirectories with national chars in name
2 parents 0b874b9 + 22beb58 commit 59d082d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugin/controllers/models/movies.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import six
2727
from time import localtime, time
2828
from six.moves.urllib.parse import unquote
29+
import re
2930

3031
from enigma import eServiceReference, iServiceInformation, eServiceCenter
3132
from ServiceReference import ServiceReference
@@ -111,6 +112,11 @@ def getMovieList(rargs=None, locations=None):
111112
internal = None
112113
bookmarklist = []
113114

115+
if b'dirname' in rargs:
116+
decoded_str = rargs[b'dirname'][0].decode('latin-1')
117+
decoded_str = re.sub(r'%u([0-9A-Fa-f]{4})', lambda m: chr(int(m.group(1), 16)), decoded_str)
118+
rargs[b'dirname'][0] = decoded_str.encode('utf-8')
119+
114120
if rargs:
115121
tag = getUrlArg2(rargs, "tag")
116122
directory = getUrlArg2(rargs, "dirname")

0 commit comments

Comments
 (0)