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.
This commit is contained in:
Kovid Goyal 2025-02-28 10:23:06 +05:30
parent 834b2fc8d8
commit 684a57ccb3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -782,6 +782,12 @@ def initialize_plugins(perf=False):
for p in system_conflicts: for p in system_conflicts:
system_plugins.pop(p, None) system_plugins.pop(p, None)
external_plugins = config['plugins'].copy() 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: for name in BLACKLISTED_PLUGINS:
external_plugins.pop(name, None) external_plugins.pop(name, None)
system_plugins.pop(name, None) system_plugins.pop(name, None)