mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Nicer error message when a book being converted is deleted from the library
This commit is contained in:
parent
4e8fbeae22
commit
0ebd793d61
@ -246,6 +246,10 @@ class ConvertAction(InterfaceAction):
|
|||||||
if job.failed:
|
if job.failed:
|
||||||
self.gui.job_exception(job)
|
self.gui.job_exception(job)
|
||||||
return
|
return
|
||||||
|
db = self.gui.current_db
|
||||||
|
if not db.new_api.has_id(book_id):
|
||||||
|
return error_dialog(self.gui, _('Book deleted'), _(
|
||||||
|
'The book you were trying to convert has been deleted from the calibre library.'), show=True)
|
||||||
same_fmt = getattr(job, 'conversion_of_same_fmt', False)
|
same_fmt = getattr(job, 'conversion_of_same_fmt', False)
|
||||||
manually_fine_tune_toc = getattr(job, 'manually_fine_tune_toc', False)
|
manually_fine_tune_toc = getattr(job, 'manually_fine_tune_toc', False)
|
||||||
fmtf = temp_files[-1].name
|
fmtf = temp_files[-1].name
|
||||||
@ -253,7 +257,6 @@ class ConvertAction(InterfaceAction):
|
|||||||
raise Exception(_('Empty output file, '
|
raise Exception(_('Empty output file, '
|
||||||
'probably the conversion process crashed'))
|
'probably the conversion process crashed'))
|
||||||
|
|
||||||
db = self.gui.current_db
|
|
||||||
if same_fmt and tweaks['save_original_format']:
|
if same_fmt and tweaks['save_original_format']:
|
||||||
db.save_original_format(book_id, fmt, notify=False)
|
db.save_original_format(book_id, fmt, notify=False)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user