From 5651128b8e667b44e0bb90a07183d6e07ca3da75 Mon Sep 17 00:00:00 2001 From: Jimi Date: Sat, 27 Jul 2024 16:27:30 -0600 Subject: [PATCH] Remove non-wide poster mask from View All Next Up grid. --- components/ItemGrid/GridItem.bs | 14 +++++++++++--- components/ItemGrid/ItemGrid.bs | 5 ++--- components/ItemGrid/LoadItemsTask2.bs | 4 +--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/components/ItemGrid/GridItem.bs b/components/ItemGrid/GridItem.bs index 3e95584c..4df67550 100644 --- a/components/ItemGrid/GridItem.bs +++ b/components/ItemGrid/GridItem.bs @@ -114,10 +114,18 @@ sub itemContentChanged() end if ' Adjust to wide posters for "View All Next Up" if m.topParent.overhangTitle = tr("View All Next Up") - m.itemPoster.height = 331 - m.itemPoster.width = 464 + m.posterMask.maskUri = "" + + m.itemPoster.height = 300 + m.itemPoster.width = 400 + m.itemPoster.loadDisplayMode = "scaleToFit" + + m.backdrop.height = 300 + m.backdrop.width = 400 + m.backdrop.loadDisplayMode = "scaleToFit" + m.itemText.translation = [0, m.itemPoster.height + 7] - m.itemText.maxWidth = 464 + m.itemText.maxWidth = 400 end if else if itemData.type = "MusicArtist" m.itemPoster.uri = itemData.PosterUrl diff --git a/components/ItemGrid/ItemGrid.bs b/components/ItemGrid/ItemGrid.bs index 1967ec9e..df6a5d12 100644 --- a/components/ItemGrid/ItemGrid.bs +++ b/components/ItemGrid/ItemGrid.bs @@ -201,10 +201,9 @@ sub loadInitialItems() if getCollectionType() = "nextup" m.loadItemsTask.itemType = "NextUp" - m.itemGrid.itemSize = "[464, 331]" - m.itemGrid.itemSpacing = "[5, 5]" + m.itemGrid.itemSize = "[400, 300]" m.top.imageDisplayMode = "scaleToFit" - m.itemGrid.numColumns = 3 + m.itemGrid.numColumns = 4 m.alpha.visible = false end if else if m.top.parentItem.json.type = "Studio" diff --git a/components/ItemGrid/LoadItemsTask2.bs b/components/ItemGrid/LoadItemsTask2.bs index 4d313b88..2290103d 100644 --- a/components/ItemGrid/LoadItemsTask2.bs +++ b/components/ItemGrid/LoadItemsTask2.bs @@ -201,9 +201,7 @@ sub loadItems() tmp = CreateObject("roSGNode", "TVEpisode") if LCase(m.top.ItemType) = "nextup" tmp.title = item.name - tmp.json = item tmp.type = "Episode" - tmp.posterUrl = api.items.GetImageURL(item.id, "primary", 0, { "maxHeight": 331, "maxWidth": 464, "quality": "90" }) end if else if LCase(item.Type) = "recording" tmp = CreateObject("roSGNode", "RecordingData") @@ -292,7 +290,7 @@ sub loadItems() end if if tmp <> invalid - if LCase(item.Type) <> "genre" and LCase(item.Type) <> "musicgenre" and LCase(m.top.ItemType) <> "nextup" + if LCase(item.Type) <> "genre" and LCase(item.Type) <> "musicgenre" tmp.parentFolder = m.top.itemId tmp.json = item if item.UserData <> invalid and item.UserData.isFavorite <> invalid