fix movie.parse_path, set language

This commit is contained in:
j 2013-02-17 20:09:48 +05:30
parent 340c7fb924
commit 5e989bcb19

View file

@ -298,7 +298,7 @@ def parse_path(path, directory_key='director'):
while data['partTitle'] and len(parts) and not re.search('^[a-z]{2}$', parts[0]):
data['partTitle'] += '.%s' % parts.pop(0)
# language
language = parts.pop(0) if len(parts) and re.search('^[a-z]{2}$', parts[0]) else None
data['language'] = parts.pop(0) if len(parts) and re.search('^[a-z]{2}$', parts[0]) else None
# extension
data['extension'] = re.sub('^mpeg$', 'mpg', extension.lower()) if extension else None
# type