Add author and release date
This commit is contained in:
1 parent
69ca9c819c
commit
244fd61296
4 files changed
+20
-2
No files matched your search
@@ -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]"
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import "pkg:/source/utils/Utils.bs"
|
import "pkg:/source/utils/Utils.bs"
|
||||||
|
|
||||||
sub OnContentSet()
|
sub OnContentSet()
|
||||||
content = m.top.itemContent
|
content = m.top.itemContent
|
||||||
|
|
||||||
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>
|
||||||
@@ -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
|
||||||
Reference in new issue
Block a user