diff --git a/src/scripto/core/scanner.py b/src/scripto/core/scanner.py index 664c0dc..18279ce 100644 --- a/src/scripto/core/scanner.py +++ b/src/scripto/core/scanner.py @@ -17,7 +17,8 @@ from .errors import OperationStopped -VIDEO_EXTENSIONS = {".mp4", ".mov", ".m4v", ".mkv", ".webm"} +VIDEO_EXTENSIONS = {".mp4", ".mov", ".m4v", ".mkv", ".webm", + ".ts", ".m2ts", ".mts"} # MPEG transport streams AUDIO_EXTENSIONS = {".mp3", ".m4a", ".wav", ".aac", ".flac"} DEFAULT_EXTENSIONS = VIDEO_EXTENSIONS | AUDIO_EXTENSIONS diff --git a/tests/test_scanner.py b/tests/test_scanner.py index 9717e66..3575599 100644 --- a/tests/test_scanner.py +++ b/tests/test_scanner.py @@ -83,3 +83,13 @@ def test_stable_order(media_tree): first = scanner.scan([str(root)]).files second = scanner.scan([str(root)]).files assert first == second + + +def test_transport_streams_are_supported(tmp_path): + for name in ("recording.ts", "camcorder.m2ts", "clip.mts"): + (tmp_path / name).write_bytes(b"x") + result = scanner.scan([str(tmp_path)], recursive=False) + assert [p.name for p in result.files] == [ + "camcorder.m2ts", "clip.mts", "recording.ts", + ] + assert result.warnings == []