fix empty author
This commit is contained in:
parent
96a3cdb4b2
commit
ccd3b166d0
1 changed files with 2 additions and 2 deletions
|
@ -72,8 +72,8 @@ def metadata(f, from_=None):
|
||||||
data['author'] = data['author'].strip().split('; ')
|
data['author'] = data['author'].strip().split('; ')
|
||||||
else:
|
else:
|
||||||
del data['author']
|
del data['author']
|
||||||
if data['author'] in (['Administrator'], ['Default'], ['user']):
|
if 'author' in data and data['author'] in (['Administrator'], ['Default'], ['user']):
|
||||||
del data['author']
|
del data['author']
|
||||||
if not 'title' in data:
|
if not 'title' in data:
|
||||||
data['title'] = os.path.splitext(os.path.basename(f))[0]
|
data['title'] = os.path.splitext(os.path.basename(f))[0]
|
||||||
if data['title'].startswith('Microsoft Word - '):
|
if data['title'].startswith('Microsoft Word - '):
|
||||||
|
|
Loading…
Reference in a new issue