Tag generation stopgap

This commit is contained in:
BasioMeusPuga
2019-08-26 17:42:56 -07:00
parent 2bc73450fe
commit fd433d6432

View File

@@ -61,9 +61,13 @@ class Library:
books = [] books = []
current_qdatetime = QtCore.QDateTime().currentDateTime() current_qdatetime = QtCore.QDateTime().currentDateTime()
for i in parsed_books.items(): for i in parsed_books.items():
_tags = i[1]['tags'] try:
if _tags: _tags = i[1]['tags']
_tags = ', '.join([j for j in _tags if j]) if _tags:
_tags = ', '.join([j for j in _tags if j])
except: # Continuing seems more important than being correct
_tags = []
logger.warning('Tag generation error for: ' + i[1]['path'])
books.append([ books.append([
i[1]['title'], i[1]['author'], i[1]['year'], current_qdatetime, i[1]['title'], i[1]['author'], i[1]['year'], current_qdatetime,