Fix transient error during startup when using subtititle templates in the cover browser

This commit is contained in:
Kovid Goyal 2017-11-08 07:23:43 +05:30
parent 07395c8c3a
commit b95d0a537d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -133,6 +133,8 @@ if pictureflow is not None:
def subtitle(self, index): def subtitle(self, index):
try: try:
db = self.model.db.new_api db = self.model.db.new_api
if not self.template_inited:
self.init_template(db)
field = db.pref('cover_browser_subtitle_field', 'rating') field = db.pref('cover_browser_subtitle_field', 'rating')
if field and field != 'none': if field and field != 'none':
book_id = self.model.id(index) book_id = self.model.id(index)