mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Address review comments
This commit is contained in:
parent
78cdbbb14f
commit
4fe179214c
4 changed files with 41 additions and 71 deletions
|
@ -3920,9 +3920,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
return info ? info.supportedCommands : [];
|
||||
};
|
||||
|
||||
PlaybackManager.prototype.setRepeatMode = function (value, player) {
|
||||
|
||||
player = player || this._currentPlayer;
|
||||
PlaybackManager.prototype.setRepeatMode = function (value, player = this._currentPlayer) {
|
||||
if (player && !enableLocalPlaylistManagement(player)) {
|
||||
return player.setRepeatMode(value);
|
||||
}
|
||||
|
@ -3931,9 +3929,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
events.trigger(player, 'repeatmodechange');
|
||||
};
|
||||
|
||||
PlaybackManager.prototype.getRepeatMode = function (player) {
|
||||
|
||||
player = player || this._currentPlayer;
|
||||
PlaybackManager.prototype.getRepeatMode = function (player = this._currentPlayer) {
|
||||
if (player && !enableLocalPlaylistManagement(player)) {
|
||||
return player.getRepeatMode();
|
||||
}
|
||||
|
|
|
@ -144,9 +144,7 @@ define([], function () {
|
|||
|
||||
PlayQueueManager.prototype.removeFromPlaylist = function (playlistItemIds) {
|
||||
|
||||
var playlist = this.getPlaylist();
|
||||
|
||||
if (playlist.length <= playlistItemIds.length) {
|
||||
if (this._playlist.length <= playlistItemIds.length) {
|
||||
return {
|
||||
result: 'empty'
|
||||
};
|
||||
|
@ -155,14 +153,12 @@ define([], function () {
|
|||
var currentPlaylistItemId = this.getCurrentPlaylistItemId();
|
||||
var isCurrentIndex = playlistItemIds.indexOf(currentPlaylistItemId) !== -1;
|
||||
|
||||
if (this._sortedPlaylist.length <= playlistItemIds.length) {
|
||||
this._sortedPlaylist = this._sortedPlaylist.splice(0).filter(function (item) {
|
||||
return playlistItemIds.indexOf(item.PlaylistItemId) === -1;
|
||||
});
|
||||
}
|
||||
this._sortedPlaylist = this._sortedPlaylist.filter(function (item) {
|
||||
return !playlistItemIds.includes(item.PlaylistItemId);
|
||||
});
|
||||
|
||||
this._playlist = playlist.filter(function (item) {
|
||||
return playlistItemIds.indexOf(item.PlaylistItemId) === -1;
|
||||
this._playlist = this._playlist.filter(function (item) {
|
||||
return !playlistItemIds.includes(item.PlaylistItemId);
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue