mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 16:36:53 +08:00
fix
This commit is contained in:
+4
-1
@@ -265,7 +265,6 @@ class PluginManager(metaclass=Singleton):
|
|||||||
|
|
||||||
# 导入模块
|
# 导入模块
|
||||||
module = importlib.import_module(module_name)
|
module = importlib.import_module(module_name)
|
||||||
importlib.reload(module)
|
|
||||||
|
|
||||||
# 检查模块中的类
|
# 检查模块中的类
|
||||||
for name, obj in module.__dict__.items():
|
for name, obj in module.__dict__.items():
|
||||||
@@ -411,6 +410,10 @@ class PluginManager(metaclass=Singleton):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
# 模块可能已经被删除
|
# 模块可能已经被删除
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
importlib.invalidate_caches()
|
||||||
|
logger.debug("已清除查找器的缓存")
|
||||||
|
|
||||||
if plugin_id:
|
if plugin_id:
|
||||||
if modules_to_remove:
|
if modules_to_remove:
|
||||||
logger.info(f"插件 {plugin_id} 共清除 {len(modules_to_remove)} 个模块缓存:{modules_to_remove}")
|
logger.info(f"插件 {plugin_id} 共清除 {len(modules_to_remove)} 个模块缓存:{modules_to_remove}")
|
||||||
|
|||||||
Reference in New Issue
Block a user