mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-05 03:38:36 +08:00
fix:捕捉插件停止异常
This commit is contained in:
@@ -295,12 +295,15 @@ class PluginManager(metaclass=Singleton):
|
||||
停止插件
|
||||
:param plugin: 插件实例
|
||||
"""
|
||||
# 关闭数据库
|
||||
if hasattr(plugin, "close"):
|
||||
plugin.close()
|
||||
# 关闭插件
|
||||
if hasattr(plugin, "stop_service"):
|
||||
plugin.stop_service()
|
||||
try:
|
||||
# 关闭数据库
|
||||
if hasattr(plugin, "close"):
|
||||
plugin.close()
|
||||
# 关闭插件
|
||||
if hasattr(plugin, "stop_service"):
|
||||
plugin.stop_service()
|
||||
except Exception as e:
|
||||
logger.warn(f"停止插件 {plugin.get_name()} 时发生错误: {str(e)}")
|
||||
|
||||
def remove_plugin(self, plugin_id: str):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user