From 3d9bbc584ae8b12ddb1e08a9fd44643ac64c45c1 Mon Sep 17 00:00:00 2001 From: Neil Burrows Date: Sun, 25 Oct 2020 16:32:26 +0000 Subject: [PATCH] Add IconUrl to Home Screen Items and set for LiveTV when no poster --- components/data/HomeData.brs | 5 +++++ components/data/HomeData.xml | 1 + components/home/HomeItem.brs | 4 ++++ components/home/HomeItem.xml | 1 + 4 files changed, 11 insertions(+) diff --git a/components/data/HomeData.brs b/components/data/HomeData.brs index 823cf8f8..2a1fced0 100644 --- a/components/data/HomeData.brs +++ b/components/data/HomeData.brs @@ -20,6 +20,11 @@ sub setData() m.top.thumbnailURL = ImageURL(datum.id, "Primary", params) m.top.widePosterUrl = m.top.thumbnailURL + ' Add Icon URLs for display if there is no Poster + if datum.CollectionType = "livetv" then + m.top.iconUrl = "pkg:/images/baseline_live_tv_white_48dp.png" + end if + else if datum.type = "Episode" then imgParams = { "AddPlayedIndicator": datum.UserData.Played } diff --git a/components/data/HomeData.xml b/components/data/HomeData.xml index 71b54bd2..eea46a6b 100644 --- a/components/data/HomeData.xml +++ b/components/data/HomeData.xml @@ -4,6 +4,7 @@ + diff --git a/components/home/HomeItem.brs b/components/home/HomeItem.brs index 5a6cfc63..1efc1464 100644 --- a/components/home/HomeItem.brs +++ b/components/home/HomeItem.brs @@ -5,6 +5,7 @@ sub itemContentChanged() m.itemText = m.top.findNode("itemText") itemPoster = m.top.findNode("itemPoster") + itemIcon = m.top.findNode("itemIcon") itemTextExtra = m.top.findNode("itemTextExtra") ' Desired Image Width @@ -26,6 +27,9 @@ sub itemContentChanged() ' Whether to use WidePoster or Thumbnail in this row usePoster = m.top.GetParent().content.usePoster + if itemData.iconUrl <> invalid + itemIcon.uri = itemData.iconUrl + end if ' Format the Data based on the type of Home Data diff --git a/components/home/HomeItem.xml b/components/home/HomeItem.xml index da4faadc..71d723e9 100644 --- a/components/home/HomeItem.xml +++ b/components/home/HomeItem.xml @@ -2,6 +2,7 @@ +