Refresh env, add aiohttp dep, improve resource selection and GStreamer flags

This commit is contained in:
Matteo Benedetto
2026-03-22 12:32:40 +01:00
parent 6fc467127c
commit 193e914ffd
11 changed files with 242 additions and 32 deletions
+21
View File
@@ -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 = {