Show an error when viewing a specific format and the file is missing. Fixes #1958882 [Format present in metadata, but missing file: clicking on format to open e-book reader does nothing](https://bugs.launchpad.net/calibre/+bug/1958882)

This commit is contained in:
Kovid Goyal 2022-01-24 21:51:47 +05:30
parent a107534286
commit 51287dae54
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -148,6 +148,9 @@ class ViewAction(InterfaceAction):
title = db.title(id_, index_is_id=True) title = db.title(id_, index_is_id=True)
self._view_file(fmt_path, calibre_book_data=self.calibre_book_data(id_, format), open_at=open_at) self._view_file(fmt_path, calibre_book_data=self.calibre_book_data(id_, format), open_at=open_at)
self.update_history([(id_, title)]) self.update_history([(id_, title)])
else:
error_dialog(self.gui, _('E-book file missing'), _(
'The {} format file is missing from the calibre library folder').format(format), show=True)
def book_downloaded_for_viewing(self, job): def book_downloaded_for_viewing(self, job):
if job.failed: if job.failed: