summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)