Improve epub parsing, Table View for main library

This commit is contained in:
BasioMeusPuga
2017-11-27 02:18:09 +05:30
parent 255c5230b3
commit 75a851e62b
7 changed files with 203 additions and 83 deletions

View File

@@ -132,13 +132,18 @@ class BookSorter:
# None values are accounted for here
book_ref.read_book()
if book_ref.book:
title = book_ref.get_title().title()
author = book_ref.get_author()
if not author:
author = 'Unknown'
year = book_ref.get_year()
if not year:
try:
year = int(book_ref.get_year())
except (TypeError, ValueError):
year = 9999
isbn = book_ref.get_isbn()
# Different modes require different values