fix channel sort
This commit is contained in:
1 parent
0123f9fa8e
commit
84504a5931
2 files changed
+54
-1
No files matched your search
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Attempt to fix watch history and watch progress
|
- Attempt to fix watch history and watch progress
|
||||||
|
- Channel sort
|
||||||
|
|
||||||
## [0.44.6] - 2026-02-08
|
## [0.44.6] - 2026-02-08
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ namespace Innertube
|
|||||||
"richGridRenderer": ParseRichGridRenderer
|
"richGridRenderer": ParseRichGridRenderer
|
||||||
"richItemRenderer": ParseRichItemRenderer
|
"richItemRenderer": ParseRichItemRenderer
|
||||||
"feedFilterChipBarRenderer": ParseFeedFilterChipBarRenderer
|
"feedFilterChipBarRenderer": ParseFeedFilterChipBarRenderer
|
||||||
|
"chipBarViewModel": ParseChipBarViewModel
|
||||||
"continuationItemRenderer": ParseContinuationItemRenderer
|
"continuationItemRenderer": ParseContinuationItemRenderer
|
||||||
"appendContinuationItemsAction": ParseAppendContinuationItemsAction
|
"appendContinuationItemsAction": ParseAppendContinuationItemsAction
|
||||||
"reloadContinuationItemsCommand": ParseReloadContinuationItemsCommand
|
"reloadContinuationItemsCommand": ParseReloadContinuationItemsCommand
|
||||||
@@ -1720,13 +1721,64 @@ namespace Innertube
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function ParseRichGridRenderer(nodeData as object, context as object) as object
|
function ParseRichGridRenderer(nodeData as object, context as object) as object
|
||||||
feedFilterChipBarRenderer = ObjectUtils.Dig(nodeData, ["header", "feedFilterChipBarRenderer"])
|
header = nodeData["header"]
|
||||||
|
feedFilterChipBarRenderer = invalid
|
||||||
|
chipBarViewModel = invalid
|
||||||
|
if IsAssociativeArray(header)
|
||||||
|
feedFilterChipBarRenderer = header["feedFilterChipBarRenderer"]
|
||||||
|
chipBarViewModel = header["chipBarViewModel"]
|
||||||
|
end if
|
||||||
|
|
||||||
if feedFilterChipBarRenderer <> invalid
|
if feedFilterChipBarRenderer <> invalid
|
||||||
ParseFeedFilterChipBarRenderer(feedFilterChipBarRenderer, context)
|
ParseFeedFilterChipBarRenderer(feedFilterChipBarRenderer, context)
|
||||||
|
else if chipBarViewModel <> invalid
|
||||||
|
ParseChipBarViewModel(chipBarViewModel, context)
|
||||||
end if
|
end if
|
||||||
return nodeData["contents"]
|
return nodeData["contents"]
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ParseChipBarViewModel(nodeData as object, context as object) as object
|
||||||
|
chips = ObjectUtils.Dig(nodeData, ["chips"])
|
||||||
|
if not IsArray(chips)
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
sortOptions = []
|
||||||
|
for each chip in chips
|
||||||
|
chipViewModel = chip["chipViewModel"]
|
||||||
|
if not IsAssociativeArray(chipViewModel)
|
||||||
|
continue for
|
||||||
|
end if
|
||||||
|
title = ValidString(chipViewModel["text"])
|
||||||
|
isSelected = ValidBool(chipViewModel["selected"])
|
||||||
|
token = invalid
|
||||||
|
tapCommand = chipViewModel["tapCommand"]
|
||||||
|
if IsAssociativeArray(tapCommand)
|
||||||
|
innertubeCommand = tapCommand["innertubeCommand"]
|
||||||
|
if IsAssociativeArray(innertubeCommand)
|
||||||
|
continuationCommand = innertubeCommand["continuationCommand"]
|
||||||
|
if IsAssociativeArray(continuationCommand)
|
||||||
|
token = ValidString(continuationCommand["token"])
|
||||||
|
end if
|
||||||
|
end if
|
||||||
|
end if
|
||||||
|
if title = "" or StringUtils.IsNullOrEmpty(token)
|
||||||
|
continue for
|
||||||
|
end if
|
||||||
|
sortOptions.Push({
|
||||||
|
"title": title
|
||||||
|
"continuation": token
|
||||||
|
"isSelected": isSelected
|
||||||
|
})
|
||||||
|
end for
|
||||||
|
|
||||||
|
if sortOptions.Count() > 0
|
||||||
|
context.currentFeed.sortOptions = sortOptions
|
||||||
|
end if
|
||||||
|
|
||||||
|
return invalid
|
||||||
|
end function
|
||||||
|
|
||||||
function ParseRichItemRenderer(nodeData as object, _context as object) as object
|
function ParseRichItemRenderer(nodeData as object, _context as object) as object
|
||||||
return nodeData["content"]
|
return nodeData["content"]
|
||||||
end function
|
end function
|
||||||
|
|||||||
Reference in new issue
Block a user