From 684a57ccb396bb929b3adddd6aa3dd6884450ea8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 28 Feb 2025 10:23:06 +0530 Subject: [PATCH] If we detect the KoboTouchExtended plugin and the builtin KoboTouch plugin is disabled re-enable the builtin plugin This is so the Kobo device keeps working even for people that have disabled the builtin plugin. --- src/calibre/customize/ui.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/customize/ui.py b/src/calibre/customize/ui.py index 0c2c387414..c93f074bf5 100644 --- a/src/calibre/customize/ui.py +++ b/src/calibre/customize/ui.py @@ -782,6 +782,12 @@ def initialize_plugins(perf=False): for p in system_conflicts: system_plugins.pop(p, None) external_plugins = config['plugins'].copy() + + if 'KoboTouchExtended' in external_plugins and is_disabled('KoboTouch') and not is_disabled('KoboTouchExtended'): + # We remove KoboTouchExtended and re-enable KoboTouch so that the Kobo + # device keeps working even though KoboTouchExtended is blacklisted. + disable_plugin('KoboTouchExtended') + enable_plugin('KoboTouch') for name in BLACKLISTED_PLUGINS: external_plugins.pop(name, None) system_plugins.pop(name, None)