mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
more dashboard code consolidation
This commit is contained in:
parent
86603de5f2
commit
a5b6dbcd1a
6 changed files with 235 additions and 198 deletions
|
@ -1,18 +1,25 @@
|
|||
var PlayList = {
|
||||
var Playlist = (function() {
|
||||
|
||||
queue: Array(),
|
||||
var self = this;
|
||||
|
||||
addItem: function (item) {
|
||||
PlayList.queue.push(item);
|
||||
},
|
||||
self.queue = [];
|
||||
|
||||
removeItem: function (index) {
|
||||
PlayList.queue.splice(index, 1);
|
||||
},
|
||||
self.add = function(item) {
|
||||
|
||||
playItem: function (index) {
|
||||
MediaPlayer.play(PlayList.queue[index]);
|
||||
PlayList.queue.shift();
|
||||
}
|
||||
queue.push(item);
|
||||
};
|
||||
|
||||
};
|
||||
self.remove = function (index) {
|
||||
|
||||
queue.splice(index, 1);
|
||||
};
|
||||
|
||||
self.play = function (index) {
|
||||
|
||||
MediaPlayer.play(queue[index]);
|
||||
queue.shift();
|
||||
};
|
||||
|
||||
return self;
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue