skipCreatorOnTheRise: true

This commit is contained in:
Brahim Hadriche committed 2025-01-10 17:34:58 -05:00
1 parent 26774d5655
commit af4c28a411
5 files changed
+36 -17

No files matched your search

@@ -204,7 +204,7 @@ namespace InnertubeService
end if
json = response.Json()
feeds = Innertube.ParseResponseDataForFeeds(json)
feeds = Innertube.ParseResponseDataForFeeds(json, { skipCreatorOnTheRise: true })
result = {
feeds: feeds
@@ -115,7 +115,20 @@ namespace Innertube
return nodeData["contents"]
end function
function ParseShelfRenderer(nodeData as object, _context as object) as object
function ParseShelfRenderer(nodeData as object, context as object) as object
if context.skipCreatorOnTheRise = true
badges = nodeData["badges"]
if IsArray(badges)
for each badge in badges
if ValidString(ObjectUtils.Dig(badge, ["metadataBadgeRenderer", "style"])) = "BADGE_STYLE_TYPE_FEATURED"
label = ParseText(ObjectUtils.Dig(badge, ["metadataBadgeRenderer", "label"]))
LogInfo(`Skipping 'Create on the Rise' shelf (${label})`)
return invalid
end if
end for
end if
end if
' TODO: handle shelfRenderer.title
' TODO: handle shelfRenderer.headerRenderer.shelfHeaderRenderer.avatarLockup.avatarLockupRenderer.title
return nodeData["content"]
@@ -180,6 +180,7 @@ namespace Http
end function
@get("/playlet-invidious-backend/api/v1/trending")
@get("/playlet-invidious-backend/api/v1/popular")
function GetTrending(context as object) as boolean
request = context.request
response = context.response
@@ -207,13 +208,6 @@ namespace Http
return true
end function
@get("/playlet-invidious-backend/api/v1/popular")
function GetPopular(context as object) as boolean
response = context.response
response.Redirect("/playlet-invidious-backend/api/v1/trending")
return true
end function
@get("/playlet-invidious-backend/api/v1/search/suggestions")
function GetSearchSuggestions(context as object) as boolean
request = context.request