* Parse author in videoRenderer * Parse more fields * Parse live badge * playlist video count * Parse more things * parse playlists and albums * More parsing work * announcement and changelog * Lint fix --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
30 lines
928 B
Plaintext
30 lines
928 B
Plaintext
import "pkg:/source/utils/StringUtils.bs"
|
|
|
|
function OnContentSet() as void
|
|
content = m.top.itemContent
|
|
|
|
if content = invalid
|
|
return
|
|
end if
|
|
|
|
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
|
|
m.top._author = content._author
|
|
subCountText = content.authorSubTitle
|
|
if StringUtils.IsNullOrEmpty(subCountText)
|
|
if content.subCount > 0
|
|
subCountText = content.subCountText
|
|
if StringUtils.IsNullOrEmpty(subCountText)
|
|
subCountText = content.videoCountText
|
|
end if
|
|
else
|
|
subCountText = content.videoCountText
|
|
if StringUtils.IsNullOrEmpty(subCountText)
|
|
subCountText = content.subCountText
|
|
end if
|
|
end if
|
|
end if
|
|
m.top.subCountText = subCountText
|
|
m.top.channelHandle = content.channelHandle
|
|
m.top.thumbnail = content.thumbnail
|
|
end function
|