Refresh env, add aiohttp dep, improve resource selection and GStreamer flags
This commit is contained in:
@@ -98,6 +98,27 @@ class TestParseDIDLItem:
|
||||
item = parse_didl_item(didl)
|
||||
assert item.resource_url == "http://srv/vid.mp4"
|
||||
|
||||
def test_prefers_media_resource_over_subtitle_resource(self):
|
||||
didl = {
|
||||
"id": "3",
|
||||
"title": "Movie",
|
||||
"upnp_class": "object.item.videoItem",
|
||||
"resources": [
|
||||
{
|
||||
"url": "http://srv/movie.srt",
|
||||
"protocol_info": "http-get:*:text/srt:*",
|
||||
},
|
||||
{
|
||||
"url": "http://srv/movie.mkv",
|
||||
"protocol_info": "http-get:*:video/x-matroska:*",
|
||||
"size": "1200",
|
||||
},
|
||||
],
|
||||
}
|
||||
item = parse_didl_item(didl)
|
||||
assert item.resource_url == "http://srv/movie.mkv"
|
||||
assert item.mime_type == "http-get:*:video/x-matroska:*"
|
||||
|
||||
def test_alt_key_names(self):
|
||||
"""Handles alternative key formats (@id, @parentID, class, etc.)."""
|
||||
didl = {
|
||||
|
||||
Reference in New Issue
Block a user