Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions mcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def diff_timelines(path_a: str, path_b: str) -> dict:
path_b: revised timeline file path.

Returns:
dict with keys: added, removed, retimed, moved, unchanged_count.
Each list holds clip records (name, media_url, source/timeline timing).
dict with keys: added, removed, retimed, moved, shifted, unchanged_count.
Each list holds clip records (name, media_url, source/timeline timing);
shifted records describe ripple-only timeline slides.
"""
result = diff(load(path_a), load(path_b))
return asdict(result)
Expand Down
9 changes: 9 additions & 0 deletions test_otio_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import opentimelineio as otio
import pytest
from pathlib import Path

from otio_diff import flatten_timeline, diff, load # noqa: F401

Expand Down Expand Up @@ -286,3 +287,11 @@ def test_load_serializable_collection(tmp_path, capsys):
recs = load(path)
assert len(recs) == 3 # the baseline timeline, not the 1-clip one
assert "2 timelines" in capsys.readouterr().err


def test_mcp_return_contract_mentions_shifted():
"""The MCP-facing tool description must stay aligned with DiffResult."""
text = Path("mcp_server.py").read_text(encoding="utf-8")

assert "shifted" in text
assert "added, removed, retimed, moved, shifted, unchanged_count" in text
Loading