Add author and release date

This commit is contained in:
Brahim Hadriche committed 2022-11-05 17:09:29 -04:00
1 parent 69ca9c819c
commit 244fd61296
4 files changed
+20 -2

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@
rowitemSize="[[320,180]]"
rowItemSpacing="[[20,0]]"
itemSize="[1160,270]"
itemSpacing="[0,20]"
itemSpacing="[0,45]"
rowLabelOffset="[[50,20]]"
focusXOffset="[50]"
showRowLabel="[true]"
@@ -1,10 +1,12 @@
import "pkg:/source/utils/Utils.bs"
sub OnContentSet()
sub OnContentSet()
content = m.top.itemContent
if content <> invalid
m.top.FindNode("titleLabel").text = content.title
m.top.FindNode("authorLabel").text = content.author
m.top.FindNode("dateLabel").text = content.releaseDate
m.top.FindNode("poster").uri = content.hdPosterUrl
if content.length <> invalid and content.length <> 0
m.top.FindNode("durationLabel").text = RokuYoutube.Utils.GetFormattedTime(content.length)
@@ -39,5 +39,20 @@
font="font:SmallestSystemFont"
translation="[0, 200]"
/>
<Label
id="authorLabel"
width="320"
height="25"
font="font:SmallestBoldSystemFont"
translation="[0, 225]"
/>
<Label
id="dateLabel"
width="320"
height="25"
horizAlign="right"
font="font:SmallestSystemFont"
translation="[0, 225]"
/>
</children>
</component>
+1
View File
@@ -78,5 +78,6 @@ function GetItemData(video as object) as object
item.releaseDate = video.publishedText
item.id = video.videoId
item.length = video.lengthSeconds
item.author = video.author
return item
end function