diff --git a/__main__.py b/__main__.py index e5ec904..7cbec0a 100755 --- a/__main__.py +++ b/__main__.py @@ -14,7 +14,7 @@ ✓ Image reflow ✓ Search bar in toolbar ✓ Shift focus to the tab that has the book open - Tie file deletion and tab closing to model updates + ✓ Tie file deletion and tab closing to model updates ? Create emblem per filetype Look into how you might group icons Ignore a / the / numbers for sorting purposes @@ -33,8 +33,8 @@ ✓ Theming ✓ Keep fontsize and margins consistent - Let page increase in length ✓ Fullscreening + ✓ Remember open tabs Record progress - All ebooks should first be added to the database and then returned as HTML Pagination Set context menu for definitions and the like Filetypes: @@ -50,7 +50,7 @@ Get ISBN using python-isbnlib Other: ✓ Define every widget in code - ? Include icons for emblems + ✓ Include icons for emblems """ import sys diff --git a/database.py b/database.py index 36b5114..531ea57 100644 --- a/database.py +++ b/database.py @@ -19,12 +19,6 @@ class DatabaseInit: "CREATE TABLE books \ (id INTEGER PRIMARY KEY, Title TEXT, Author TEXT, Year INTEGER, \ Path TEXT, Position BLOB, ISBN TEXT, Tags TEXT, Hash TEXT, CoverImage BLOB)") - self.database.execute( - "CREATE TABLE cache \ - (id INTEGER PRIMARY KEY, Name TEXT, Path TEXT, CachedDict BLOB)") - # It's assumed that any cached books will be pickled and put into the - # database at time of closing - self.database.commit() self.database.close() @@ -53,14 +47,14 @@ class DatabaseFunctions: sql_command_add = ( "INSERT INTO books (Title,Author,Year,Path,ISBN,Hash,CoverImage) VALUES(?, ?, ?, ?, ?, ?, ?)") - # TODO - # This is a placeholder. You will need to generate book covers - # in case none are found + cover_insert = None if cover: - self.database.execute( - sql_command_add, - [title, author, year, - path, isbn, book_hash, sqlite3.Binary(cover)]) + cover_insert = sqlite3.Binary(cover) + + self.database.execute( + sql_command_add, + [title, author, year, + path, isbn, book_hash, cover_insert]) self.database.commit() self.close_database() diff --git a/parsers/cbz.py b/parsers/cbz.py index 0a2642c..d917f65 100644 --- a/parsers/cbz.py +++ b/parsers/cbz.py @@ -8,8 +8,6 @@ import collections class ParseCBZ: def __init__(self, filename, temp_dir, file_md5): - # TODO - # Maybe also include book description self.filename = filename self.book = None self.temp_dir = temp_dir diff --git a/parsers/epub.py b/parsers/epub.py index 436ab20..db9fb37 100644 --- a/parsers/epub.py +++ b/parsers/epub.py @@ -48,11 +48,6 @@ class ParseEPUB: return None def get_cover_image(self): - # TODO - # Generate a cover image in case one isn't found - # This has to be done or the database module will - # error out - # Get cover image # This seems hack-ish, but that's never stopped me before image_path = None diff --git a/settings.py b/settings.py index 45899b7..e24bdde 100644 --- a/settings.py +++ b/settings.py @@ -87,9 +87,6 @@ class Settings: self.settings.setValue('currentProfileIndex', current_profile_index) self.settings.endGroup() - # TODO - # Last open order - # Last open highlighted current_tab_index = self.parent_window.tabWidget.currentIndex() if current_tab_index == 0: last_open_tab = 'library'