import json
for tag, segid, ci in [("05","E05-08",3),("08","E08-07",3),("04","E04-03",3),("06","E06-07",2),("11","E11-01",3)]:
    ep = json.load(open("小说2/storyboard-work/ep-%s.json"%tag, encoding="utf-8"))
    seg = next((s for s in ep["segments"] if s["id"]==segid), None)
    if not seg: print(tag, segid, "MISSING"); continue
    c = seg["cuts"][ci-1]
    print("===", segid, "#%d beats=%s secs=%r" % (ci, c["beats"], c["seconds"]))
    # dlg from seed
    sc = next((x for x in ep["seedScenes"] if x["sceneIndex"]==seg["sceneIndex"]), None)
    if sc:
        dlg = sum(b["seconds"] for b in sc["beats"] if c["beats"][0] <= b["n"] <= c["beats"][1] and b.get("kind")=="line")
        print("   dlg(seed)=", dlg)
