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 @@
+
From 680a00cb92c7f01abb4ef8f754749795d4423d8b Mon Sep 17 00:00:00 2001
From: photonconvergence <116527579+photonconvergence@users.noreply.github.com>
Date: Sat, 2 Dec 2023 17:07:02 -0800
Subject: [PATCH 3/7] Add watched checkmark to Movies
---
components/ItemGrid/GridItemSmall.bs | 5 +++++
components/ItemGrid/GridItemSmall.xml | 1 +
2 files changed, 6 insertions(+)
diff --git a/components/ItemGrid/GridItemSmall.bs b/components/ItemGrid/GridItemSmall.bs
index 606f04462..8474ed5b2 100644
--- a/components/ItemGrid/GridItemSmall.bs
+++ b/components/ItemGrid/GridItemSmall.bs
@@ -8,6 +8,7 @@ sub init()
m.posterText.font.size = 30
m.title.font.size = 25
m.backdrop = m.top.findNode("backdrop")
+ m.playedIndicator = m.top.findNode("playedIndicator")
m.itemPoster.observeField("loadStatus", "onPosterLoadStatusChanged")
@@ -37,6 +38,10 @@ sub itemContentChanged()
if not isValid(itemData) then return
+ if isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played = true
+ m.playedIndicator.visible = true
+ end if
+
m.itemPoster.uri = itemData.PosterUrl
m.posterText.text = itemData.title
m.title.text = itemData.title
diff --git a/components/ItemGrid/GridItemSmall.xml b/components/ItemGrid/GridItemSmall.xml
index 0c8adcbca..94d938615 100644
--- a/components/ItemGrid/GridItemSmall.xml
+++ b/components/ItemGrid/GridItemSmall.xml
@@ -6,6 +6,7 @@
+
From c1169edb11660b6936ffcef49bc0543dfef17758 Mon Sep 17 00:00:00 2001
From: photonconvergence <116527579+photonconvergence@users.noreply.github.com>
Date: Sat, 2 Dec 2023 17:19:38 -0800
Subject: [PATCH 4/7] Add watched checkmark to Series, align
---
components/ListPoster.bs | 8 ++++++++
components/ListPoster.xml | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/components/ListPoster.bs b/components/ListPoster.bs
index 2c9337a80..62b970d1f 100644
--- a/components/ListPoster.bs
+++ b/components/ListPoster.bs
@@ -8,6 +8,10 @@ sub init()
m.poster = m.top.findNode("poster")
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.backdrop = m.top.findNode("backdrop")
@@ -65,6 +69,10 @@ sub itemContentChanged() as void
end if
end if
+ if isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played = true
+ m.playedIndicator.visible = true
+ end if
+
if itemData.json.lookup("Type") = "Episode" and isValid(itemData.json.IndexNumber)
m.title.text = StrI(itemData.json.IndexNumber) + ". " + m.title.text
diff --git a/components/ListPoster.xml b/components/ListPoster.xml
index 391cb95b4..8566ea2c6 100644
--- a/components/ListPoster.xml
+++ b/components/ListPoster.xml
@@ -4,9 +4,10 @@
-
+
+
From ff3f01ef9d7097da8745abe558de6b80fde7b1da Mon Sep 17 00:00:00 2001
From: photonconvergence <116527579+photonconvergence@users.noreply.github.com>
Date: Sun, 3 Dec 2023 19:16:21 -0800
Subject: [PATCH 5/7] Update components/ItemGrid/GridItem.bs
Co-authored-by: 1hitsong <3330318+1hitsong@users.noreply.github.com>
---
components/ItemGrid/GridItem.bs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/ItemGrid/GridItem.bs b/components/ItemGrid/GridItem.bs
index 1ba091915..e20e27cc4 100644
--- a/components/ItemGrid/GridItem.bs
+++ b/components/ItemGrid/GridItem.bs
@@ -48,7 +48,7 @@ sub itemContentChanged()
if itemData = invalid then return
if itemData.type = "Movie"
- if isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played = true
+ if isValid(itemData.json) and isValid(itemData.json.UserData) and isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played
m.playedIndicator.visible = true
end if
From c6a51633dae9f6004775b504fbb99635071a8364 Mon Sep 17 00:00:00 2001
From: photonconvergence <116527579+photonconvergence@users.noreply.github.com>
Date: Sun, 3 Dec 2023 19:16:30 -0800
Subject: [PATCH 6/7] Update components/ItemGrid/GridItemSmall.bs
Co-authored-by: 1hitsong <3330318+1hitsong@users.noreply.github.com>
---
components/ItemGrid/GridItemSmall.bs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/ItemGrid/GridItemSmall.bs b/components/ItemGrid/GridItemSmall.bs
index 8474ed5b2..a197d37bc 100644
--- a/components/ItemGrid/GridItemSmall.bs
+++ b/components/ItemGrid/GridItemSmall.bs
@@ -38,7 +38,7 @@ sub itemContentChanged()
if not isValid(itemData) then return
- if isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played = true
+ if isValid(itemData.json) and isValid(itemData.json.UserData) and isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played
m.playedIndicator.visible = true
end if
From f74cc10cd4f2db98145d61d38872a1780570144d Mon Sep 17 00:00:00 2001
From: photonconvergence <116527579+photonconvergence@users.noreply.github.com>
Date: Sun, 3 Dec 2023 19:16:38 -0800
Subject: [PATCH 7/7] Update components/ListPoster.bs
Co-authored-by: 1hitsong <3330318+1hitsong@users.noreply.github.com>
---
components/ListPoster.bs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/ListPoster.bs b/components/ListPoster.bs
index 62b970d1f..70f89cd6b 100644
--- a/components/ListPoster.bs
+++ b/components/ListPoster.bs
@@ -69,7 +69,7 @@ sub itemContentChanged() as void
end if
end if
- if isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played = true
+ if isValid(itemData.json) and isValid(itemData.json.UserData) and isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played
m.playedIndicator.visible = true
end if