From 943421dc1b90b2e5cb7e443ceb43d477a05f3a26 Mon Sep 17 00:00:00 2001 From: Glenn Thompson Date: Sat, 4 Oct 2025 06:06:56 +0300 Subject: [PATCH] feat: Add live Icecast/Liquidsoap status checks to admin dashboard - Implement check-icecast-status() to query Icecast API - Implement check-liquidsoap-status() to check Docker container status - Update admin page to show real-time streaming infrastructure status - Note: Auto-scan on startup deferred due to database timing issues --- asteroid.lisp | 9 ++------- stream-media.lisp | 4 ++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/asteroid.lisp b/asteroid.lisp index c2fd887..23f628d 100644 --- a/asteroid.lisp +++ b/asteroid.lisp @@ -426,13 +426,8 @@ ;; Initialize user management before server starts (initialize-user-system) - ;; Scan music library on startup to load existing tracks - (format t "Scanning music library for existing tracks...~%") - (handler-case - (let ((tracks-added (scan-music-library))) - (format t "✅ Loaded ~a tracks from library~%" tracks-added)) - (error (e) - (format t "⚠️ Library scan failed: ~a~%" e))) + ;; TODO: Add auto-scan on startup once database timing issues are resolved + ;; For now, use the "Scan Library" button in the admin interface (run-server)) diff --git a/stream-media.lisp b/stream-media.lisp index 437c1c0..fac4c53 100644 --- a/stream-media.lisp +++ b/stream-media.lisp @@ -59,6 +59,10 @@ (defun insert-track-to-database (metadata) "Insert track metadata into database" + ;; Ensure tracks collection exists + (unless (db:collection-exists-p "tracks") + (error "Tracks collection does not exist in database")) + (db:insert "tracks" (list (list "title" (getf metadata :title)) (list "artist" (getf metadata :artist))