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:
parent
866c468d7e
commit
4056a61775
1 changed files with 34 additions and 1 deletions
|
@ -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) {
|
function showMenuForItem(options, sessionsPromise) {
|
||||||
|
|
||||||
var playFromRendered;
|
var playFromRendered;
|
||||||
|
@ -136,6 +163,12 @@
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (item.Type == "Artist") {
|
||||||
|
|
||||||
|
sendPlayArtistCommand(item, sessionIds[0], popup);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var playCommand = $('#fldPlayCommand', popup).val();
|
var playCommand = $('#fldPlayCommand', popup).val();
|
||||||
|
|
||||||
|
@ -255,7 +288,7 @@
|
||||||
|
|
||||||
browseButtonContainer.show();
|
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();
|
playButtonContainer.show();
|
||||||
queueButtonContainer.show();
|
queueButtonContainer.show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue