diff --git a/cl/inhibit-sleep-for-audio.lisp b/cl/inhibit-sleep-for-audio.lisp index b02d56d..c6d6839 100644 --- a/cl/inhibit-sleep-for-audio.lisp +++ b/cl/inhibit-sleep-for-audio.lisp @@ -20,13 +20,13 @@ (defun event-stream-states (event) "Return a alist mapping ids to stream states." (loop for obj across event - for info = (gethash "info" obj) for id = (gethash "id" obj) - for running = (and (hash-table-p info) + for info = (gethash "info" obj) + for props = (and (hash-table-p info) (gethash "props" info)) + for running = (and (hash-table-p props) (equal (gethash "type" obj) "PipeWire:Interface:Node") (equal (gethash "state" info) "running") - (or (not (equal (gethash "n-input-ports" info) 0)) - (not (equal (gethash "n-output-ports" info) 0)))) + (gethash "stream.is-live" props)) collect (cons id running))) (defvar *inhibitor-process* nil