Fix empty cover browser caption template handling

This commit is contained in:
Kovid Goyal 2021-07-05 08:06:42 +05:30
parent 16ca7f1987
commit 8eb05c2a69
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -1193,7 +1193,7 @@ using the mouse.&lt;/p&gt;</string>
<item row="7" column="1">
<widget class="QLineEdit" name="opt_cover_browser_title_template">
<property name="toolTip">
<string>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.</string>
<string>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.</string>
</property>
</widget>
</item>