mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add 'Clear Queue' option
This commit is contained in:
parent
737341934a
commit
08a995fe2c
7 changed files with 50 additions and 13 deletions
|
@ -84,6 +84,14 @@ define([], function () {
|
|||
this._shuffleMode = 'Sorted';
|
||||
};
|
||||
|
||||
PlayQueueManager.prototype.clearPlaylist = function (clearCurrentItem = false) {
|
||||
const currentPlaylistItem = this._playlist.splice(this.getCurrentPlaylistIndex(), 1)[0];
|
||||
this._playlist = [];
|
||||
if (!clearCurrentItem) {
|
||||
this._playlist.push(currentPlaylistItem);
|
||||
}
|
||||
};
|
||||
|
||||
function arrayInsertAt(destArray, pos, arrayToInsert) {
|
||||
var args = [];
|
||||
args.push(pos); // where to insert
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue