A fix for upcoming videos

This commit is contained in:
Brahim Hadriche committed 2023-10-22 16:08:56 -04:00
1 parent e1b7500d7c
commit 6fd34c13d1
1 file changed
+7 -4
@@ -17,7 +17,8 @@ function FindChildren()
m.thumbnail = m.top.FindNode("thumbnail")
end function
' TODO:P0 premeres in x hours is not displayed correctly, and ends up failing with an error
' TODO:P1 premeres in x hours is not displayed correctly, and ends up failing with an error
' Need to try not a live event, but a video
function OnContentSet() as void
content = m.top.itemContent
@@ -32,14 +33,16 @@ function OnContentSet() as void
m.titleLabel.text = content.title
m.authorLabel.text = content.author
if not StringUtils.IsNullOrEmpty(content.publishedText)
if content.isUpcoming = true
m.viewCountDateLabel.text = content.premiereTimestampText
else if not StringUtils.IsNullOrEmpty(content.publishedText)
label = content.publishedText
if not StringUtils.IsNullOrEmpty(content.viewCountText)
label = `${label} • ${content.viewCountText}`
end if
m.viewCountDateLabel.text = label
else if content.isUpcoming = true
m.viewCountDateLabel.text = content.premiereTimestampText
else
m.viewCountDateLabel.text = ""
end if
m.thumbnail.uri = content.thumbnail