From 33518607c5598e8bb51ca6b812338193d73b4b43 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Tue, 28 Oct 2025 20:25:59 -0400 Subject: [PATCH] parse radioRenderer --- CHANGELOG.md | 4 +++ .../Services/Innertube/NodesParser.bs | 29 ++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5ffb05a..80cac0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.43.1] - 2025-10-28 +### Added + +- Support for additional nodes parsing + ### Fixed - Trickplay storyboards on DRM videos diff --git a/playlet-lib/src/components/Services/Innertube/NodesParser.bs b/playlet-lib/src/components/Services/Innertube/NodesParser.bs index 301953ff..846e069c 100644 --- a/playlet-lib/src/components/Services/Innertube/NodesParser.bs +++ b/playlet-lib/src/components/Services/Innertube/NodesParser.bs @@ -103,7 +103,7 @@ namespace Innertube ' TODO:P2 handle navigateAction - which are usually a redirect ' "navigateAction": ParseNotImplemented ' TODO:P2 radioRenderer seems like a Mix https://github.com/iBicha/playlet/issues/709 - ' "radioRenderer": ParseNotImplemented + "radioRenderer": ParseRadioRenderer ' "compactRadioRenderer": ParseNotImplemented ' TODO:P2 A carousel of videos, found on the home tab of a channel. ' Should probably be parsed. @@ -997,6 +997,33 @@ namespace Innertube return invalid end function + function ParseRadioRenderer(nodeData as object, context as object) as object + playlistId = nodeData["playlistId"] + if not IsString(playlistId) + Warning("Invalid playlist ID in radioRenderer", nodeData, context) + return invalid + end if + + videoCountText = ParseText(nodeData["videoCountText"]) + + playlist = { + "type": "playlist" + "playlistId": playlistId + "title": ParseText(nodeData["title"]) + "playlistThumbnail": ObjectUtils.Dig(nodeData, ["thumbnail", "thumbnails", 0, "url"]) + "videoCountText": videoCountText + } + + ' Mixes have a videoId, which is the first video in the mix + videoId = ObjectUtils.Dig(nodeData, ["navigationEndpoint", "watchEndpoint", "videoId"]) + if IsString(videoId) + playlist["videoId"] = videoId + end if + + PushFeedItem(playlist, context) + return invalid + end function + function ParseGridShelfViewModel(nodeData as object, _context as object) as object return nodeData["contents"] end function