Skip to content

Commit

Permalink
Order boxsets by release date by default
Browse files Browse the repository at this point in the history
Fixes #391
  • Loading branch information
1hitsong committed Oct 27, 2023
1 parent dff9a69 commit 71fe9da
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/ItemGrid/ItemGrid.brs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71fe9da

Please sign in to comment.