mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix:捕捉插件停止异常
This commit is contained in:
+9
-6
@@ -295,12 +295,15 @@ class PluginManager(metaclass=Singleton):
|
|||||||
停止插件
|
停止插件
|
||||||
:param plugin: 插件实例
|
:param plugin: 插件实例
|
||||||
"""
|
"""
|
||||||
# 关闭数据库
|
try:
|
||||||
if hasattr(plugin, "close"):
|
# 关闭数据库
|
||||||
plugin.close()
|
if hasattr(plugin, "close"):
|
||||||
# 关闭插件
|
plugin.close()
|
||||||
if hasattr(plugin, "stop_service"):
|
# 关闭插件
|
||||||
plugin.stop_service()
|
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):
|
def remove_plugin(self, plugin_id: str):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user