mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Blacklist versions of the DeDRM plugin older than 10.0.3 on macOS as they cause crashes
This commit is contained in:
parent
8478773194
commit
6b585c49fb
@ -20,7 +20,7 @@ from calibre.ebooks.metadata import MetaInformation
|
||||
from calibre.utils.config import (make_config_dir, Config, ConfigProxy,
|
||||
plugin_dir, OptionParser)
|
||||
from calibre.ebooks.metadata.sources.base import Source
|
||||
from calibre.constants import DEBUG, numeric_version, system_plugins_loc
|
||||
from calibre.constants import DEBUG, numeric_version, system_plugins_loc, ismacos
|
||||
from polyglot.builtins import iteritems, itervalues
|
||||
|
||||
builtin_names = frozenset(p.name for p in builtin_plugins)
|
||||
@ -667,6 +667,10 @@ _initialized_plugins = []
|
||||
|
||||
|
||||
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:
|
||||
p = plugin(path_to_zip_file)
|
||||
p.installation_type = installation_type
|
||||
|
Loading…
x
Reference in New Issue
Block a user