Changes to database
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
sqlite3 for storing metadata
|
||||
sqlite3 for caching files open @ time of exit
|
||||
sqlite3 for cover images cache
|
||||
Use format* icons for toolbar buttons
|
||||
Information dialog widget
|
||||
Check file hashes upon restart
|
||||
Recursive file addition
|
||||
@@ -103,8 +104,8 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
|
||||
def populatelist(self):
|
||||
self.listView.setWindowTitle('huh')
|
||||
|
||||
# The QlistView widget needs to be populated with a model that
|
||||
# inherits from QStandardItemModel
|
||||
# The QlistView widget needs to be populated
|
||||
# with a model that inherits from QStandardItemModel
|
||||
model = QtGui.QStandardItemModel()
|
||||
|
||||
# Get the list of images from here
|
||||
@@ -224,6 +225,7 @@ class Tabs:
|
||||
|
||||
|
||||
class Database:
|
||||
# This is maybe, possibly, redundant
|
||||
def __init__(self, parent):
|
||||
self.parent_window = parent
|
||||
self.database_path = QtCore.QStandardPaths.writableLocation(
|
||||
|
@@ -18,4 +18,10 @@ class DatabaseFunctions:
|
||||
self.database.execute(
|
||||
"CREATE TABLE books \
|
||||
(id INTEGER PRIMARY KEY, Name TEXT, Path TEXT, ISBN 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()
|
||||
|
Reference in New Issue
Block a user