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
+19 -1

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@
rowitemSize="[[320,180]]" rowitemSize="[[320,180]]"
rowItemSpacing="[[20,0]]" rowItemSpacing="[[20,0]]"
itemSize="[1160,270]" itemSize="[1160,270]"
itemSpacing="[0,20]" itemSpacing="[0,45]"
rowLabelOffset="[[50,20]]" rowLabelOffset="[[50,20]]"
focusXOffset="[50]" focusXOffset="[50]"
showRowLabel="[true]" showRowLabel="[true]"
@@ -5,6 +5,8 @@ sub OnContentSet()
if content <> invalid if content <> invalid
m.top.FindNode("titleLabel").text = content.title 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 m.top.FindNode("poster").uri = content.hdPosterUrl
if content.length <> invalid and content.length <> 0 if content.length <> invalid and content.length <> 0
m.top.FindNode("durationLabel").text = RokuYoutube.Utils.GetFormattedTime(content.length) m.top.FindNode("durationLabel").text = RokuYoutube.Utils.GetFormattedTime(content.length)
@@ -39,5 +39,20 @@
font="font:SmallestSystemFont" font="font:SmallestSystemFont"
translation="[0, 200]" 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> </children>
</component> </component>
+1
View File
@@ -78,5 +78,6 @@ function GetItemData(video as object) as object
item.releaseDate = video.publishedText item.releaseDate = video.publishedText
item.id = video.videoId item.id = video.videoId
item.length = video.lengthSeconds item.length = video.lengthSeconds
item.author = video.author
return item return item
end function end function