mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Shutdown the metadata backup thread before running a db integrity check
This commit is contained in:
parent
c32128ef79
commit
c63b551150
@ -72,7 +72,7 @@ class BooksModel(QAbstractTableModel): # {{{
|
|||||||
'publisher' : _("Publisher"),
|
'publisher' : _("Publisher"),
|
||||||
'tags' : _("Tags"),
|
'tags' : _("Tags"),
|
||||||
'series' : _("Series"),
|
'series' : _("Series"),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, parent=None, buffer=40):
|
def __init__(self, parent=None, buffer=40):
|
||||||
QAbstractTableModel.__init__(self, parent)
|
QAbstractTableModel.__init__(self, parent)
|
||||||
|
@ -106,8 +106,14 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
d.exec_()
|
d.exec_()
|
||||||
|
|
||||||
def compact(self, *args):
|
def compact(self, *args):
|
||||||
d = CheckIntegrity(self.gui.library_view.model().db, self)
|
from calibre.library.caches import MetadataBackup
|
||||||
|
m = self.gui.library_view.model()
|
||||||
|
if m.metadata_backup is not None:
|
||||||
|
m.metadata_backup.stop()
|
||||||
|
d = CheckIntegrity(m.db, self)
|
||||||
d.exec_()
|
d.exec_()
|
||||||
|
m.metadata_backup = MetadataBackup(m.db)
|
||||||
|
m.metadata_backup.start()
|
||||||
|
|
||||||
def open_config_dir(self, *args):
|
def open_config_dir(self, *args):
|
||||||
from calibre.utils.config import config_dir
|
from calibre.utils.config import config_dir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user