diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html
index 53bd9a287a..22b19bbb1d 100644
--- a/dashboard-ui/itemdetails.html
+++ b/dashboard-ui/itemdetails.html
@@ -33,7 +33,8 @@
${TabLatest}
${TabSuggested}
-
${TabMovies}
+
${TabMovies}
+
${TabCollections}
${TabGenres}
${TabPeople}
${TabStudios}
diff --git a/dashboard-ui/moviegenres.html b/dashboard-ui/moviegenres.html
index 452da495b3..c867a0d5e9 100644
--- a/dashboard-ui/moviegenres.html
+++ b/dashboard-ui/moviegenres.html
@@ -10,6 +10,7 @@
${TabLatest}
${TabSuggested}
${TabMovies}
+
${TabCollections}
${TabGenres}
${TabPeople}
${TabStudios}
diff --git a/dashboard-ui/moviepeople.html b/dashboard-ui/moviepeople.html
index 46991305a0..993003e67b 100644
--- a/dashboard-ui/moviepeople.html
+++ b/dashboard-ui/moviepeople.html
@@ -10,6 +10,7 @@
${TabLatest}
${TabSuggested}
${TabMovies}
+
${TabCollections}
${TabGenres}
${TabPeople}
${TabStudios}
diff --git a/dashboard-ui/movies.html b/dashboard-ui/movies.html
index 35d46b2528..cf4ee9a8a8 100644
--- a/dashboard-ui/movies.html
+++ b/dashboard-ui/movies.html
@@ -10,6 +10,7 @@
${TabLatest}
${TabSuggested}
${TabMovies}
+
${TabCollections}
${TabGenres}
${TabPeople}
${TabStudios}
diff --git a/dashboard-ui/movieslatest.html b/dashboard-ui/movieslatest.html
index 8ddb27eff3..5568085667 100644
--- a/dashboard-ui/movieslatest.html
+++ b/dashboard-ui/movieslatest.html
@@ -10,6 +10,7 @@
${TabLatest}
${TabSuggested}
${TabMovies}
+
${TabCollections}
${TabGenres}
${TabPeople}
${TabStudios}
diff --git a/dashboard-ui/moviesrecommended.html b/dashboard-ui/moviesrecommended.html
index f2793e6c98..99390e6b7f 100644
--- a/dashboard-ui/moviesrecommended.html
+++ b/dashboard-ui/moviesrecommended.html
@@ -10,6 +10,7 @@
${TabLatest}
${TabSuggested}
${TabMovies}
+
${TabCollections}
${TabGenres}
${TabPeople}
${TabStudios}
diff --git a/dashboard-ui/moviestudios.html b/dashboard-ui/moviestudios.html
index 94c2242188..3a3e8a5576 100644
--- a/dashboard-ui/moviestudios.html
+++ b/dashboard-ui/moviestudios.html
@@ -10,6 +10,7 @@
${TabLatest}
${TabSuggested}
${TabMovies}
+
${TabCollections}
${TabGenres}
${TabPeople}
${TabStudios}
diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js
index fec95289a2..a9b5ca268b 100644
--- a/dashboard-ui/scripts/edititemmetadata.js
+++ b/dashboard-ui/scripts/edititemmetadata.js
@@ -51,13 +51,7 @@
Dashboard.populateLanguages($('#selectLanguage', page), languages);
Dashboard.populateCountries($('#selectCountry', page), countries);
- if (item.LocationType == "Offline") {
- $('.saveButtonContainer', page).hide();
- } else {
- $('.saveButtonContainer', page).show();
- }
-
- $('#btnRefresh', page).buttonEnabled(true);
+ $('.btnRefresh', page).buttonEnabled(true);
$('#btnDelete', page).buttonEnabled(true);
$('.btnSave', page).buttonEnabled(true);
@@ -819,7 +813,7 @@
function performDelete(page) {
$('#btnDelete', page).buttonEnabled(false);
- $('#btnRefresh', page).buttonEnabled(false);
+ $('.btnRefresh', page).buttonEnabled(false);
$('.btnSave', page).buttonEnabled(false);
$('#refreshLoading', page).show();
@@ -987,7 +981,7 @@
return false;
};
- self.onRefreshFormSubmit = function() {
+ self.onRefreshFormSubmit = function () {
var page = $(this).parents('.page');
refreshFromPopupOptions(page);
@@ -1211,9 +1205,9 @@
$('#selectMetadataRefreshMode', page).val('all').selectmenu('refresh');
$('#selectImageRefreshMode', page).val('missing').selectmenu('refresh');
}
-
+
function refreshFromPopupOptions(page) {
-
+
var metadataRefreshMode = $('#selectMetadataRefreshMode', page).val();
var imageRefreshMode = $('#selectImageRefreshMode', page).val();
@@ -1221,7 +1215,7 @@
Recursive: true,
ImageRefreshMode: imageRefreshMode == 'none' ? 'None' : 'FullRefresh',
- MetadataRefreshMode: metadataRefreshMode == 'none' ? 'None' : 'FullRefresh',
+ MetadataRefreshMode: metadataRefreshMode == 'none' ? 'None' : (metadataRefreshMode == 'local' ? 'ValidationOnly' : 'FullRefresh'),
ReplaceAllImages: imageRefreshMode == imageRefreshMode == 'all',
ReplaceAllMetadata: metadataRefreshMode == 'all'
});
@@ -1233,7 +1227,7 @@
$('#refreshLoading', page).show();
$('#btnDelete', page).buttonEnabled(false);
- $('#btnRefresh', page).buttonEnabled(false);
+ $('.btnRefresh', page).buttonEnabled(false);
$('.btnSave', page).buttonEnabled(false);
ApiClient.refreshItem(currentItem.Id, options).done(function () {
@@ -1246,23 +1240,21 @@
var page = this;
- $('#btnRefresh', this).on('click', function () {
+ $('.btnRefreshBasic', this).on('click', function () {
- var metadataRefreshMode = $('#selectRefreshMode', page).val();
+ refreshWithOptions(page, {
- if (metadataRefreshMode == 'advanced') {
- performAdvancedRefresh(page);
- } else {
+ Recursive: true,
+ ImageRefreshMode: 'FullRefresh',
+ MetadataRefreshMode: 'FullRefresh',
+ ReplaceAllImages: false,
+ ReplaceAllMetadata: true
+ });
+ });
- refreshWithOptions(page, {
+ $('.btnRefreshAdvanced', this).on('click', function () {
- Recursive: true,
- ImageRefreshMode: 'FullRefresh',
- MetadataRefreshMode: 'FullRefresh',
- ReplaceAllImages: false,
- ReplaceAllMetadata: metadataRefreshMode == 'all'
- });
- }
+ performAdvancedRefresh(page);
});
$('#btnIdentify', page).on('click', function () {
diff --git a/dashboard-ui/scripts/gamesrecommendedpage.js b/dashboard-ui/scripts/gamesrecommendedpage.js
index 242d1c7e09..ac75b0525e 100644
--- a/dashboard-ui/scripts/gamesrecommendedpage.js
+++ b/dashboard-ui/scripts/gamesrecommendedpage.js
@@ -3,24 +3,22 @@
$(document).on('pagebeforeshow', "#gamesRecommendedPage", function () {
var parentId = LibraryMenu.getTopParentId();
+ var userId = Dashboard.getCurrentUserId();
var page = this;
var options = {
- SortBy: "DateCreated",
- SortOrder: "Descending",
- MediaTypes: "Game",
+ IncludeItemTypes: "Game",
Limit: 8,
- Recursive: true,
- Fields: "ItemCounts,AudioInfo,PrimaryImageAspectRatio",
+ Fields: "PrimaryImageAspectRatio",
ParentId: parentId
};
- ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
+ ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
- items: result.Items,
+ items: items,
transparent: true,
borderless: true,
shape: 'auto',
@@ -42,7 +40,7 @@
ParentId: parentId
};
- ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
+ ApiClient.getItems(userId, options).done(function (result) {
if (result.Items.length) {
$('#recentlyPlayedSection', page).show();
diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js
index 0e085fb90d..c4fe10961f 100644
--- a/dashboard-ui/scripts/indexpage.js
+++ b/dashboard-ui/scripts/indexpage.js
@@ -126,33 +126,29 @@
function loadRecentlyAdded(elem, userId) {
var screenWidth = $(window).width();
-
+
var options = {
- SortBy: "DateCreated",
- SortOrder: "Descending",
Limit: screenWidth >= 2400 ? 30 : (screenWidth >= 1920 ? 15 : (screenWidth >= 1440 ? 10 : (screenWidth >= 800 ? 9 : 8))),
- Recursive: true,
Fields: "PrimaryImageAspectRatio",
- Filters: "IsUnplayed,IsNotFolder",
- CollapseBoxSetItems: false,
- ExcludeLocationTypes: "Virtual,Remote"
+ IsPlayed: false,
+ IsFolder: false
};
- ApiClient.getItems(userId, options).done(function (result) {
+ ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
var html = '';
- if (result.Items.length) {
+ if (items.length) {
html += '';
html += '
';
html += LibraryBrowser.getPosterViewHtml({
- items: result.Items,
+ items: items,
preferThumb: true,
shape: 'backdrop',
- showTitle: true,
- centerText: true,
context: 'home',
+ showUnplayedIndicator: false,
+ showChildCountIndicator: true,
lazy: true
});
html += '
';
diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js
index 821bdaeee5..6f9a765512 100644
--- a/dashboard-ui/scripts/itembynamedetailpage.js
+++ b/dashboard-ui/scripts/itembynamedetailpage.js
@@ -56,7 +56,7 @@
function reload(page) {
Dashboard.showLoadingMsg();
- $('#btnEdit', page).attr('href', '#');
+ $('.btnEdit', page).attr('href', '#');
getPromise().done(function (item) {
@@ -66,7 +66,7 @@
if (context) {
editQuery += '&context=' + context;
}
- $('#btnEdit', page).attr('href', 'edititemmetadata.html' + editQuery);
+ $('.btnEdit', page).attr('href', 'edititemmetadata.html' + editQuery);
currentItem = item;
@@ -90,9 +90,9 @@
Dashboard.getCurrentUser().done(function (user) {
if (MediaController.canPlay(item)) {
- $('#playButtonContainer', page).show();
+ $('.btnPlay', page).show();
} else {
- $('#playButtonContainer', page).hide();
+ $('.btnPlay', page).hide();
}
var editImagesHref = user.Configuration.IsAdministrator ? 'edititemimages.html' + editQuery : null;
@@ -100,9 +100,9 @@
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item, editImagesHref));
if (user.Configuration.IsAdministrator && item.LocationType !== "Offline") {
- $('#editButtonContainer', page).show();
+ $('.btnEdit', page).show();
} else {
- $('#editButtonContainer', page).hide();
+ $('.btnEdit', page).hide();
}
});
@@ -522,7 +522,7 @@
var page = this;
- $('#btnPlay', page).on('click', function () {
+ $('.btnPlay', page).on('click', function () {
var userdata = currentItem.UserData || {};
LibraryBrowser.showPlayMenu(this, currentItem.Id, currentItem.Type, false, "Audio", userdata.PlaybackPositionTicks);
});
diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js
index 66e99ff162..7788746572 100644
--- a/dashboard-ui/scripts/itemdetailpage.js
+++ b/dashboard-ui/scripts/itemdetailpage.js
@@ -240,6 +240,16 @@
$('a', elem).removeClass('ui-btn-active');
$('.lnkHomeUpcoming', page).addClass('ui-btn-active');
}
+ else if (context == 'movies' || item.Type == 'Movie') {
+ elem = $('#movieTabs', page).show();
+ $('a', elem).removeClass('ui-btn-active');
+
+ if (item.Type == 'BoxSet') {
+ $('.lnkCollections', page).addClass('ui-btn-active');
+ } else {
+ $('.lnkMovies', page).addClass('ui-btn-active');
+ }
+ }
else if (item.Type == "MusicAlbum") {
$('#albumTabs', page).show();
}
@@ -252,10 +262,6 @@
$('#songTabs', page).show();
}
- else if (item.Type == "Movie") {
- $('#movieTabs', page).show();
- }
-
else if (item.Type == "ChannelVideoItem" || item.Type == "ChannelAudioItem" || item.Type == "ChannelFolderItem") {
$('#channelTabs', page).show();
$('.channelHeader', page).show().html('
' + item.ChannelName + '').trigger('create');
@@ -363,7 +369,7 @@
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item));
- if (item.Type != "Episode" && item.Type != "Movie" && item.Type != "Series") {
+ if (item.Type != "Episode" && item.Type != "Movie" && item.Type != "Series" && item.Type != "Season") {
var premiereDateElem = $('#itemPremiereDate', page).show();
LibraryBrowser.renderPremiereDate(premiereDateElem, item);
} else {
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index e284aea4e1..d35195a319 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -627,7 +627,7 @@
});
}
- else if (options.preferThumb && item.SeriesThumbImageTag) {
+ else if (options.preferThumb && item.SeriesThumbImageTag && options.inheritThumb !== false) {
imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
type: "Thumb",
@@ -636,7 +636,7 @@
});
}
- else if (options.preferThumb && item.ParentThumbItemId) {
+ else if (options.preferThumb && item.ParentThumbItemId && options.inheritThumb !== false) {
imgUrl = ApiClient.getThumbImageUrl(item.ParentThumbItemId, {
type: "Thumb",
@@ -772,6 +772,14 @@
cssClass += ' posterItemUserData' + item.UserData.Key;
}
+ if (options.showChildCountIndicator && item.ChildCount) {
+ cssClass += ' groupedPosterItem';
+
+ if (item.Type == 'Series') {
+ cssClass += ' unplayedGroupings';
+ }
+ }
+
var itemCommands = [];
//if (MediaController.canPlay(item)) {
@@ -786,6 +794,10 @@
itemCommands.push('trailer');
}
+ if (options.showChildCountIndicator) {
+ cssClass += ' groupingPosterItem';
+ }
+
html += '
';
var style = "";
@@ -820,9 +832,13 @@
if (options.showLocationTypeIndicator !== false) {
html += LibraryBrowser.getOfflineIndicatorHtml(item);
}
- } else if (options.showUnplayedIndicator !== false) {
+ }
+ else if (options.showUnplayedIndicator !== false) {
html += LibraryBrowser.getPlayedIndicatorHtml(item);
}
+ else if (options.showChildCountIndicator) {
+ html += LibraryBrowser.getGroupCountIndicator(item);
+ }
if (mediaSourceCount > 1) {
html += '' + mediaSourceCount + '
';
@@ -1107,6 +1123,15 @@
return '';
},
+ getGroupCountIndicator: function (item) {
+
+ if (item.ChildCount) {
+ return '' + item.ChildCount + '
';
+ }
+
+ return '';
+ },
+
getAveragePrimaryImageAspectRatio: function (items) {
var values = [];
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index 85a715b444..f8beafb278 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -271,7 +271,7 @@
$($.mobile.activePage).append(html);
- var elem = $('.tapHoldMenu').popup({ positionTo: e.target }).trigger('create').popup("open").on("popupafterclose", function () {
+ var elem = $('.tapHoldMenu').popup({ positionTo: posterItem }).trigger('create').popup("open").on("popupafterclose", function () {
$(this).off("popupafterclose").remove();
$(posterItem).removeClass('hasContextMenu');
@@ -290,6 +290,161 @@
return false;
}
+ function getGroupingHeaderHtml(item) {
+
+ var itemHtml = '';
+
+ var href = LibraryBrowser.getHref(item);
+ itemHtml += '';
+
+ var imgUrl = "css/images/media/chapterflyout.png";
+
+ if (item.ImageTags.Primary) {
+
+ itemHtml += '
';
+ imgUrl = ApiClient.getScaledImageUrl(item.Id, {
+ width: 160,
+ tag: item.ImageTags.Primary,
+ type: "Primary",
+ index: 0
+ });
+ itemHtml += '';
+
+ } else {
+ itemHtml += '
';
+ }
+
+
+ itemHtml += '';
+ itemHtml += LibraryBrowser.getPosterViewDisplayName(item);
+ itemHtml += '
';
+
+ var date = parseISO8601Date(item.DateCreated, { toLocal: true });
+
+ itemHtml += '';
+ itemHtml += Globalize.translate('LabelAddedOnDate').replace('{0}', date.toLocaleDateString());
+ itemHtml += '
';
+
+ itemHtml += '';
+
+ return itemHtml;
+ }
+
+ function onGroupedPosterItemClick(e) {
+
+ var posterItem = this;
+ var itemId = posterItem.getAttribute('data-itemid');
+
+ $(posterItem).addClass('hasContextMenu');
+
+ var userId = Dashboard.getCurrentUserId();
+
+ var promise1 = ApiClient.getItem(userId, itemId);
+
+ var options = {
+
+ Limit: parseInt($('.playedIndicator', posterItem).html() || '10'),
+ Fields: "PrimaryImageAspectRatio",
+ ParentId: itemId,
+ IsFolder: false,
+ GroupItems: false
+ };
+
+ if ($(posterItem).hasClass('unplayedGroupings')) {
+ options.IsPlayed = false;
+ }
+
+ var promise2 = ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options));
+
+ $.when(promise1, promise2).done(function (response1, response2) {
+
+ var item = response1[0];
+ var latestItems = response2[0];
+
+ if (latestItems.length == 1) {
+
+ var first = latestItems[0];
+ Dashboard.navigate(LibraryBrowser.getHref(first));
+ return;
+ }
+
+ var html = '';
+
+ $($.mobile.activePage).append(html);
+
+ var elem = $('.groupingMenu').popup().trigger('create').popup("open").on("popupafterclose", function () {
+
+ $(this).off("popupafterclose").remove();
+ $(posterItem).removeClass('hasContextMenu');
+
+ });
+ });
+
+ e.preventDefault();
+ return false;
+ }
+
+
$.fn.createPosterItemMenus = function () {
var preventHover = false;
@@ -355,8 +510,9 @@
var elems = '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem,.miniBackdropPosterItem';
- this.off('contextmenu.posterItemMenu', elems)
- .on('contextmenu.posterItemMenu', elems, onPosterItemTapHold);
+ $('.posterItem', this).on('contextmenu.posterItemMenu', onPosterItemTapHold);
+
+ $('.groupedPosterItem', this).on('click', onGroupedPosterItemClick);
return this.off('.posterItemHoverMenu')
.on('mouseenter.posterItemHoverMenu', elems, onHoverIn)
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index 642d65a42f..fdb295c1ad 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -1104,7 +1104,7 @@
$(self).trigger('playstatechange', [state]);
};
- $(window).on("beforeunload popstate", function () {
+ $(window).on("beforeunload", function () {
// Try to report playback stopped before the browser closes
if (self.currentItem && self.currentMediaElement && currentProgressInterval) {
diff --git a/dashboard-ui/scripts/moviecollections.js b/dashboard-ui/scripts/moviecollections.js
index fa8a99c211..9b6e5147d7 100644
--- a/dashboard-ui/scripts/moviecollections.js
+++ b/dashboard-ui/scripts/moviecollections.js
@@ -175,6 +175,18 @@
}).on('pagebeforeshow', "#boxsetsPage", function () {
+ var page = this;
+
+ var context = getParameterByName('context');
+
+ if (context == 'movies') {
+ $('.collectionTabs', page).hide();
+ $('.movieTabs', page).show();
+ } else {
+ $('.collectionTabs', page).show();
+ $('.movieTabs', page).hide();
+ }
+
query.ParentId = LibraryMenu.getTopParentId();
var limit = LibraryBrowser.getDefaultPageSize();
diff --git a/dashboard-ui/scripts/movieslatest.js b/dashboard-ui/scripts/movieslatest.js
index c73690bf9e..db2017d747 100644
--- a/dashboard-ui/scripts/movieslatest.js
+++ b/dashboard-ui/scripts/movieslatest.js
@@ -3,30 +3,28 @@
$(document).on('pagebeforeshow', "#moviesLatestPage", function () {
var parentId = LibraryMenu.getTopParentId();
-
+ var userId = Dashboard.getCurrentUserId();
+
var screenWidth = $(window).width();
var page = this;
var options = {
- SortBy: "DateCreated",
- SortOrder: "Descending",
IncludeItemTypes: "Movie",
Limit: screenWidth >= 1920 ? 32 : (screenWidth >= 1440 ? 32 : (screenWidth >= 800 ? 28 : 18)),
- Recursive: true,
Fields: "PrimaryImageAspectRatio",
- Filters: "IsUnplayed",
- CollapseBoxSetItems: false,
- ParentId: parentId
+ ParentId: parentId,
+ IsPlayed: false
};
- ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
+ ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
- items: result.Items
+ items: items,
+ lazy: true
- })).createPosterItemMenus();
+ })).trigger('create').createPosterItemMenus();
});
});
diff --git a/dashboard-ui/scripts/moviesrecommended.js b/dashboard-ui/scripts/moviesrecommended.js
index ae1ebff070..54f7d07f77 100644
--- a/dashboard-ui/scripts/moviesrecommended.js
+++ b/dashboard-ui/scripts/moviesrecommended.js
@@ -28,7 +28,8 @@
html += '';
html += LibraryBrowser.getPosterViewHtml({
- items: recommendation.Items
+ items: recommendation.Items,
+ lazy: true
});
html += '
';
@@ -69,16 +70,17 @@
preferBackdrop: true,
shape: 'backdrop',
overlayText: screenWidth >= 600,
- showTitle: true
+ showTitle: true,
+ lazy: true
- })).createPosterItemMenus();
+ })).trigger('create').createPosterItemMenus();
});
var url = ApiClient.getUrl("Movies/Recommendations", {
userId: Dashboard.getCurrentUserId(),
- categoryLimit: screenWidth >= 1200 ? 6 : 3,
+ categoryLimit: screenWidth >= 1200 ? 4 : 3,
itemLimit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 8 : 7),
Fields: "PrimaryImageAspectRatio"
});
@@ -95,7 +97,7 @@
var html = recommendations.map(getRecommendationHtml).join('');
$('.noItemsMessage', page).hide();
- $('.recommendations', page).html(html).createPosterItemMenus();
+ $('.recommendations', page).html(html).trigger('create').createPosterItemMenus();
});
});
diff --git a/dashboard-ui/scripts/musicrecommended.js b/dashboard-ui/scripts/musicrecommended.js
index 85dd111126..617ede0eff 100644
--- a/dashboard-ui/scripts/musicrecommended.js
+++ b/dashboard-ui/scripts/musicrecommended.js
@@ -3,27 +3,25 @@
$(document).on('pagebeforeshow', "#musicRecommendedPage", function () {
var screenWidth = $(window).width();
+ var userId = Dashboard.getCurrentUserId();
var page = this;
var parentId = LibraryMenu.getTopParentId();
var options = {
-
- SortBy: "DateCreated",
- SortOrder: "Descending",
IncludeItemTypes: "MusicAlbum",
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 8 : 6),
- Recursive: true,
Fields: "PrimaryImageAspectRatio",
ParentId: parentId
};
- ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
+ ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
$('#recentlyAddedAlbums', page).html(LibraryBrowser.getPosterViewHtml({
- items: result.Items,
+ items: items,
showUnplayedIndicator: false,
+ showChildCountIndicator: true,
shape: "square",
showTitle: true,
showParentTitle: true
@@ -32,21 +30,18 @@
});
options = {
-
- SortBy: "DateCreated",
- SortOrder: "Descending",
IncludeItemTypes: "Audio",
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 8 : 6),
- Recursive: true,
- Fields: "PrimaryImageAspectRatio,AudioInfo",
+ Fields: "PrimaryImageAspectRatio",
ParentId: parentId
};
- ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
+ ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
$('#recentlyAddedSongs', page).html(LibraryBrowser.getPosterViewHtml({
- items: result.Items,
+ items: items,
showUnplayedIndicator: false,
+ showChildCountIndicator: true,
shape: "square",
showTitle: true,
showParentTitle: true
diff --git a/dashboard-ui/scripts/nowplayingbar.js b/dashboard-ui/scripts/nowplayingbar.js
index 21980754b2..72a41e7f64 100644
--- a/dashboard-ui/scripts/nowplayingbar.js
+++ b/dashboard-ui/scripts/nowplayingbar.js
@@ -20,7 +20,7 @@
var html = '';
- html += '';
+ html += '
';
html += '
';
html += '
' + Globalize.translate('ButtonRemoteControl') + '';
diff --git a/dashboard-ui/scripts/tvlatest.js b/dashboard-ui/scripts/tvlatest.js
index 702437a862..851fda5c11 100644
--- a/dashboard-ui/scripts/tvlatest.js
+++ b/dashboard-ui/scripts/tvlatest.js
@@ -3,6 +3,7 @@
$(document).on('pagebeforeshow', "#tvNextUpPage", function () {
var screenWidth = $(window).width();
+ var userId = Dashboard.getCurrentUserId();
var parentId = LibraryMenu.getTopParentId();
@@ -10,30 +11,29 @@
var options = {
- SortBy: "DateCreated",
- SortOrder: "Descending",
IncludeItemTypes: "Episode",
Limit: screenWidth >= 1920 ? 24 : (screenWidth >= 1440 ? 16 : 15),
- Recursive: true,
- Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
- Filters: "IsUnplayed",
- ExcludeLocationTypes: "Virtual",
- ParentId: parentId
+ Fields: "PrimaryImageAspectRatio",
+ ParentId: parentId,
+ IsPlayed: false
};
- ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
+ ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
$('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({
- items: result.Items,
+ items: items,
shape: "backdrop",
- showTitle: true,
+ preferThumb: true,
+ inheritThumb: false,
showParentTitle: true,
- overlayText: screenWidth >= 600
+ showUnplayedIndicator: false,
+ showChildCountIndicator: true,
+ overlayText: screenWidth >= 600,
+ lazy: true
- })).createPosterItemMenus();
+ })).trigger('create').createPosterItemMenus();
});
-
});
diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js
index c61e6a4391..e36fb7e016 100644
--- a/dashboard-ui/scripts/tvrecommended.js
+++ b/dashboard-ui/scripts/tvrecommended.js
@@ -115,9 +115,10 @@
shape: "backdrop",
showTitle: true,
showParentTitle: true,
- overlayText: screenWidth >= 600
+ overlayText: screenWidth >= 600,
+ lazy: true
- })).createPosterItemMenus();
+ })).trigger('create').createPosterItemMenus();
});
}
diff --git a/dashboard-ui/tvrecommended.html b/dashboard-ui/tvrecommended.html
index b5d03e3d20..ffd0735442 100644
--- a/dashboard-ui/tvrecommended.html
+++ b/dashboard-ui/tvrecommended.html
@@ -36,7 +36,7 @@
-
+