mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Also allow restoring notes to work with notes backed up before the restore fix
This commit is contained in:
parent
d94eff1f48
commit
5785023722
@ -498,8 +498,13 @@ class Notes:
|
||||
errors.append(_('Failed to read from document for {path} with error: {error}').format(path=f'{field}:{old_item_id}', error=e))
|
||||
report_progress('', i)
|
||||
continue
|
||||
parts = raw.split(SEP, 3)
|
||||
try:
|
||||
doc, searchable_text, res, old_item_val = (str(x, 'utf-8') for x in raw.split(SEP, 3))
|
||||
if len(parts) == 4:
|
||||
doc, searchable_text, res, old_item_val = (str(x, 'utf-8') for x in parts)
|
||||
else:
|
||||
doc, searchable_text, res = (str(x, 'utf-8') for x in parts)
|
||||
old_item_val = searchable_text.split('\n')[0]
|
||||
except Exception as err:
|
||||
errors.append(_('Failed to parse document for: {0} with error: {1}').format(old_item_id, err))
|
||||
report_progress('', i)
|
||||
|
@ -20,7 +20,7 @@ class DBRestore(QDialog):
|
||||
self.l = QVBoxLayout()
|
||||
self.setLayout(self.l)
|
||||
self.l1 = QLabel('<b>'+_('Restoring database from backups, do not'
|
||||
' interrupt, this will happen in three stages')+'...')
|
||||
' interrupt, this will happen in multiple stages')+'...')
|
||||
self.setWindowTitle(_('Restoring database'))
|
||||
self.l.addWidget(self.l1)
|
||||
self.pb = QProgressBar(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user