mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
Rename 'track' into 'item' in SyncPlay
This commit is contained in:
parent
308deaceba
commit
b71b53eb6a
@ -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()
|
||||
});
|
||||
}
|
||||
|
@ -66,8 +66,8 @@ class QueueCore {
|
||||
break;
|
||||
}
|
||||
case 'SetCurrentItem':
|
||||
case 'NextTrack':
|
||||
case 'PreviousTrack': {
|
||||
case 'NextItem':
|
||||
case 'PreviousItem': {
|
||||
playerWrapper.onQueueUpdate();
|
||||
|
||||
const playlistItemId = this.getCurrentPlaylistItemId();
|
||||
|
@ -267,14 +267,14 @@ class GenericPlayer {
|
||||
/**
|
||||
* Picks next item in playlist.
|
||||
*/
|
||||
localNextTrack() {
|
||||
localNextItem() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Picks previous item in playlist.
|
||||
*/
|
||||
localPreviousTrack() {
|
||||
localPreviousItem() {
|
||||
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user