Skip to content

Commit

Permalink
Suppress media mount lisener for Player Status in Opus Quad mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
brunchboy committed May 11, 2024
1 parent 863be0f commit bf01575
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/beat_link_trigger/players.clj
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,8 @@
(let [[button label] (slot-elems slot-reference)]
(when button
(seesaw/invoke-later
(seesaw/config! label :text (media-description slot-reference))
(seesaw/config! button :icon (seesaw/icon "images/Gear-outline.png") :enabled? true)))))
(seesaw/config! button :icon (seesaw/icon "images/Gear-outline.png") :enabled? true)
(seesaw/config! label :text (media-description slot-reference))))))
(mediaUnmounted [_this slot-reference]
(let [[button label] (slot-elems slot-reference)]
(when button
Expand All @@ -660,7 +660,7 @@
(detailsAvailable [_this details]
(let [slot-reference (.-slotReference details)
[_ label] (slot-elems slot-reference)]
(when (and label (not opus-quad?))
(when label
(seesaw/invoke-later
(seesaw/config! label :text (media-description slot-reference)))))))]

Expand Down Expand Up @@ -689,7 +689,7 @@
(.addTrackMetadataListener metadata-finder md-listener) ; React to metadata changes.
(.addAnalysisTagListener analysis-finder ss-listener ".EXT" "PSSI") ; React to song structure changes.
(.addAlbumArtListener art-finder art-listener) ; React to artwork changes.
(.addMountListener metadata-finder mount-listener) ; React to media mounts and ejection.
(when-not (opus-quad?) (.addMountListener metadata-finder mount-listener)) ; React to media mounts and ejection.

;; Set the initial state of the interface.
(when detail (.setScale detail (seesaw/value zoom-slider)))
Expand Down

0 comments on commit bf01575

Please sign in to comment.