Skip to content

Commit

Permalink
Merge pull request #1496 from jimdogx/fix/jf-1426-network-show-logo-bug
Browse files Browse the repository at this point in the history
Use TV Show thumbnail instead of Channel logo
  • Loading branch information
jimdogx authored Nov 12, 2023
2 parents 6e6ecbb + 0e1cf6c commit 182bd4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/home/HomeItem.bs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ sub itemContentChanged()
if itemData.type = "Program"
m.itemText.Text = itemData.json.name
m.itemTextExtra.Text = itemData.json.ChannelName
if itemData.widePosterURL <> ""
m.itemPoster.uri = ImageURL(itemData.widePosterURL)
if itemData.usePoster
m.itemPoster.uri = itemData.thumbnailURL
else
m.itemPoster.uri = ImageURL(itemData.json.ChannelId)
m.itemPoster.loadDisplayMode = "scaleToFill"
end if
m.itemPoster.loadDisplayMode = "scaleToFill"

' Set Episode title if available
if isValid(itemData.json.EpisodeTitle)
Expand Down
10 changes: 10 additions & 0 deletions components/home/HomeRows.bs
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,23 @@ sub updateOnNowItems()
' remake row using the new data
row = CreateObject("roSGNode", "HomeRow")
row.title = tr("On Now")
itemSize = [464, 331]
row.imageWidth = 464
for each item in itemData
row.usePoster = false
if (not isValid(item.thumbnailURL) or item.thumbnailURL = "") and isValid(item.json) and isValid(item.json.imageURL)
item.thumbnailURL = item.json.imageURL
row.usePoster = true
row.imageWidth = 180
itemSize = [188, 331]
end if
item.usePoster = row.usePoster
item.imageWidth = row.imageWidth
row.appendChild(item)
end for

' replace the old row
updateSizeArray(itemSize, m.homeSectionIndexes.livetv, "replace")
m.top.content.replaceChild(row, m.homeSectionIndexes.livetv)

end if
Expand Down

1 comment on commit 182bd4d

@candry7731
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If users do not have show images then the entire row is blue box backgrounds which looks horrible. Could we check to see if show images exist if not check channel image if not set to blue background?

  1. use tv show image, if available
  2. use channel image, if available
  3. use blue background if none above is available.

Sorry I am late on this...

Please sign in to comment.