refactor(config): 设备能力/外部服务/阈值等硬编码收敛到 config.ini(P0+P1)
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
|
||||
import shutil
|
||||
import subprocess
|
||||
from core import config
|
||||
from .exceptions import MediaDependencyError
|
||||
from .logger import log # 💡 引入日志
|
||||
|
||||
def check_dependencies():
|
||||
"""检查系统依赖是否已正确安装"""
|
||||
tools = ['ffmpeg', 'ffprobe', 'mkvpropedit', 'mediainfo']
|
||||
"""检查系统依赖是否已正确安装(列表见 config.ini [System] required_tools)"""
|
||||
tools = list(config.REQUIRED_TOOLS)
|
||||
log.debug(f"正在检查系统依赖: {', '.join(tools)}")
|
||||
|
||||
missing = [tool for tool in tools if not shutil.which(tool)]
|
||||
|
||||
Reference in New Issue
Block a user