diff --git a/ApiClient.js b/ApiClient.js
index 759fb0dc47..42aa7d52c0 100644
--- a/ApiClient.js
+++ b/ApiClient.js
@@ -1712,6 +1712,27 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
});
};
+ /**
+ * Gets theme songs for an item
+ */
+ self.getThemeSongs = function (userId, itemId) {
+
+ if (!userId) {
+ throw new Error("null userId");
+ }
+ if (!itemId) {
+ throw new Error("null itemId");
+ }
+
+ var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/ThemeSongs");
+
+ return self.ajax({
+ type: "GET",
+ url: url,
+ dataType: "json"
+ });
+ };
+
/**
* Gets special features for an item
*/
diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css
index 3b9563fc53..25f8322911 100644
--- a/dashboard-ui/css/librarybrowser.css
+++ b/dashboard-ui/css/librarybrowser.css
@@ -559,7 +559,7 @@
.detailTable {
border-collapse: collapse;
border-spacing: 0;
- width: 70%;
+ width: 100%;
max-width: 1200px;
text-align: left;
}
diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html
index f8c53565c7..0cf426a422 100644
--- a/dashboard-ui/itemdetails.html
+++ b/dashboard-ui/itemdetails.html
@@ -143,9 +143,9 @@
+
diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js
index 7c55d3dba2..9d9f88dc86 100644
--- a/dashboard-ui/scripts/Itemdetailpage.js
+++ b/dashboard-ui/scripts/Itemdetailpage.js
@@ -33,7 +33,7 @@
$('#seriesName', page).html('' + item.SeriesName + '').show().trigger('create');
}
- else if (item.Album && item.Type == "Audio") {
+ else if (item.Album && item.Type == "Audio" && item.ParentId) {
$('#seriesName', page).html('' + item.Album + '').show().trigger('create');
}
@@ -198,6 +198,12 @@
$('#castCollapsible', page).show();
renderCast(page, item, context);
}
+
+ $('#themeSongsCollapsible', page).hide();
+
+ ApiClient.getThemeSongs(Dashboard.getCurrentUserId(), item.Id).done(function(songs) {
+ renderThemeSongs(page, item, songs);
+ });
}
function renderDetails(page, item, context) {
@@ -272,6 +278,16 @@
function renderUserDataIcons(page, item) {
$('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item));
}
+
+ function renderThemeSongs(page, item, songs) {
+
+ if (songs.length) {
+
+ $('#themeSongsCollapsible', page).show();
+
+ $('#themeSongsContent', page).html(LibraryBrowser.getSongTableHtml(songs, {})).trigger('create');
+ }
+ }
function renderScenes(page, item) {
var html = '';
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index d0279c6116..6ad3539256 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -245,7 +245,7 @@
html += '' + (item.Name || "") + ' | ';
if (options.showAlbum) {
- if (item.Album) {
+ if (item.Album && item.ParentId) {
html += '' + item.Album + ' | ';
} else {
html += ' | ';
diff --git a/packages.config b/packages.config
index 56ea6b5c94..31331b60d3 100644
--- a/packages.config
+++ b/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file