Show lines in playlist view

This commit is contained in:
Brahim Hadriche committed 2025-05-21 21:21:42 -04:00
1 parent 07ebd011cf
commit 68a4f9fade
6 files changed
+31 -3

No files matched your search

@@ -1,3 +1,4 @@
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/TimeUtils.bs"
import "pkg:/source/utils/Types.bs"
@@ -15,7 +16,23 @@ function OnContentSet() as void
m.top.title = content.title
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
m.top.author = content._author
author = content._author
if not StringUtils.IsNullOrEmpty(author)
videoInfo = content.videoInfo
if not StringUtils.IsNullOrEmpty(videoInfo)
author += `\n` + videoInfo
end if
else
lines = content.lines
if IsArray(lines) and lines.Count() > 0
author = lines[0]
if lines.Count() > 1
author += `\n` + lines[1]
end if
end if
end if
m.top.author = author
m.top.thumbnailUri = content.thumbnail
SetDurationText(content.lengthText)
@@ -44,8 +44,9 @@
<Label
id="authorLabel"
width="350"
height="25"
font="font:SmallestSystemFont" />
font="font:SmallestSystemFont"
maxLines="2"
wrap="true" />
</LayoutGroup>
</children>