From 552f5e6ab637f0d966772b05bb89d77267e0e3b4 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 31 Oct 2022 14:50:59 -0500 Subject: Remove: remove-playlist-viewer function --- playlist.lisp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'playlist.lisp') diff --git a/playlist.lisp b/playlist.lisp index 235c32f..051afde 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -75,18 +75,16 @@ (gethash (playlist ctl) *playlist-viewers* nil)) (defun add-playlist-viewer (ctl) + "Add a new playlist-ctl instance for this connection and, while + doing so, remove any dead controllers" (let ((viewers (playlist-viewers ctl))) (setf (gethash (playlist ctl) *playlist-viewers*) (cons ctl (remove-if-not 'controller-alive-p viewers))))) -(defun remove-playlist-viewer (ctl) - (let ((viewers - (playlist-viewers ctl))) - (setf (gethash (playlist ctl) *playlist-viewers*) - (delete ctl viewers)))) - (defun controller-alive-p (ctl) + "A controller is a live if the CLOG elements it manages are + associated with a live connection." (connection-data (pl-title ctl))) (defmacro for-playlist-viewers (clog-elem ctlvar &body body) -- cgit v1.2.3