mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Added play/queue artist buttons
This commit is contained in:
parent
725e435584
commit
fd6e7a1370
4 changed files with 69 additions and 5 deletions
|
@ -727,7 +727,7 @@
|
|||
|
||||
self.canPlay = function (item) {
|
||||
|
||||
if (item.Type == "MusicAlbum" || item.Type == "MusicArtist") {
|
||||
if (item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "Artist") {
|
||||
return true;
|
||||
}
|
||||
return self.canPlayMediaType(item.MediaType);
|
||||
|
@ -972,6 +972,23 @@
|
|||
|
||||
};
|
||||
|
||||
self.playArtist = function (artist) {
|
||||
|
||||
self.getItemsForPlayback({
|
||||
|
||||
Artists: artist,
|
||||
Recursive: true,
|
||||
SortBy: "Album,SortName",
|
||||
IncludeItemTypes: "Audio"
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
self.play(result.Items);
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
self.toggleFullscreen = function () {
|
||||
if (isFullScreen()) {
|
||||
if (document.cancelFullScreen) { document.cancelFullScreen(); }
|
||||
|
@ -1073,6 +1090,27 @@
|
|||
});
|
||||
};
|
||||
|
||||
self.queueArtist = function (artist) {
|
||||
|
||||
self.getItemsForPlayback({
|
||||
|
||||
Artists: artist,
|
||||
Recursive: true,
|
||||
SortBy: "Album,SortName",
|
||||
IncludeItemTypes: "Audio"
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
for (var i = 0, length = result.Items.length; i < length; i++) {
|
||||
|
||||
self.queueItem(result.Items[i]);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
self.pause = function () {
|
||||
currentMediaElement.pause();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue