Refresh env, add aiohttp dep, improve resource selection and GStreamer flags
This commit is contained in:
@@ -79,6 +79,23 @@ class TestParseDIDL:
|
||||
items = _parse_didl(didl, "http://myserver:8200")
|
||||
assert items[0].resource_url == "http://myserver:8200/media/track.flac"
|
||||
|
||||
def test_prefers_video_resource_over_subtitle_resource(self):
|
||||
didl = """\
|
||||
<DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">
|
||||
<item id="400" parentID="1">
|
||||
<dc:title>Movie</dc:title>
|
||||
<upnp:class>object.item.videoItem</upnp:class>
|
||||
<res protocolInfo="http-get:*:text/vtt:*">http://srv/movie.vtt</res>
|
||||
<res protocolInfo="http-get:*:video/x-matroska:*" size="999">http://srv/movie.mkv</res>
|
||||
</item>
|
||||
</DIDL-Lite>
|
||||
"""
|
||||
items = _parse_didl(didl, "http://srv")
|
||||
assert items[0].resource_url == "http://srv/movie.mkv"
|
||||
assert items[0].mime_type == "video/x-matroska"
|
||||
|
||||
|
||||
class TestExtractBrowseResult:
|
||||
def test_extracts_unnamespaced_result(self):
|
||||
|
||||
Reference in New Issue
Block a user