diff --git a/components/ItemGrid2/ItemGrid2.brs b/components/ItemGrid2/ItemGrid2.brs
index 25d3cbdc..589359e7 100644
--- a/components/ItemGrid2/ItemGrid2.brs
+++ b/components/ItemGrid2/ItemGrid2.brs
@@ -3,6 +3,7 @@ sub init()
m.itemGrid = m.top.findNode("itemGrid")
m.backdrop = m.top.findNode("backdrop")
m.newBackdrop = m.top.findNode("backdropTransition")
+ m.emptyText = m.top.findNode("emptyText")
m.swapAnimation = m.top.findNode("backroundSwapAnimation")
m.swapAnimation.observeField("state", "swapDone")
@@ -30,6 +31,10 @@ end sub
'Load initial set of Data
sub loadInitialItems()
+ if m.top.parentItem.backdropUrl <> invalid then
+ SetBackground(m.top.parentItem.backdropUrl)
+ end if
+
m.loadItemsTask.itemId = m.top.parentItem.Id
m.loadItemsTask.observeField("content", "ItemDataLoaded")
@@ -62,6 +67,15 @@ sub ItemDataLoaded(msg)
m.loadedItems = m.itemGrid.content.getChildCount()
m.loadedRows = m.loadedItems / m.itemGrid.numColumns
m.Loading = false
+
+ 'If there are no items to display, show message
+ if m.loadedItems = 0 then
+ m.emptyText.text = tr("NO_ITEMS").Replace("%1", m.top.parentItem.Type)
+ m.emptyText.visible = true
+ end if
+
+ m.itemGrid.setFocus(true)
+
end sub
'
@@ -83,9 +97,14 @@ sub onItemFocused()
focusedRow = CInt(m.itemGrid.itemFocused / m.itemGrid.numColumns) + 1
- ' Set Background
itemInt = m.itemGrid.itemFocused
+ ' If no selected item, set background to parent backdrop
+ if itemInt = -1 then
+ return
+ end if
+
+ ' Set Background to item backdrop
SetBackground(m.itemGrid.content.getChild(m.itemGrid.itemFocused).backdropUrl)
' Load more data if focus is within last 3 rows, and there are more items to load
diff --git a/components/ItemGrid2/ItemGrid2.xml b/components/ItemGrid2/ItemGrid2.xml
index dc606440..fa56a59c 100644
--- a/components/ItemGrid2/ItemGrid2.xml
+++ b/components/ItemGrid2/ItemGrid2.xml
@@ -23,6 +23,7 @@
itemSize = "[ 290, 425 ]"
itemSpacing = "[ 0, 45 ]"
drawFocusFeedback = "false" />
+
diff --git a/components/home/HomeItem.brs b/components/home/HomeItem.brs
index bee4eb1a..d0e68d9b 100644
--- a/components/home/HomeItem.brs
+++ b/components/home/HomeItem.brs
@@ -1,7 +1,8 @@
sub itemContentChanged()
itemData = m.top.itemContent
if itemData = invalid then return
-
+ itemData.Title = itemData.name ' Temporarily required while we move from "HomeItem" to "JFContentItem"
+
m.itemText = m.top.findNode("itemText")
itemPoster = m.top.findNode("itemPoster")
itemTextExtra = m.top.findNode("itemTextExtra")
diff --git a/locale/en_GB/translations.ts b/locale/en_GB/translations.ts
index bf3d56ac..b1413853 100644
--- a/locale/en_GB/translations.ts
+++ b/locale/en_GB/translations.ts
@@ -252,5 +252,13 @@
Unable to load Channel Data from the server
+
+
+ Message displayed in Item Grid when no item to display. %1 is container type (e.g. Boxset, Collection, Folder, etc)
+
+ This %1 contains no items
+
+
+
diff --git a/locale/en_US/translations.ts b/locale/en_US/translations.ts
index 2bc0dcff..c7d5ec9f 100644
--- a/locale/en_US/translations.ts
+++ b/locale/en_US/translations.ts
@@ -253,5 +253,11 @@
Unable to load Channel Data from the server
+
+ Message displayed in Item Grid when no item to display. %1 is container type (e.g. Boxset, Collection, Folder, etc)
+
+ This %1 contains no items
+
+
diff --git a/source/Main.brs b/source/Main.brs
index 148c1d94..f1f03a0b 100644
--- a/source/Main.brs
+++ b/source/Main.brs
@@ -86,36 +86,36 @@ sub Main()
group.lastFocus = group.focusedChild
group.setFocus(false)
group.visible = false
- m.overhang.title = selectedItem.name
+ m.overhang.title = selectedItem.title
group = CreateMovieListGroup(selectedItem)
- group.overhangTitle = selectedItem.name
+ group.overhangTitle = selectedItem.title
m.scene.appendChild(group)
- else if (selectedItem.type = "CollectionFolder" OR selectedItem.type = "UserView") AND selectedItem.collectionType = "tvshows"
+ else if (selectedItem.type = "CollectionFolder" OR selectedItem.type = "UserView") AND selectedItem.collectionType = "tvshows"
group.lastFocus = group.focusedChild
group.setFocus(false)
group.visible = false
- m.overhang.title = selectedItem.name
+ m.overhang.title = selectedItem.title
group = CreateSeriesListGroup(selectedItem)
- group.overhangTitle = selectedItem.name
+ group.overhangTitle = selectedItem.title
m.scene.appendChild(group)
- else if (selectedItem.type = "CollectionFolder" OR selectedItem.type = "UserView") AND selectedItem.collectionType = "boxsets"
+ else if (selectedItem.type = "CollectionFolder" OR selectedItem.type = "UserView") AND selectedItem.collectionType = "boxsets" OR selectedItem.type = "Boxset"
group.lastFocus = group.focusedChild
group.setFocus(false)
group.visible = false
- m.overhang.title = selectedItem.name
+ m.overhang.title = selectedItem.title
group = CreateCollectionsList(selectedItem)
- group.overhangTitle = selectedItem.name
+ group.overhangTitle = selectedItem.title
m.scene.appendChild(group)
else if (selectedItem.type = "CollectionFolder" OR selectedItem.type = "UserView") AND selectedItem.collectionType = "livetv"
group.lastFocus = group.focusedChild
group.setFocus(false)
group.visible = false
- m.overhang.title = selectedItem.name
+ m.overhang.title = selectedItem.title
group = CreateChannelList(selectedItem.Id)
- group.overhangTitle = selectedItem.name
+ group.overhangTitle = selectedItem.title
m.scene.appendChild(group)
else if selectedItem.type = "Boxset" then
@@ -148,11 +148,11 @@ sub Main()
group.setFocus(false)
group.visible = false
- m.overhang.title = selectedItem.name
+ m.overhang.title = selectedItem.title
m.overhang.showOptions = false
m.scene.unobserveField("optionsPressed")
group = CreateSeriesDetailsGroup(selectedItem.json)
- group.overhangTitle = selectedItem.name
+ group.overhangTitle = selectedItem.title
m.scene.appendChild(group)
else if selectedItem.type = "Movie" then
' open movie detail page
@@ -160,11 +160,11 @@ sub Main()
group.setFocus(false)
group.visible = false
- m.overhang.title = selectedItem.name
+ m.overhang.title = selectedItem.title
m.overhang.showOptions = false
m.scene.unobserveField("optionsPressed")
group = CreateMovieDetailsGroup(selectedItem)
- group.overhangTitle = selectedItem.name
+ group.overhangTitle = selectedItem.title
m.scene.appendChild(group)
else if selectedItem.type = "Video" then
' play episode