movie.py: handle missing version/part/language/extension

This commit is contained in:
rolux 2012-08-22 12:22:12 +02:00
parent def5c8dabd
commit 2c616e2c52

View file

@ -64,8 +64,11 @@ def parse_item_files(files):
# as returned by parse_path, but extended with 'originalPath' and 'time')
def get_file_key(file):
return '\n'.join([
file['version'], file['part'], file['language'], file['extension']]
)
file['version'] or '',
file['part'] or '',
file['language'] or '',
file['extension'] or ''
])
def get_version_key(file, extension=True):
return '%s.%s-part.%s' % (
file['version'],