Fix view count for playlist items

This commit is contained in:
Brahim Hadriche committed 2022-11-19 12:31:05 -05:00
1 parent 71b7a03318
commit 97ae825126
1 file changed
+9 -1
+9 -1
View File
@@ -6,7 +6,15 @@ function OnContentSet()
if content <> invalid
m.top.FindNode("titleLabel").text = content.title
m.top.FindNode("authorLabel").text = content.author
m.top.FindNode("viewCountDateLabel").text = `${content.releaseDate} • ${FormatViewCount(content.viewCount)}`
releaseDate = validstr(content.releaseDate)
viewCount = FormatViewCount(content.viewCount)
if releaseDate = "" and viewCount = ""
m.top.FindNode("viewCountDateLabel").text = ""
else
m.top.FindNode("viewCountDateLabel").text = `${releaseDate} • ${viewCount}`
end if
thumbnail = m.top.FindNode("thumbnail")
thumbnail.uri = content.hdPosterUrl
thumbnail.id = `thumbnail-${content.id}`