didl toevoegingen

This commit is contained in:
2026-07-30 22:32:12 +02:00
parent 83b939b60d
commit 2acd9ac87f
12 changed files with 320 additions and 35 deletions
+17 -1
View File
@@ -186,7 +186,17 @@
(check-equal? (transport-position-seconds position) 151/2)
(check-equal? (transport-position-duration position) 210)
(check-equal? (transport-position-uri position) "http://example/test.flac"))
(av-transport-set-uri! av "http://127.0.0.1/test?a=1&b=2")
(av-transport-set-uri!
av
"http://127.0.0.1/test?a=1&b=2"
#:metadata
(didl-lite-audio-item
"http://127.0.0.1/test?a=1&b=2"
#:protocol-info
"http-get:*:audio/flac:DLNA.ORG_OP=01;DLNA.ORG_CI=0"
#:title "Test & metadata"
#:duration 210
#:size 123456))
(check-equal? (rendering-control-volume rendering) 37)
(rendering-control-set-volume! rendering 300)
(let-values ([(source sink) (connection-manager-protocols connection)])
@@ -212,5 +222,11 @@
(ormap (lambda (body)
(regexp-match? #rx"http://127.0.0.1/test\\?a=1&b=2" body))
(unbox recorded-bodies)))
(check-true
(ormap (lambda (body)
(and (regexp-match? #rx"CurrentURIMetaData" body)
(regexp-match? #rx"DIDL-Lite" body)
(regexp-match? #rx"DLNA[.]ORG_OP=01" body)))
(unbox recorded-bodies)))
(displayln "UPnP tests passed")