1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
Luke Pulverenti 2013-05-03 00:10:21 -04:00
commit 2ddac440d9
3 changed files with 15 additions and 8 deletions

View file

@ -395,11 +395,15 @@
};
self.playLast = function (itemId) {
ApiClient.getItem(Dashboard.getCurrentUserId(), itemId).done(function (item) {
Playlist.add(item);
});
};
self.playNext = function (itemId) {
ApiClient.getItem(Dashboard.getCurrentUserId(), itemId).done(function (item) {
Playlist.playNext(item);
});
};
self.stop = function () {

View file

@ -29,10 +29,13 @@
self.queue.splice(index, 1);
};
self.playNext = function () {
self.playNext = function (item) {
if (typeof self.queue[0] != "undefined") {
MediaPlayer.play(new Array(self.queue[0]));
self.queue.shift();
//MediaPlayer.play(new Array(self.queue[0]));
//self.queue.shift();
self.queue.unshift(item);
}else {
self.add(item);
}
};
@ -85,7 +88,7 @@
html += '<td>' + name + '</td>';
html += '<td>' + seriesName + '</td>';
html += '<td>' + ticks_to_human(item.RunTimeTicks) + '</td>';
html += '<td></td>';
html += '<td>' + LibraryBrowser.getUserDataIconsHtml(item) + '</td>';
html += '<td><a href="" data-queue-index="'+i+'" onclick="Playlist.remove(this)">remove</a></td>';
html += '</tr>';