From 51287dae54a9377ab86eb07671e2272c5225be1b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 24 Jan 2022 21:51:47 +0530 Subject: [PATCH] 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) --- src/calibre/gui2/actions/view.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/actions/view.py b/src/calibre/gui2/actions/view.py index e75d42f5a5..a06152766a 100644 --- a/src/calibre/gui2/actions/view.py +++ b/src/calibre/gui2/actions/view.py @@ -148,6 +148,9 @@ class ViewAction(InterfaceAction): 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.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): if job.failed: