import json, os
missing = []
for ep in range(1,13):
    tag="%02d"%ep
    spf="小说2/storyboard-work/ep-%s-specs.json"%tag
    resf="小说2/storyboard-work/ep%s-results.json"%tag
    if not os.path.exists(spf) or not os.path.exists(resf): continue
    sp={s["seg"]:s for s in json.load(open(spf,encoding="utf-8"))["specs"]}
    res={s.get("id") for s in json.load(open(resf,encoding="utf-8")) if s and s.get("id")}
    for k in sp:
        if k not in res:
            missing.append({"ep":ep,"seg":k,"si":sp[k]["si"]})
print("missing:", len(missing))
for m in missing: print(" ", m["seg"], "sceneIndex", m["si"])
