Show channel handle instead of video count in search (#174)

This commit is contained in:
Brahim Hadriche authored and GitHub committed 2023-10-21 16:50:07 -04:00
1 parent 3b69140398
commit ceeb2bf37b
5 files changed
+6 -3

No files matched your search

+1
View File
@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Layout in channel view so that the upload time and view count of videos is visible
- A few things in the logger
- A bug where channels show "0 videos". Channel handle is shown instead.
### Changed
@@ -8,6 +8,7 @@
<!-- NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation -->
<field id="_author" type="string" />
<field id="authorId" type="string" />
<field id="channelHandle" type="string" />
<field id="description" type="string" />
<field id="subCount" type="integer" />
<field id="subCountText" type="string" />
@@ -110,6 +110,7 @@ namespace InvidiousContent
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
SetIfExists(node, "_author", item, "author")
SetIfExists(node, "authorId", item, "authorId")
SetIfExists(node, "channelHandle", item, "channelHandle")
SetIfExists(node, "description", item, "description")
SetIfExists(node, "subCount", item, "subCount")
node.subCountText = GetChannelSubCountText(item)
@@ -8,6 +8,6 @@ function OnContentSet() as void
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
m.top._author = content._author
m.top.subCountText = content.subCountText
m.top.videoCountText = content.videoCountText
m.top.channelHandle = content.channelHandle
m.top.thumbnail = content.thumbnail
end function
@@ -3,7 +3,7 @@
<field id="type" type="string" value="channel" />
<field id="_author" type="string" alias="authorLabel.text" />
<field id="subCountText" type="string" alias="subCountLabel.text" />
<field id="videoCountText" type="string" alias="videoCountLabel.text" />
<field id="channelHandle" type="string" alias="handleLabel.text" />
<field id="thumbnail" type="uri" alias="thumbnail.uri" />
<field id="itemContent" type="node" onChange="OnContentSet" />
</interface>
@@ -29,7 +29,7 @@
height="25"
font="font:SmallestSystemFont" />
<Label
id="videoCountLabel"
id="handleLabel"
width="196"
height="25"
font="font:SmallestSystemFont" />