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

Added album soundtrack links

This commit is contained in:
Luke Pulverenti 2013-07-16 12:03:28 -04:00
parent c977f4a919
commit 8bcb6d55a4
5 changed files with 92 additions and 33 deletions

View file

@ -158,6 +158,13 @@
$('#themeSongsCollapsible', page).hide();
$('#themeVideosCollapsible', page).hide();
if (!item.SoundtrackIds || !item.SoundtrackIds.length) {
$('#soundtracksCollapsible', page).hide();
} else {
$('#soundtracksCollapsible', page).show();
renderSoundtracks(page, item);
}
renderThemeSongs(page, item);
renderThemeVideos(page, item);
renderCriticReviews(page, item, 1);
@ -241,6 +248,33 @@
$('.itemPath', page).hide();
}
}
function renderSoundtracks(page, item) {
if (item.Type == "MusicAlbum") {
$('#soundtracksHeader', page).html("This album is the soundtrack for ...");
} else {
$('#soundtracksHeader', page).html("Soundtrack(s)");
}
ApiClient.getItems(Dashboard.getCurrentUserId(), {
Ids: item.SoundtrackIds.join(","),
ItemFields: "PrimaryImageAspectRatio,ItemCounts,DisplayMediaType,DateCreated,UserData,AudioInfo",
SortBy: "SortName"
}).done(function (result) {
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
useAverageAspectRatio: true,
showNewIndicator: true,
shape: item.Type == "MusicAlbum" ? "portrait" : "square"
});
$('#soundtracksContent', page).html(html);
});
}
function renderSiblingLinks(page, item) {