adding playing time for a playlist

This commit is contained in:
2026-09-08 10:18:36 +02:00
parent 365a7b8317
commit 4b9e6c5651
4 changed files with 40 additions and 3 deletions
+4 -1
View File
@@ -984,11 +984,14 @@
'name (browser-entry-name entry)
'kind (symbol->string (browser-entry-kind entry))))
;;; Include the sum of known track durations in each tab's browser summary.
(define (tab->jsexpr tab index)
(hasheq 'index index
'id (playlist-tab-id tab)
'name (playlist-tab-name tab)
'count (length (playlist-tab-tracks tab))))
'count (length (playlist-tab-tracks tab))
'duration (apply + (map (λ (item) (or (track-duration item) 0))
(playlist-tab-tracks tab)))))
(define (normal-device-id device)
(let ((id (upnp-device-udn device)))