not all filesystems use NFD, normalize to NFD, fixes #2553
This commit is contained in:
parent
f5770f12d1
commit
7addf13c90
1 changed files with 2 additions and 4 deletions
|
@ -188,8 +188,6 @@ def parse_path(path, directory_key='director'):
|
|||
|
||||
# TODO: '.com.avi'
|
||||
'''
|
||||
def parse_title(string):
|
||||
return title, year
|
||||
def parse_type(string):
|
||||
for type in EXTENSIONS:
|
||||
if string in EXTENSIONS[type]:
|
||||
|
@ -210,7 +208,7 @@ def parse_path(path, directory_key='director'):
|
|||
string = re.sub('(?<=\w)_ ', ': ', string)
|
||||
return string
|
||||
data = {}
|
||||
parts = map(lambda x: parse_underscores(x.strip()), path.split('/'))
|
||||
parts = map(lambda x: parse_underscores(x.strip()), unicodedata.normalize('NFD', path).split('/'))
|
||||
# subdirectory
|
||||
if len(parts) > 4:
|
||||
data['subdirectory'] = '/'.join(parts[3:-1])
|
||||
|
@ -327,7 +325,7 @@ def parse_movie_path(path):
|
|||
"""
|
||||
episodeTitle = episodeYear = seriesTitle = None
|
||||
episodeDirector = []
|
||||
parts = path.split('/')
|
||||
parts = unicodedata.normalize('NFD', path).split('/')
|
||||
|
||||
#title/year
|
||||
if len(parts) == 4:
|
||||
|
|
Loading…
Reference in a new issue