fix empty author

This commit is contained in:
j 2015-12-24 19:07:36 +05:30
parent 96a3cdb4b2
commit ccd3b166d0
1 changed files with 2 additions and 2 deletions

View File

@ -72,8 +72,8 @@ def metadata(f, from_=None):
data['author'] = data['author'].strip().split('; ')
else:
del data['author']
if data['author'] in (['Administrator'], ['Default'], ['user']):
del data['author']
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]
if data['title'].startswith('Microsoft Word - '):