mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Move the DeDRM plugin blacklist so that the plugin is initialized by not actually used as a filetype plugin
This commit is contained in:
parent
b256801599
commit
adea378269
@ -137,6 +137,9 @@ def reread_filetype_plugins():
|
|||||||
|
|
||||||
for plugin in _initialized_plugins:
|
for plugin in _initialized_plugins:
|
||||||
if isinstance(plugin, FileTypePlugin):
|
if isinstance(plugin, FileTypePlugin):
|
||||||
|
if ismacos and plugin.name == 'DeDRM' and plugin.version < (10, 0, 3):
|
||||||
|
print(f'Blacklisting the {plugin.name} plugin as it is too old and causes crashes', file=sys.stderr)
|
||||||
|
continue
|
||||||
for ft in plugin.file_types:
|
for ft in plugin.file_types:
|
||||||
if plugin.on_import:
|
if plugin.on_import:
|
||||||
_on_import[ft].append(plugin)
|
_on_import[ft].append(plugin)
|
||||||
@ -667,10 +670,6 @@ _initialized_plugins = []
|
|||||||
|
|
||||||
|
|
||||||
def initialize_plugin(plugin, path_to_zip_file, installation_type):
|
def initialize_plugin(plugin, path_to_zip_file, installation_type):
|
||||||
if ismacos and plugin.name == 'DeDRM' and plugin.version < (10, 0, 3):
|
|
||||||
raise InvalidPlugin(_(
|
|
||||||
'Blacklisting the {0} version {1} plugin as it is too old and causes crashes. Update it to the latest version to use it.'
|
|
||||||
).format(plugin.name, plugin.version))
|
|
||||||
try:
|
try:
|
||||||
p = plugin(path_to_zip_file)
|
p = plugin(path_to_zip_file)
|
||||||
p.installation_type = installation_type
|
p.installation_type = installation_type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user