« get me outta code hell

synchronize playing new tracks across sockets - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-07-11 17:37:54 -0300
committerFlorrie <towerofnix@gmail.com>2020-07-11 17:42:22 -0300
commit07fb4b2d4a59319ab5ba03d842274aba8182c412 (patch)
tree6dc82202e30a67b064c2ea2c05e9fb13c802c46b /ui.js
parent991b2f0a8280c31b93ad91d6a215b74183417352 (diff)
synchronize playing new tracks across sockets
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui.js b/ui.js
index 1e48877..c9e30e5 100644
--- a/ui.js
+++ b/ui.js
@@ -425,7 +425,7 @@ class AppElement extends FocusElement {
 
   bindListeners() {
     for (const key of [
-      'handlePlaying',
+      'handlePlayingDetails',
       'handleReceivedTimeData',
       'handleProcessMetadataProgress',
       'handleQueueUpdated',
@@ -463,7 +463,7 @@ class AppElement extends FocusElement {
     PIE.on('toggle pause', () => PIE.queuePlayer.togglePause())
 
     queuePlayer.on('received time data', this.handleReceivedTimeData)
-    queuePlayer.on('playing', this.handlePlaying)
+    queuePlayer.on('playing details', this.handlePlayingDetails)
     queuePlayer.on('queue updated', this.handleQueueUpdated)
   }
 
@@ -492,7 +492,7 @@ class AppElement extends FocusElement {
     }
 
     queuePlayer.removeListener('receivedTimeData', this.handleReceivedTimeData)
-    queuePlayer.removeListener('playing', this.handlePlaying)
+    queuePlayer.removeListener('playing details', this.handlePlayingDetails)
     queuePlayer.removeListener('queue updated', this.handleQueueUpdated)
     queuePlayer.stopPlaying()
   }
@@ -520,7 +520,7 @@ class AppElement extends FocusElement {
     }
   }
 
-  async handlePlaying(track, oldTrack, queuePlayer) {
+  async handlePlayingDetails(track, oldTrack, queuePlayer) {
     const PIE = this.getPlaybackInfoElementForQueuePlayer(queuePlayer)
     if (PIE) {
       PIE.updateTrack()