From 3be939ff368eca71b9fa1d1d81d332eb0672d697 Mon Sep 17 00:00:00 2001 From: photonconvergence <116527579+photonconvergence@users.noreply.github.com> Date: Sat, 2 Dec 2023 17:04:14 -0800 Subject: [PATCH 1/7] Remove API Checkmarks --- source/api/Items.bs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/api/Items.bs b/source/api/Items.bs index d77e98cb0..dd98292b3 100644 --- a/source/api/Items.bs +++ b/source/api/Items.bs @@ -91,8 +91,6 @@ function ItemMetaData(id as string) tmp.json = data return tmp else if data.type = "Episode" - ' param = { "AddPlayedIndicator": data.UserData.Played } - ' imgParams.Append(param) tmp = CreateObject("roSGNode", "TVEpisodeData") tmp.image = PosterImage(data.id, imgParams) tmp.json = data @@ -410,9 +408,8 @@ function TVSeasons(id as string) as dynamic results = [] for each item in data.Items - imgParams = { "AddPlayedIndicator": item.UserData.Played } tmp = CreateObject("roSGNode", "TVSeasonData") - tmp.image = PosterImage(item.id, imgParams) + tmp.image = PosterImage(item.id) tmp.json = item results.push(tmp) end for From caee4fa5a85f33b6ef6fbc5332bf9b77f46f8f66 Mon Sep 17 00:00:00 2001 From: photonconvergence <116527579+photonconvergence@users.noreply.github.com> Date: Sat, 2 Dec 2023 17:06:18 -0800 Subject: [PATCH 2/7] Add watched checkmark to TV Shows, Collections --- components/ItemGrid/GridItem.bs | 11 +++++++++++ components/ItemGrid/GridItem.xml | 1 + 2 files changed, 12 insertions(+) diff --git a/components/ItemGrid/GridItem.bs b/components/ItemGrid/GridItem.bs index 0015a8ea5..1ba091915 100644 --- a/components/ItemGrid/GridItem.bs +++ b/components/ItemGrid/GridItem.bs @@ -15,6 +15,10 @@ sub init() m.unplayedCount = m.top.findNode("unplayedCount") m.unplayedEpisodeCount = m.top.findNode("unplayedEpisodeCount") + m.playedIndicator = m.top.findNode("playedIndicator") + m.checkmark = m.top.findNode("checkmark") + m.checkmark.width = 90 + m.checkmark.height = 60 m.itemText.translation = [0, m.itemPoster.height + 7] @@ -44,6 +48,10 @@ sub itemContentChanged() if itemData = invalid then return if itemData.type = "Movie" + if isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played = true + m.playedIndicator.visible = true + end if + m.itemPoster.uri = itemData.PosterUrl m.itemIcon.uri = itemData.iconUrl m.itemText.text = itemData.Title @@ -59,6 +67,9 @@ sub itemContentChanged() end if end if end if + if isValid(itemData.json) and isValid(itemData.json.UserData) and isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played = true + m.playedIndicator.visible = true + end if m.itemPoster.uri = itemData.PosterUrl m.itemIcon.uri = itemData.iconUrl diff --git a/components/ItemGrid/GridItem.xml b/components/ItemGrid/GridItem.xml index 51cbd9655..06575753a 100644 --- a/components/ItemGrid/GridItem.xml +++ b/components/ItemGrid/GridItem.xml @@ -7,6 +7,7 @@ +