From 28e36d7efd312d2c3485bab48952186a568577c8 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 27 Dec 2020 22:24:37 +1100 Subject: [PATCH] Fix handling of subtitle option in KoboTouch driver --- src/calibre/devices/kobo/driver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 58988883ef..2a18a265e9 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -3557,13 +3557,13 @@ class KOBOTOUCH(KOBO): @property def update_subtitle(self): # Subtitle was added to the database at the same time as the series support. - return self.update_device_metadata and self.supports_series() and self.subtitle_template is not None + return self.update_device_metadata and self.supports_series() and self.get_pref('update_subtitle') @property def subtitle_template(self): + if not self.update_subtitle: + return None subtitle_template = self.get_pref('subtitle_template') - if subtitle_template is not None: - subtitle_template = subtitle_template.strip() subtitle_template = subtitle_template.strip() if subtitle_template is not None else None return subtitle_template