Include original media in media groups
This commit is contained in:
parent
89d462e280
commit
954608c5f9
3 changed files with 212 additions and 14 deletions
|
|
@ -114,6 +114,21 @@ def test_feed_generation_normalizes_dates_urls_and_xml_shapes() -> None:
|
|||
"samplingrate": "48000",
|
||||
"channels": "2",
|
||||
},
|
||||
{
|
||||
"url": _published_url(
|
||||
"https://mirror.example",
|
||||
f"audio/{audio_base_path}",
|
||||
),
|
||||
"path": audio_base_path,
|
||||
"type": "audio/mpeg",
|
||||
"medium": "audio",
|
||||
"isDefault": "false",
|
||||
"fileSize": "5678",
|
||||
"bitrate": "128000",
|
||||
"duration": "61.2",
|
||||
"samplingrate": "44100",
|
||||
"channels": "2",
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
|
|
@ -143,7 +158,23 @@ def test_feed_generation_normalizes_dates_urls_and_xml_shapes() -> None:
|
|||
"width": "1280",
|
||||
"height": "720",
|
||||
"framerate": "30/1",
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": _published_url(
|
||||
"https://mirror.example",
|
||||
f"video/{video_base_path}",
|
||||
),
|
||||
"path": video_base_path,
|
||||
"type": "video/mp4",
|
||||
"medium": "video",
|
||||
"isDefault": "false",
|
||||
"fileSize": "12345",
|
||||
"bitrate": "456789",
|
||||
"duration": "60.0",
|
||||
"width": "640",
|
||||
"height": "360",
|
||||
"framerate": "24/1",
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
|
|
@ -271,6 +302,20 @@ def test_feed_generation_normalizes_dates_urls_and_xml_shapes() -> None:
|
|||
"duration": "61.2",
|
||||
"fileSize": "3456",
|
||||
},
|
||||
{
|
||||
"url": (
|
||||
f"https://mirror.example/feeds/demo/audio/"
|
||||
f"{local_audio_path(source_audio)}"
|
||||
),
|
||||
"type": "audio/mpeg",
|
||||
"medium": "audio",
|
||||
"isDefault": "false",
|
||||
"bitrate": "128000",
|
||||
"samplingrate": "44100",
|
||||
"channels": "2",
|
||||
"duration": "61.2",
|
||||
"fileSize": "5678",
|
||||
},
|
||||
]
|
||||
|
||||
video_variants = video_group.findall("media:content", namespaces=nsmap)
|
||||
|
|
@ -291,7 +336,24 @@ def test_feed_generation_normalizes_dates_urls_and_xml_shapes() -> None:
|
|||
"width": "1280",
|
||||
"lang": "en",
|
||||
"fileSize": "9876",
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": (
|
||||
f"https://mirror.example/feeds/demo/video/"
|
||||
f"{local_video_path(source_video)}"
|
||||
),
|
||||
"type": "video/mp4",
|
||||
"medium": "video",
|
||||
"isDefault": "false",
|
||||
"expression": "full",
|
||||
"bitrate": "456789",
|
||||
"framerate": "24/1",
|
||||
"duration": "60.0",
|
||||
"height": "360",
|
||||
"width": "640",
|
||||
"lang": "en",
|
||||
"fileSize": "12345",
|
||||
},
|
||||
]
|
||||
|
||||
itunes_image = root.find("./channel/item/itunes:image", namespaces=nsmap)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue