From 8eb05c2a69340f9afc10c964882d2e71b658a972 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 5 Jul 2021 08:06:42 +0530 Subject: [PATCH] Fix empty cover browser caption template handling --- src/calibre/gui2/cover_flow.py | 2 +- src/calibre/gui2/preferences/look_feel.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/cover_flow.py b/src/calibre/gui2/cover_flow.py index 4dcf190bcf..0c8bcd696e 100644 --- a/src/calibre/gui2/cover_flow.py +++ b/src/calibre/gui2/cover_flow.py @@ -98,7 +98,7 @@ class DatabaseImages(pictureflow.FlowImages): def init_template(self, db): self.template_cache = {} self.template_error_reported = False - self.template = db.pref('cover_browser_title_template', '{title}') + self.template = db.pref('cover_browser_title_template', '{title}') or '' self.template_is_title = self.template == '{title}' self.template_is_empty = not self.template.strip() diff --git a/src/calibre/gui2/preferences/look_feel.ui b/src/calibre/gui2/preferences/look_feel.ui index 6e7867e60d..6a3df6ce04 100644 --- a/src/calibre/gui2/preferences/look_feel.ui +++ b/src/calibre/gui2/preferences/look_feel.ui @@ -1193,7 +1193,7 @@ using the mouse.</p> - The template used to generate the text below the covers. Uses the same syntax as save templates. Defaults to just the book title. Note that this setting is per-library, which means that you have to set it again for every different calibre library you use. + The template used to generate the text below the covers. Uses the same syntax as save templates. Defaults to just the book title. Note that this setting is per-library, which means that you have to set it again for every different calibre library you use. Use an empty template for no text.