From 7379822c726a1b154871e986a7d98f749db6d28c Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 25 Dec 2020 10:28:42 -0500 Subject: [PATCH] Merge pull request #2265 from MrTimscampi/sort-by-premiere-date Sort items by premiere date on the details page (cherry picked from commit 58aa865af0c2b948b4a680954368786998c79724) Signed-off-by: Joshua M. Boniface --- src/controllers/itemDetails/index.js | 4 ++-- src/scripts/itembynamedetailpage.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index a32e63e7eb..b2e6ba6534 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -1209,7 +1209,7 @@ function renderMoreFromArtist(view, item, apiClient) { IncludeItemTypes: 'MusicAlbum', Recursive: true, ExcludeItemIds: item.Id, - SortBy: 'ProductionYear,SortName', + SortBy: 'PremiereDate,ProductionYear,SortName', SortOrder: 'Descending' }; @@ -1391,7 +1391,7 @@ function renderChildren(page, item) { Fields: fields }); } else if (item.Type == 'MusicArtist') { - query.SortBy = 'ProductionYear,SortName'; + query.SortBy = 'PremiereDate,ProductionYear,SortName'; } promise = promise || apiClient.getItems(apiClient.getCurrentUserId(), query); diff --git a/src/scripts/itembynamedetailpage.js b/src/scripts/itembynamedetailpage.js index 1a30cde22f..d54dce3fd2 100644 --- a/src/scripts/itembynamedetailpage.js +++ b/src/scripts/itembynamedetailpage.js @@ -195,7 +195,7 @@ function renderSection(page, item, element, type) { ArtistIds: '', AlbumArtistIds: '', SortOrder: 'Descending', - SortBy: 'ProductionYear,Sortname' + SortBy: 'PremiereDate,ProductionYear,Sortname' }, { shape: 'overflowSquare', playFromHere: true,