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

support remote play artist

This commit is contained in:
Luke Pulverenti 2013-09-09 14:23:19 -04:00
parent 866c468d7e
commit 4056a61775

View file

@ -27,6 +27,33 @@
}
function sendPlayArtistCommand(item, sessionId, popup) {
ApiClient.getItems(Dashboard.getCurrentUserId(), {
Artists: item.Name,
SortBy: "SortName",
IncludeItemTypes: "Audio",
Recursive: true,
Limit: 100
}).done(function (result) {
ApiClient.sendPlayCommand(sessionId, {
ItemIds: result.Items.map(function (i) {
return i.Id;
}).join(','),
PlayCommand: $('#fldPlayCommand', popup).val()
});
popup.popup("close");
});
}
function showMenuForItem(options, sessionsPromise) {
var playFromRendered;
@ -136,6 +163,12 @@
return false;
}
if (item.Type == "Artist") {
sendPlayArtistCommand(item, sessionIds[0], popup);
return false;
}
var playCommand = $('#fldPlayCommand', popup).val();
@ -255,7 +288,7 @@
browseButtonContainer.show();
if (item.Type != 'Person' && item.Type != 'Genre' && item.Type != 'Studio' && item.Type != 'Artist' && item.Type != 'GameGenre' && item.Type != 'MusicGenre') {
if (item.Type != 'Person' && item.Type != 'Genre' && item.Type != 'Studio' && item.Type != 'GameGenre' && item.Type != 'MusicGenre') {
playButtonContainer.show();
queueButtonContainer.show();
}