fix empty author

This commit is contained in:
j 2015-12-24 19:07:36 +05:30
parent 96a3cdb4b2
commit ccd3b166d0

View file

@ -72,7 +72,7 @@ def metadata(f, from_=None):
data['author'] = data['author'].strip().split('; ')
else:
del data['author']
if data['author'] in (['Administrator'], ['Default'], ['user']):
if 'author' in data and data['author'] in (['Administrator'], ['Default'], ['user']):
del data['author']
if not 'title' in data:
data['title'] = os.path.splitext(os.path.basename(f))[0]