dont add empty subtitle

This commit is contained in:
j 2016-01-09 16:11:04 +05:30
parent f57b75ac03
commit 094097b26d
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ def info(key, value):
'publishedDate': 'date',
}.get(key,key)] = _data[key]
if 'subtitle' in _data:
if 'subtitle' in _data and _data['subtitle'].strip():
data['title'] = '{title}: {subtitle}'.format(**_data)
if r['items'][0]['accessInfo']['viewability'] != 'NO_PAGES':
data['cover'] = 'https://books.google.com/books?id=%s&pg=PP1&img=1&zoom=0&hl=en' % r['items'][0]['id']