Remove debug logging from channel name update code
This commit is contained in:
parent
987d01beaa
commit
cb76c02e63
|
|
@ -713,8 +713,6 @@
|
||||||
;; Update channel selector name in UI after loading a new playlist
|
;; Update channel selector name in UI after loading a new playlist
|
||||||
(defun update-channel-selector-name (channel-name)
|
(defun update-channel-selector-name (channel-name)
|
||||||
"Update the curated channel option text in all channel selectors"
|
"Update the curated channel option text in all channel selectors"
|
||||||
(ps:chain console (log "Updating channel name to:" channel-name))
|
|
||||||
|
|
||||||
;; Store in localStorage so popout player can pick it up
|
;; Store in localStorage so popout player can pick it up
|
||||||
(ps:chain local-storage (set-item "curated-channel-name" channel-name))
|
(ps:chain local-storage (set-item "curated-channel-name" channel-name))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -558,19 +558,16 @@
|
||||||
|
|
||||||
;; Check for channel name changes from localStorage periodically
|
;; Check for channel name changes from localStorage periodically
|
||||||
(let ((last-channel-name (ps:chain local-storage (get-item "curated-channel-name"))))
|
(let ((last-channel-name (ps:chain local-storage (get-item "curated-channel-name"))))
|
||||||
(ps:chain console (log "Frame player: initial channel name from localStorage:" last-channel-name))
|
|
||||||
(set-interval
|
(set-interval
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((current-channel-name (ps:chain local-storage (get-item "curated-channel-name"))))
|
(let ((current-channel-name (ps:chain local-storage (get-item "curated-channel-name"))))
|
||||||
(when (and current-channel-name
|
(when (and current-channel-name
|
||||||
(not (= current-channel-name last-channel-name)))
|
(not (= current-channel-name last-channel-name)))
|
||||||
(ps:chain console (log "Frame player: channel name changed from" last-channel-name "to" current-channel-name))
|
|
||||||
(setf last-channel-name current-channel-name)
|
(setf last-channel-name current-channel-name)
|
||||||
(let ((channel-selector (ps:chain document (get-element-by-id "stream-channel"))))
|
(let ((channel-selector (ps:chain document (get-element-by-id "stream-channel"))))
|
||||||
(when channel-selector
|
(when channel-selector
|
||||||
(let ((curated-option (ps:chain channel-selector (query-selector "option[value='curated']"))))
|
(let ((curated-option (ps:chain channel-selector (query-selector "option[value='curated']"))))
|
||||||
(when curated-option
|
(when curated-option
|
||||||
(ps:chain console (log "Frame player: updating curated option text"))
|
|
||||||
(setf (ps:@ curated-option text-content) (+ "🎧 " current-channel-name)))))))))
|
(setf (ps:@ curated-option text-content) (+ "🎧 " current-channel-name)))))))))
|
||||||
2000))
|
2000))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue