OUTPUT #728 | 2361 karakter | 63 satır
========== YENİ KOMUT | 17.09.2026 16:02:29 ==========


========== YENİ KOMUT | 17.09.2026 16:02:29 ==========

        item = dict(c)
        src = item.get("src")
        if isinstance(src, str) and src.strip():
            path = Path(src).expanduser()
            if path.exists():
                st = path.stat()
                item["_source_identity"] = {
                    "path": str(path.resolve()),
                    "size": st.st_size,
                    "mtime_ns": st.st_mtime_ns,
                }
            else:
                item["_source_identity"] = {"path": str(path), "missing": True}
        normalized.append(item)

    selected_casting = []
    for index, shot in enumerate(data.get("shots") or []):
        if not isinstance(shot, dict):
            continue
        kind = str(shot.get("type") or "").lower()
        origin = str(shot.get("source_origin") or "").strip().lower()
        src_value = shot.get("src")
        footage_backed = (
            "footage" in kind
            or (
                shot.get("materialized") is True
                and bool(origin)
                and not origin.startswith(("generated:", "synthetic:", "ai-generated:"))
                and isinstance(src_value, str)
                and Path(src_value).expanduser().suffix.lower() in {".mp4", ".mov", ".mkv", ".webm", ".m4v"}
            )
        )
        if not footage_backed:
            continue
        item = {
            "shot": index,
            "src": shot.get("src"),
            "source_origin": shot.get("source_origin"),
            "visual_goal": shot.get("visual_goal"),
            "in": shot.get("in", 0),
            "duration": shot.get("duration"),
            "casting": shot.get("casting"),
        }
        src = item.get("src")
        if isinstance(src, str) and src.strip():
            path = Path(src).expanduser()
            if path.exists():
                st = path.stat()
                item["_source_identity"] = {
                    "path": str(path.resolve()),
                    "size": st.st_size,
                    "mtime_ns": st.st_mtime_ns,
                }
            else:
                item["_source_identity"] = {"path": str(path), "missing": True}
        selected_casting.append(item)
root@213-238-170-219:~#