From 71fe9da9c700ee5334f1a245b83c9438a7571e30 Mon Sep 17 00:00:00 2001 From: 1hitsong <3330318+1hitsong@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:27:14 -0400 Subject: [PATCH] Order boxsets by release date by default Fixes #391 --- components/ItemGrid/ItemGrid.brs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/ItemGrid/ItemGrid.brs b/components/ItemGrid/ItemGrid.brs index 0cd567b54..a1d57ab51 100644 --- a/components/ItemGrid/ItemGrid.brs +++ b/components/ItemGrid/ItemGrid.brs @@ -134,7 +134,15 @@ sub loadInitialItems() m.view = m.global.session.user.settings["display." + m.top.parentItem.Id + ".landing"] end if - if m.sortField = invalid then m.sortField = "SortName" + if m.sortField = invalid + ' Set the default order for boxsets to the Release Date - API calls it PremiereDate + if LCase(m.top.parentItem.json.Type) = "boxset" + m.sortField = "PremiereDate" + else + m.sortField = "SortName" + end if + end if + if m.filter = invalid then m.filter = "All" if sortAscendingStr = invalid or sortAscendingStr = true