From 55d63770d2d26e0a61a507cc538846c8a0ac7d4e Mon Sep 17 00:00:00 2001 From: Glenn Thompson Date: Sun, 14 Dec 2025 23:31:03 +0300 Subject: [PATCH] Add shuffle mount to admin dashboard listener stats - Add Shuffle column to Current Listeners table - Display listener count for /asteroid-shuffle.mp3 mount - Include shuffle listeners in total count --- parenscript/admin.lisp | 8 ++++++-- template/admin.ctml | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/parenscript/admin.lisp b/parenscript/admin.lisp index b2487a6..77e2729 100644 --- a/parenscript/admin.lisp +++ b/parenscript/admin.lisp @@ -891,11 +891,14 @@ (aac (or (and (ps:getprop mounts "/asteroid.aac") (ps:@ (ps:getprop mounts "/asteroid.aac") listeners)) 0)) (low (or (and (ps:getprop mounts "/asteroid-low.mp3") - (ps:@ (ps:getprop mounts "/asteroid-low.mp3") listeners)) 0))) + (ps:@ (ps:getprop mounts "/asteroid-low.mp3") listeners)) 0)) + (shuffle (or (and (ps:getprop mounts "/asteroid-shuffle.mp3") + (ps:@ (ps:getprop mounts "/asteroid-shuffle.mp3") listeners)) 0))) (let ((mp3-el (ps:chain document (get-element-by-id "listeners-mp3"))) (aac-el (ps:chain document (get-element-by-id "listeners-aac"))) (low-el (ps:chain document (get-element-by-id "listeners-low"))) + (shuffle-el (ps:chain document (get-element-by-id "listeners-shuffle"))) (total-el (ps:chain document (get-element-by-id "listeners-total"))) (updated-el (ps:chain document (get-element-by-id "stats-updated"))) (status-el (ps:chain document (get-element-by-id "stats-status")))) @@ -903,7 +906,8 @@ (when mp3-el (setf (ps:@ mp3-el text-content) mp3)) (when aac-el (setf (ps:@ aac-el text-content) aac)) (when low-el (setf (ps:@ low-el text-content) low)) - (when total-el (setf (ps:@ total-el text-content) (+ mp3 aac low))) + (when shuffle-el (setf (ps:@ shuffle-el text-content) shuffle)) + (when total-el (setf (ps:@ total-el text-content) (+ mp3 aac low shuffle))) (when updated-el (setf (ps:@ updated-el text-content) (ps:chain (ps:new (-date)) (to-locale-time-string)))) diff --git a/template/admin.ctml b/template/admin.ctml index ebb3c2f..cdbef42 100644 --- a/template/admin.ctml +++ b/template/admin.ctml @@ -58,6 +58,7 @@ 🎵 MP3 🎧 AAC 📱 Low + 🎲 Shuffle 📈 Total @@ -66,12 +67,14 @@ 0 0 0 + 0 0 Peak: 0 Peak: 0 Peak: 0 + Peak: 0 Updated: --