player agent gui script for exe

This commit is contained in:
2026-09-17 09:49:23 +02:00
parent 705ff17c79
commit 83fe3cc472
7 changed files with 212 additions and 52 deletions
+10
View File
@@ -175,6 +175,8 @@
(hasheq 'playlistIndex index
'trackNumber (+ index 1)
'cacheKey (track-cache-key item)
'mediaSize (file-size (track-file item))
'mediaModified (file-or-directory-modify-seconds (track-file item))
'mediaToken token
'filename
(path->string
@@ -198,6 +200,8 @@
agent
(append (playback-agent-commands agent)
(list command)))
(info-web-player "Queued agent command ~a: ~a (~a pending)"
id action (length (playback-agent-commands agent)))
command))))
(define agent-heartbeat-timeout-seconds 10)
@@ -2172,6 +2176,12 @@
'state (hasheq 'state "starting" 'position 0))))
(define play-command (hash-ref play-poll 'command))
(check-equal? (hash-ref play-command 'action) "play")
(check-equal?
(hash-ref (hash-ref play-command 'data) 'mediaSize)
(file-size first-file))
(check-equal?
(hash-ref (hash-ref play-command 'data) 'mediaModified)
(file-or-directory-modify-seconds first-file))
(check-equal?
(hash-ref (hash-ref play-command 'data) 'trackNumber)
1)