1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove item from sorted playlist when on shuffle mode and address review comments

This commit is contained in:
ferferga 2020-06-23 20:32:39 +02:00
parent 33d0329e5c
commit 78cdbbb14f
3 changed files with 21 additions and 9 deletions

View file

@ -155,6 +155,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._playlist = playlist.filter(function (item) {
return playlistItemIds.indexOf(item.PlaylistItemId) === -1;
});