fix(preflight): 报告只在整库扫描且有非 READY 时落盘
This commit is contained in:
@@ -305,10 +305,14 @@ class PreflightService:
|
||||
# ------------------------------------------------------------------ 报告
|
||||
|
||||
@classmethod
|
||||
def write_report(cls, root: Path, results: list) -> Path | None:
|
||||
def write_report(cls, root: Path, results: list, only_issues: bool = False) -> Path | None:
|
||||
"""results: [(path, PreflightResult)],输出 root/preflight_report.csv"""
|
||||
if not config.PREFLIGHT_REPORT or not results:
|
||||
return None
|
||||
if only_issues:
|
||||
results = [(p, r) for p, r in results if r.verdict != READY]
|
||||
if not results:
|
||||
return None
|
||||
report = root / "preflight_report.csv"
|
||||
header = "path,verdict,codec,height,mbps,dv_profile,audio_codecs,sub_codecs,actions,reasons\n"
|
||||
lines = [header]
|
||||
|
||||
Reference in New Issue
Block a user