Implement Mark (un)Read functionality

This commit is contained in:
BasioMeusPuga
2018-03-06 23:10:03 +05:30
parent 45811b57cb
commit 710ec98c0a
6 changed files with 85 additions and 46 deletions

View File

@@ -114,20 +114,20 @@ class MetadataUI(QtWidgets.QDialog, metadata.Ui_Dialog):
book_item.setData(tags, QtCore.Qt.UserRole + 4)
book_item.setToolTip(tooltip_string)
if self.cover_for_database:
self.parent.cover_loader(
book_item, self.cover_for_database)
self.parent.lib_ref.update_proxymodels()
self.hide()
book_hash = book_item.data(QtCore.Qt.UserRole + 6)
database_dict = {
'Title': title,
'Author': author,
'Year': year,
'Tags': tags,
'CoverImage': self.cover_for_database}
'Tags': tags}
if self.cover_for_database:
database_dict['CoverImage'] = self.cover_for_database
self.parent.cover_loader(
book_item, self.cover_for_database)
self.parent.lib_ref.update_proxymodels()
self.hide()
database.DatabaseFunctions(self.database_path).modify_metadata(
database_dict, book_hash)