diff --git a/components/ItemGrid2/GridItem.brs b/components/ItemGrid2/GridItem.brs index f5bfbac3..2d2a4a6f 100644 --- a/components/ItemGrid2/GridItem.brs +++ b/components/ItemGrid2/GridItem.brs @@ -19,6 +19,10 @@ sub itemContentChanged() itemPoster.uri = itemData.PosterUrl m.itemText.text = itemData.Title return + else if itemData.type = "Boxset" then + itemPoster.uri = itemData.PosterUrl + m.itemText.text = itemData.Title + return end if print "Unhandled Item Type: " + itemData.type diff --git a/components/ItemGrid2/LoadItemsTask2.brs b/components/ItemGrid2/LoadItemsTask2.brs index f5afc5a2..d192669a 100644 --- a/components/ItemGrid2/LoadItemsTask2.brs +++ b/components/ItemGrid2/LoadItemsTask2.brs @@ -38,6 +38,8 @@ sub loadItems() tmp = CreateObject("roSGNode", "MovieData") else if item.Type = "Series" then tmp = CreateObject("roSGNode", "SeriesData") + else if item.Type = "BoxSet" then + tmp = CreateObject("roSGNode", "CollectionData") else print "Unknown Type: " item.Type diff --git a/components/data/CollectionData.brs b/components/data/CollectionData.brs index afc8c0c8..530ccd79 100644 --- a/components/data/CollectionData.brs +++ b/components/data/CollectionData.brs @@ -1,18 +1,37 @@ sub setFields() - datum = m.top.json + json = m.top.json - m.top.id = datum.id - m.top.title = datum.name - m.top.overview = datum.overview - - m.top.favorite = datum.UserData.isFavorite - m.top.watched = datum.UserData.played + m.top.id = json.id + m.top.Title = json.name + m.top.overview = json.overview + m.top.Description = json.overview + m.top.favorite = json.UserData.isFavorite + m.top.watched = json.UserData.played + m.top.Type = "Boxset" + + setPoster() end sub sub setPoster() if m.top.image <> invalid m.top.posterURL = m.top.image.url else - m.top.posterURL = "" + + if m.top.json.ImageTags.Primary <> invalid then + + imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag" : m.top.json.ImageTags.Primary } + m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) + else if m.top.json.BackdropImageTags <> invalid then + imgParams = { "maxHeight": 440, "Tag" : m.top.json.BackdropImageTags[0] } + m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams) + end if + + ' Add Backdrop Image + if m.top.json.BackdropImageTags <> invalid then + imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag" : m.top.json.BackdropImageTags[0] } + m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams) + end if + end if + end sub \ No newline at end of file diff --git a/components/data/CollectionData.xml b/components/data/CollectionData.xml index f2b79f11..60e413d9 100644 --- a/components/data/CollectionData.xml +++ b/components/data/CollectionData.xml @@ -1,16 +1,12 @@ - + - - - - - - -