summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-10-31 14:50:59 -0500
committerColin Okay <colin@cicadas.surf>2022-10-31 14:50:59 -0500
commit552f5e6ab637f0d966772b05bb89d77267e0e3b4 (patch)
tree9f7db17f87dca0e498bdded0260dacc5a28ddd1a
parent373e5203a6b43a5b186f0aba22209ac95d860585 (diff)
Remove: remove-playlist-viewer function
-rw-r--r--playlist.lisp10
1 files changed, 4 insertions, 6 deletions
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)