Disable auto-generation of stream-queue.m3u from all tracks

- Comment out fallback that dumped entire library to stream-queue.m3u
- Add stream-queue.m3u to .gitignore (generated file with local paths)
- Delete orphaned stream-queue.m3u from project root

The curated playlists/stream-queue.m3u for Liquidsoap should be
manually managed, not auto-generated by the application.
This commit is contained in:
Glenn Thompson 2025-12-09 18:28:29 +03:00 committed by Brian O'Reilly
parent b6c1baa473
commit c1d71800ab
2 changed files with 13 additions and 8 deletions

1
.gitignore vendored
View File

@ -57,3 +57,4 @@ performance-logs/
# Temporary files
/static/asteroid.css
stream-queue.m3u

View File

@ -90,17 +90,21 @@
t)
(defun regenerate-stream-playlist ()
"Regenerate the main stream playlist from the current queue"
"Regenerate the main stream playlist from the current queue.
NOTE: This writes to project root stream-queue.m3u, NOT playlists/stream-queue.m3u
which is what Liquidsoap actually reads. This function may be deprecated."
(let ((playlist-path (merge-pathnames "stream-queue.m3u"
(asdf:system-source-directory :asteroid))))
(if (null *stream-queue*)
;; If queue is empty, generate from all tracks (fallback)
(let ((all-tracks (dm:get "tracks" (db:query :all))))
(generate-m3u-playlist
(mapcar (lambda (track)
(dm:id track))
all-tracks)
playlist-path))
;; DISABLED: Don't dump all tracks when queue is empty
;; This was overwriting files with all library tracks unexpectedly
;; (let ((all-tracks (dm:get "tracks" (db:query :all))))
;; (generate-m3u-playlist
;; (mapcar (lambda (track)
;; (dm:id track))
;; all-tracks)
;; playlist-path))
(format t "Stream queue is empty, not generating playlist file~%")
;; Generate from queue
(generate-m3u-playlist *stream-queue* playlist-path))))