fix: add favourite count to icecast stats

This commit is contained in:
Luis Pereira 2026-02-20 17:16:46 +00:00 committed by Brian O'Reilly
parent 1e5a7e75f3
commit 6fd8071a05
1 changed files with 3 additions and 1 deletions

View File

@ -34,6 +34,7 @@
(error (e)
(declare (ignore e))
nil))))
(defun icecast-now-playing (icecast-base-url &optional (mount "asteroid.mp3"))
"Fetch now-playing information from Icecast server.
@ -89,7 +90,8 @@
`((:listenurl . ,(format nil "~a/~a" *stream-base-url* mount))
(:title . ,title)
(:listeners . ,total-listeners)
(:track-id . ,(find-track-by-title title))))))))
(:track-id . ,(find-track-by-title title))
(:favorite-count . ,(or (get-track-favorite-count title) 1))))))))
(define-api-with-limit asteroid/partial/now-playing (&optional mount) (:limit 10 :timeout 1)
"Get Partial HTML with live status from Icecast server.