From a8a85df303c88aa5d07ca06734ecf9d2404960f7 Mon Sep 17 00:00:00 2001 From: dkanada Date: Wed, 15 Jul 2020 06:23:36 +0900 Subject: [PATCH] fix some minor console issues --- src/components/playback/playbackmanager.js | 1 - src/components/syncPlay/groupSelectionMenu.js | 2 +- src/components/syncPlay/syncPlayManager.js | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index 797fc39bd2b..cb1a91fb750 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -72,7 +72,6 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla const now = (new Date).getTime(); if (method !== reportPlaybackLastMethod || now - (reportPlaybackLastTime || 0) >= reportPlaybackLogDelay) { - console.debug(method + '-' + JSON.stringify(info)); reportPlaybackLastMethod = method; reportPlaybackLastTime = now; } diff --git a/src/components/syncPlay/groupSelectionMenu.js b/src/components/syncPlay/groupSelectionMenu.js index 3c77a67ea54..360aa0b0c27 100644 --- a/src/components/syncPlay/groupSelectionMenu.js +++ b/src/components/syncPlay/groupSelectionMenu.js @@ -84,7 +84,7 @@ function showNewJoinGroupSelection (button, user, apiClient) { actionsheet.show(menuOptions).then(function (id) { if (id == 'new-group') { apiClient.createSyncPlayGroup(); - } else { + } else if (id) { apiClient.joinSyncPlayGroup({ GroupId: id, PlayingItemId: playingItemId diff --git a/src/components/syncPlay/syncPlayManager.js b/src/components/syncPlay/syncPlayManager.js index c847fbaede3..c8660b2bc49 100644 --- a/src/components/syncPlay/syncPlayManager.js +++ b/src/components/syncPlay/syncPlayManager.js @@ -212,6 +212,7 @@ class SyncPlayManager { if (!this.lastPlaybackWaiting) { this.lastPlaybackWaiting = new Date(); } + events.trigger(this, 'waiting'); } @@ -288,6 +289,7 @@ class SyncPlayManager { player.setPlaybackRate(this.localPlayerPlaybackRate); this.localPlayerPlaybackRate = 1.0; } + this.currentPlayer = null; this.playbackRateSupported = false; } @@ -433,6 +435,7 @@ class SyncPlayManager { }); return; } + // Get playing item id let playingItemId; try { @@ -619,6 +622,7 @@ class SyncPlayManager { if (this.currentPlayer) { this.currentPlayer.setPlaybackRate(1); } + this.clearSyncIcon(); }