player agent gui script for exe
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user