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
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Mark generated files from openapi/components.yaml
browser3/src/types.ts linguist-generated=true
browser3/src/schemas.ts linguist-generated=true
player3/src/types.ts linguist-generated=true
player3/src/schemas.ts linguist-generated=true
processmedia3/pm3/lib/types.py linguist-generated=true
7 changes: 7 additions & 0 deletions browser3/src/schemas.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions browser3/src/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions openapi/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ components:
type: array
items:
$ref: "#/components/schemas/Attachment"
sources:
type: array
items:
type: string
description: List of source files for the track

Attachment:
type: object
Expand Down
7 changes: 7 additions & 0 deletions player3/src/schemas.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions player3/src/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions processmedia3/pm3/lib/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ def to_json(self) -> TrackDict:
image=attachments[MediaType.IMAGE],
),
tags=tags,
sources=sorted(map(str, self.sources)),
)
1 change: 1 addition & 0 deletions processmedia3/pm3/lib/types.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions processmedia3/tests/test_list_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_same(self) -> None:
{"mime": "text/srt", "variant": "Default", "path": "subs.srt"},
],
},
"sources": ["test1.txt", "test.srt", "test1.mp4"],
}
t2: TrackDict = {
"id": "track1",
Expand All @@ -40,6 +41,7 @@ def test_same(self) -> None:
{"mime": "text/srt", "variant": "Default", "path": "subs.srt"},
],
},
"sources": ["test1.txt", "test.srt", "test1.mp4"],
}
self.assertEqual(list_changes(t1, t2), None)

Expand All @@ -61,6 +63,7 @@ def test_diff_tags_subtitles(self) -> None:
{"mime": "text/srt", "variant": "Default", "path": "subs1.srt"},
],
},
"sources": ["test1.txt", "test.srt", "test1.mp4"],
}
t2: TrackDict = {
"id": "track1",
Expand All @@ -78,6 +81,7 @@ def test_diff_tags_subtitles(self) -> None:
{"mime": "text/srt", "variant": "Default", "path": "subs2.srt"},
],
},
"sources": ["test1.txt", "test.srt", "test1.mp4"],
}
self.assertEqual(list_changes(t1, t2), "tags (artist, title), subtitle")

Expand All @@ -98,6 +102,7 @@ def test_diff_new(self) -> None:
"image": [],
"subtitle": [],
},
"sources": ["test1.txt", "test.srt", "test1.mp4"],
}
t2: TrackDict = {
"id": "track1",
Expand All @@ -113,5 +118,6 @@ def test_diff_new(self) -> None:
"image": [],
"subtitle": [],
},
"sources": ["test1.txt", "test.srt", "test1.mp4"],
}
self.assertEqual(list_changes(t1, t2), None)