From b71b53eb6ae30e5f08663273878ec25f073cc1e0 Mon Sep 17 00:00:00 2001 From: Ionut Andrei Oanca Date: Thu, 3 Dec 2020 15:55:28 +0100 Subject: [PATCH] Rename 'track' into 'item' in SyncPlay --- src/components/syncPlay/core/Controller.js | 14 +++++++------- src/components/syncPlay/core/QueueCore.js | 4 ++-- .../syncPlay/core/players/GenericPlayer.js | 4 ++-- .../syncPlay/ui/players/NoActivePlayer.js | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/components/syncPlay/core/Controller.js b/src/components/syncPlay/core/Controller.js index cf4d1bf27e..695ccde9f1 100644 --- a/src/components/syncPlay/core/Controller.js +++ b/src/components/syncPlay/core/Controller.js @@ -71,7 +71,7 @@ class Controller { const apiClient = this.manager.getApiClient(); const sendPlayRequest = (items) => { const queue = items.map(item => item.Id); - apiClient.requestSyncPlayPlay({ + apiClient.requestSyncPlaySetNewQueue({ PlayingQueue: queue, PlayingItemPosition: options.startIndex ? options.startIndex : 0, StartPositionTicks: options.startPositionTicks ? options.startPositionTicks : 0 @@ -163,21 +163,21 @@ class Controller { } /** - * Plays next track from playlist in SyncPlay group. + * Plays next item from playlist in SyncPlay group. */ - nextTrack() { + nextItem() { const apiClient = this.manager.getApiClient(); - apiClient.requestSyncPlayNextTrack({ + apiClient.requestSyncPlayNextItem({ PlaylistItemId: this.manager.getQueueCore().getCurrentPlaylistItemId() }); } /** - * Plays previous track from playlist in SyncPlay group. + * Plays previous item from playlist in SyncPlay group. */ - previousTrack() { + previousItem() { const apiClient = this.manager.getApiClient(); - apiClient.requestSyncPlayPreviousTrack({ + apiClient.requestSyncPlayPreviousItem({ PlaylistItemId: this.manager.getQueueCore().getCurrentPlaylistItemId() }); } diff --git a/src/components/syncPlay/core/QueueCore.js b/src/components/syncPlay/core/QueueCore.js index 25ef434873..ba9bb754fe 100644 --- a/src/components/syncPlay/core/QueueCore.js +++ b/src/components/syncPlay/core/QueueCore.js @@ -66,8 +66,8 @@ class QueueCore { break; } case 'SetCurrentItem': - case 'NextTrack': - case 'PreviousTrack': { + case 'NextItem': + case 'PreviousItem': { playerWrapper.onQueueUpdate(); const playlistItemId = this.getCurrentPlaylistItemId(); diff --git a/src/components/syncPlay/core/players/GenericPlayer.js b/src/components/syncPlay/core/players/GenericPlayer.js index 056f37dab2..ac922387b8 100644 --- a/src/components/syncPlay/core/players/GenericPlayer.js +++ b/src/components/syncPlay/core/players/GenericPlayer.js @@ -267,14 +267,14 @@ class GenericPlayer { /** * Picks next item in playlist. */ - localNextTrack() { + localNextItem() { } /** * Picks previous item in playlist. */ - localPreviousTrack() { + localPreviousItem() { } diff --git a/src/components/syncPlay/ui/players/NoActivePlayer.js b/src/components/syncPlay/ui/players/NoActivePlayer.js index b3bd6c3456..964d973abf 100644 --- a/src/components/syncPlay/ui/players/NoActivePlayer.js +++ b/src/components/syncPlay/ui/players/NoActivePlayer.js @@ -284,7 +284,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer { */ nextTrackRequest(player) { const controller = syncPlayManager.getController(); - controller.nextTrack(); + controller.nextItem(); } /** @@ -292,7 +292,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer { */ previousTrackRequest(player) { const controller = syncPlayManager.getController(); - controller.previousTrack(); + controller.previousItem(); } /** @@ -388,7 +388,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer { /** * Calls original PlaybackManager's nextTrack method. */ - localNextTrack() { + localNextItem() { if (playbackManager.syncPlayEnabled) { playbackManager._localNextTrack(this.player); } else { @@ -399,7 +399,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer { /** * Calls original PlaybackManager's previousTrack method. */ - localPreviousTrack() { + localPreviousItem() { if (playbackManager.syncPlayEnabled) { playbackManager._localPreviousTrack(this.player); } else {