diff --git a/dashboard-ui/scripts/remotecontrol.js b/dashboard-ui/scripts/remotecontrol.js index 1513250ebb..a54eae18de 100644 --- a/dashboard-ui/scripts/remotecontrol.js +++ b/dashboard-ui/scripts/remotecontrol.js @@ -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(); }