mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
ac1cf11862
commit
ccae5e79d4
@ -2795,6 +2795,11 @@ books_series_link feeds
|
|||||||
for id, title, script in self.conn.get('SELECT id,title,script FROM feeds'):
|
for id, title, script in self.conn.get('SELECT id,title,script FROM feeds'):
|
||||||
yield id, title, script
|
yield id, title, script
|
||||||
|
|
||||||
|
def reconnect(self):
|
||||||
|
'Used to reconnect after calling self.conn.close()'
|
||||||
|
self.connect()
|
||||||
|
self.initialize_dynamic()
|
||||||
|
self.refresh()
|
||||||
|
|
||||||
def check_integrity(self, callback):
|
def check_integrity(self, callback):
|
||||||
callback(0., _('Checking SQL integrity...'))
|
callback(0., _('Checking SQL integrity...'))
|
||||||
@ -2830,9 +2835,7 @@ books_series_link feeds
|
|||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
shutil.copyfile(dest, self.dbpath)
|
shutil.copyfile(dest, self.dbpath)
|
||||||
self.connect()
|
self.reconnect()
|
||||||
self.initialize_dynamic()
|
|
||||||
self.refresh()
|
|
||||||
if os.path.exists(dest):
|
if os.path.exists(dest):
|
||||||
os.remove(dest)
|
os.remove(dest)
|
||||||
callback(0.1, _('Checking for missing files.'))
|
callback(0.1, _('Checking for missing files.'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user