Scenes
diff --git a/dashboard-ui/itemlist.html b/dashboard-ui/itemlist.html
index 42c407b24f..54dbd6328d 100644
--- a/dashboard-ui/itemlist.html
+++ b/dashboard-ui/itemlist.html
@@ -71,10 +71,10 @@
Filters:
-
+
-
+
diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js
index 724bec747f..10cbec9483 100644
--- a/dashboard-ui/scripts/Itemdetailpage.js
+++ b/dashboard-ui/scripts/Itemdetailpage.js
@@ -65,11 +65,11 @@
Dashboard.hideLoadingMsg();
});
}
-
+
function getContext(item) {
// should return either movies, tv, music or games
-
+
if (item.Type == "Episode" || item.Type == "Series" || item.Type == "Season") {
return "tv";
}
@@ -105,6 +105,10 @@
enableCustomHeader(page, "Music");
$('#standardLogo', page).hide();
}
+ else if (item.MediaType == "Game") {
+ enableCustomHeader(page, "Games");
+ $('#standardLogo', page).hide();
+ }
else {
$('.libraryPageHeader', page).hide();
$('#standardLogo', page).show();
@@ -128,6 +132,12 @@
$('#movieTabs', page).hide();
}
+ if (item.MediaType == "Game") {
+ $('#gameTabs', page).show();
+ } else {
+ $('#gameTabs', page).hide();
+ }
+
if (item.Type == "BoxSet") {
$('#boxsetTabs', page).show();
} else {
@@ -278,14 +288,14 @@
function renderUserDataIcons(page, item) {
$('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item));
}
-
+
function renderThemeSongs(page, item, result) {
-
+
if (result.Items.length) {
-
+
$('#themeSongsCollapsible', page).show();
- $('#themeSongsContent', page).html(LibraryBrowser.getSongTableHtml(result.Items, {})).trigger('create');
+ $('#themeSongsContent', page).html(LibraryBrowser.getSongTableHtml(result.Items, { showArtist: true, showAlbum: true })).trigger('create');
}
}
diff --git a/dashboard-ui/scripts/gamedetailpage.js b/dashboard-ui/scripts/gamedetailpage.js
deleted file mode 100644
index c8c0e8189a..0000000000
--- a/dashboard-ui/scripts/gamedetailpage.js
+++ /dev/null
@@ -1,184 +0,0 @@
-
-(function ($, document, LibraryBrowser, window) {
-
- var currentItem;
-
- function reload(page) {
-
- var id = getParameterByName('id');
-
- Dashboard.showLoadingMsg();
-
- ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
-
- currentItem = item;
-
- var name = item.Name;
-
- if (item.IndexNumber != null) {
- name = item.IndexNumber + " - " + name;
- }
- if (item.ParentIndexNumber != null) {
- name = item.ParentIndexNumber + "." + name;
- }
-
- $('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item));
-
- Dashboard.setPageTitle(name);
-
- $('#itemName', page).html(name);
-
- setInitialCollapsibleState(page, item);
- renderDetails(page, item);
-
- if (LibraryBrowser.shouldDisplayGallery(item)) {
- $('#galleryCollapsible', page).show();
- } else {
- $('#galleryCollapsible', page).hide();
- }
-
- Dashboard.hideLoadingMsg();
- });
- }
-
- function setInitialCollapsibleState(page, item) {
-
- if (!item.LocalTrailerCount || item.LocalTrailerCount == 0) {
- $('#trailersCollapsible', page).hide();
- } else {
- $('#trailersCollapsible', page).show();
- }
- }
-
- function renderDetails(page, item) {
-
- if (item.Taglines && item.Taglines.length) {
- $('#itemTagline', page).html(item.Taglines[0]).show();
- } else {
- $('#itemTagline', page).hide();
- }
-
- LibraryBrowser.renderOverview($('#itemOverview', page), item);
-
- if (item.CommunityRating) {
- $('#itemCommunityRating', page).html(LibraryBrowser.getStarRatingHtml(item)).show().attr('title', item.CommunityRating);
- } else {
- $('#itemCommunityRating', page).hide();
- }
-
- LibraryBrowser.renderBudget($('#itemBudget', page), item);
-
- $('#itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
-
- LibraryBrowser.renderGenres($('#itemGenres', page), item, "games");
- LibraryBrowser.renderStudios($('#itemStudios', page), item, "games");
- renderUserDataIcons(page, item);
- LibraryBrowser.renderLinks($('#itemLinks', page), item);
- }
-
- function renderUserDataIcons(page, item) {
- $('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item));
- }
-
- function renderGallery(page, item) {
-
- var html = LibraryBrowser.getGalleryHtml(item);
-
- $('#galleryContent', page).html(html).trigger('create');
- }
-
- function renderTrailers(page, item) {
- var html = '';
-
- ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), item.Id).done(function (trailers) {
-
- for (var i = 0, length = trailers.length; i < length; i++) {
-
- var trailer = trailers[i];
-
- html += '
';
- }
-
- $('#trailersContent', page).html(html);
-
- });
- }
-
- $(document).on('pageinit', "#gameDetailPage", function () {
-
- var page = this;
-
- }).on('pageshow', "#gameDetailPage", function () {
-
- var page = this;
-
- reload(page);
-
- $('#trailersCollapsible', page).on('expand.lazyload', function () {
- renderTrailers(page, currentItem);
-
- $(this).off('expand.lazyload');
- });
-
- $('#galleryCollapsible', page).on('expand.lazyload', function () {
-
- renderGallery(page, currentItem);
-
- $(this).off('expand.lazyload');
- });
-
- }).on('pagehide', "#gameDetailPage", function () {
-
- currentItem = null;
- var page = this;
-
- $('#trailersCollapsible', page).off('expand.lazyload');
- $('#galleryCollapsible', page).off('expand.lazyload');
- });
-
- function gameDetailPage() {
-
- var self = this;
-
- self.playTrailer = function (index) {
- ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), currentItem.Id).done(function (trailers) {
- MediaPlayer.play([trailers[index]]);
- });
- };
- }
-
- window.GameDetailPage = new gameDetailPage();
-
-
-})(jQuery, document, LibraryBrowser, window);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/gamegenrepage.js b/dashboard-ui/scripts/gamegenrepage.js
index 7e0c8dae29..e6517bcd98 100644
--- a/dashboard-ui/scripts/gamegenrepage.js
+++ b/dashboard-ui/scripts/gamegenrepage.js
@@ -24,7 +24,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Game",
countNamePlural: "Games",
context: "games"
diff --git a/dashboard-ui/scripts/gamespage.js b/dashboard-ui/scripts/gamespage.js
index 5b7039117f..f988c7296d 100644
--- a/dashboard-ui/scripts/gamespage.js
+++ b/dashboard-ui/scripts/gamespage.js
@@ -29,7 +29,7 @@
var item = result.Items[i];
//console.log(item);
html += '
';
- html += '' + item.Name + ' | ';
+ html += '' + item.Name + ' | ';
html += '' + item.DisplayMediaType + ' | ';
html += '' + item.ReleaseYear + ' | ';
html += '' + /*LibraryBrowser.renderGenres('', item, "games")*/ + ' | ';
diff --git a/dashboard-ui/scripts/gamestudiospage.js b/dashboard-ui/scripts/gamestudiospage.js
index b675c5b6a0..f62a806e55 100644
--- a/dashboard-ui/scripts/gamestudiospage.js
+++ b/dashboard-ui/scripts/gamestudiospage.js
@@ -24,7 +24,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Game",
countNamePlural: "Games",
context: "games"
diff --git a/dashboard-ui/scripts/gamesystemspage.js b/dashboard-ui/scripts/gamesystemspage.js
index 32c1114055..f0e819e261 100644
--- a/dashboard-ui/scripts/gamesystemspage.js
+++ b/dashboard-ui/scripts/gamesystemspage.js
@@ -26,7 +26,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
context: "games"
});
diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js
index cd878dc58f..90c6c1d2b1 100644
--- a/dashboard-ui/scripts/itembynamedetailpage.js
+++ b/dashboard-ui/scripts/itembynamedetailpage.js
@@ -181,7 +181,7 @@
if (result.GameCount) {
html += '';
- html += '';
+ html += '';
}
if (result.AlbumCount) {
@@ -212,6 +212,7 @@
shape = "backdrop";
loadItems(page, {
+ MediaTypes: "",
IncludeItemTypes: "Movie",
PersonTypes: "",
Artists: ""
@@ -223,6 +224,7 @@
shape = "backdrop";
loadItems(page, {
+ MediaTypes: "",
IncludeItemTypes: "Series",
PersonTypes: "",
Artists: ""
@@ -233,6 +235,7 @@
shape = "poster";
loadItems(page, {
+ MediaTypes: "",
IncludeItemTypes: "Trailer",
PersonTypes: "",
Artists: ""
@@ -243,7 +246,8 @@
shape = "poster";
loadItems(page, {
- IncludeItemTypes: "Game",
+ IncludeItemTypes: "",
+ MediaTypes: "Game",
PersonTypes: "",
Artists: ""
});
@@ -253,6 +257,7 @@
shape = "backdrop";
loadItems(page, {
+ MediaTypes: "",
IncludeItemTypes: "Episode",
PersonTypes: "GuestStar",
Artists: ""
@@ -263,6 +268,7 @@
shape = "cd";
loadItems(page, {
+ MediaTypes: "",
IncludeItemTypes: "MusicAlbum",
PersonTypes: "Artist",
Artists: ""
@@ -272,6 +278,7 @@
$("#radioSongs", page).on("click", function () {
loadItems(page, {
+ MediaTypes: "",
IncludeItemTypes: "Audio",
PersonTypes: "Artist",
Artists: ""
@@ -351,7 +358,7 @@
SortBy: "SortName",
SortOrder: "Ascending",
- IncludeItemTypes: "Movie",
+ IncludeItemTypes: "",
Recursive: true,
Fields: "PrimaryImageAspectRatio,UserData,DisplayMediaType,ItemCounts,DateCreated,AudioInfo,SeriesInfo",
Limit: LibraryBrowser.getDetaultPageSize(),
@@ -375,8 +382,7 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
- preferBackdrop: true,
+ preferBackdrop: shape == "backdrop",
shape: shape
});
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index 6ad3539256..9209a9aec9 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -20,7 +20,7 @@
getPosterDetailViewHtml: function (options) {
var items = options.items;
-
+
if (!options.shape) {
options.shape = options.preferBackdrop ? "backdrop" : "poster";
}
@@ -253,7 +253,7 @@
}
if (options.showArtist) {
-
+
if (item.Artist) {
html += '' + item.Artist + ' | ';
} else {
@@ -1109,14 +1109,47 @@
getMiscInfoHtml: function (item) {
var miscInfo = [];
-
- if (item.ProductionYear && item.Type != "Episode") {
+ var text;
+
+ if (item.ProductionYear && item.Type == "Series") {
if (item.Status == "Continuing") {
miscInfo.push(item.ProductionYear + "-Present");
- } else {
+
+ } else if (item.ProductionYear) {
+
+ text = item.ProductionYear;
+
+ if (item.EndDate) {
+
+ try {
+ text += "-" + parseISO8601Date(item.EndDate, { toLocal: true }).getFullYear();
+ }
+ catch (e) {
+ console.log("Error parsing date: " + item.EndDate);
+ }
+ }
+
+ miscInfo.push(text);
+ }
+ }
+
+ if (item.Type != "Series" && item.Type != "Episode") {
+
+ if (item.ProductionYear) {
+
miscInfo.push(item.ProductionYear);
}
+ else if (item.PremiereDate) {
+
+ try {
+ text = "-" + parseISO8601Date(item.PremiereDate, { toLocal: true }).getFullYear();
+ miscInfo.push(text);
+ }
+ catch (e) {
+ console.log("Error parsing date: " + item.PremiereDate);
+ }
+ }
}
if (item.OfficialRating) {
@@ -1212,7 +1245,12 @@
renderPremiereDate: function (elem, item) {
if (item.PremiereDate) {
try {
- elem.show().html('Premiered ' + parseISO8601Date(item.PremiereDate, { toLocal: true }).toDateString());
+
+ var date = parseISO8601Date(item.PremiereDate, { toLocal: true });
+
+ var text = new Date().getTime() > date.getTime() ? "Premiered" : "Premieres";
+
+ elem.show().html(text + ' ' + date.toDateString());
} catch (err) {
elem.hide();
}
diff --git a/dashboard-ui/scripts/moviegenres.js b/dashboard-ui/scripts/moviegenres.js
index 235075e0cc..bed499bf67 100644
--- a/dashboard-ui/scripts/moviegenres.js
+++ b/dashboard-ui/scripts/moviegenres.js
@@ -24,7 +24,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Movie",
countNamePlural: "Movies",
context: "movies"
diff --git a/dashboard-ui/scripts/moviepeople.js b/dashboard-ui/scripts/moviepeople.js
index 7254cf3f02..93cb7549d0 100644
--- a/dashboard-ui/scripts/moviepeople.js
+++ b/dashboard-ui/scripts/moviepeople.js
@@ -25,7 +25,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Movie",
countNamePlural: "Movies",
context: "movies"
diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js
index 2e6256be24..16d1760af6 100644
--- a/dashboard-ui/scripts/movies.js
+++ b/dashboard-ui/scripts/movies.js
@@ -27,7 +27,6 @@
if (view == "Backdrop") {
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
preferBackdrop: true,
context: "movies",
shape: "backdrop"
diff --git a/dashboard-ui/scripts/moviestudios.js b/dashboard-ui/scripts/moviestudios.js
index e9c041e3ac..eb57f50fb1 100644
--- a/dashboard-ui/scripts/moviestudios.js
+++ b/dashboard-ui/scripts/moviestudios.js
@@ -24,7 +24,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Movie",
countNamePlural: "Movies",
context: "movies"
diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js
index 968b34ee66..3bb24a8f62 100644
--- a/dashboard-ui/scripts/movietrailers.js
+++ b/dashboard-ui/scripts/movietrailers.js
@@ -27,7 +27,6 @@
if (view == "Backdrop") {
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
preferBackdrop: true,
context: "movies"
});
diff --git a/dashboard-ui/scripts/musicartists.js b/dashboard-ui/scripts/musicartists.js
index d501485605..8cae853814 100644
--- a/dashboard-ui/scripts/musicartists.js
+++ b/dashboard-ui/scripts/musicartists.js
@@ -24,7 +24,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Song",
countNamePlural: "Songs",
preferBackdrop: true,
diff --git a/dashboard-ui/scripts/musicgenres.js b/dashboard-ui/scripts/musicgenres.js
index 667223e766..4c581eb846 100644
--- a/dashboard-ui/scripts/musicgenres.js
+++ b/dashboard-ui/scripts/musicgenres.js
@@ -24,7 +24,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Song",
countNamePlural: "Songs",
context: "music"
diff --git a/dashboard-ui/scripts/tvgenres.js b/dashboard-ui/scripts/tvgenres.js
index 10f121e1ed..428b5712e4 100644
--- a/dashboard-ui/scripts/tvgenres.js
+++ b/dashboard-ui/scripts/tvgenres.js
@@ -24,7 +24,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Show",
countNamePlural: "Shows",
context: "tv"
diff --git a/dashboard-ui/scripts/tvpeople.js b/dashboard-ui/scripts/tvpeople.js
index 498983d144..3058717656 100644
--- a/dashboard-ui/scripts/tvpeople.js
+++ b/dashboard-ui/scripts/tvpeople.js
@@ -25,7 +25,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Show",
countNamePlural: "Shows",
context: "tv"
diff --git a/dashboard-ui/scripts/tvstudios.js b/dashboard-ui/scripts/tvstudios.js
index b3961addc8..38a846c4f4 100644
--- a/dashboard-ui/scripts/tvstudios.js
+++ b/dashboard-ui/scripts/tvstudios.js
@@ -24,7 +24,6 @@
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
- useAverageAspectRatio: true,
countNameSingular: "Show",
countNamePlural: "Shows",
context: "tv"