From 0c4d3fbb604085c7a9ad9d37a0c685a2c9f4e757 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Tue, 14 Oct 2025 11:17:22 -0400 Subject: [PATCH] Fix a bug where title and duration of songs were missing an an album playlist --- CHANGELOG.md | 6 ++++++ .../components/Services/Innertube/NodesParser.bs | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69320f0a..ab46bb33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +## Fixed + +- A bug where title and duration of songs were missing an an album playlist + ## [0.42.3] - 2025-10-12 ### Fixed diff --git a/playlet-lib/src/components/Services/Innertube/NodesParser.bs b/playlet-lib/src/components/Services/Innertube/NodesParser.bs index 4ff5c964..f258d0f9 100644 --- a/playlet-lib/src/components/Services/Innertube/NodesParser.bs +++ b/playlet-lib/src/components/Services/Innertube/NodesParser.bs @@ -91,6 +91,8 @@ namespace Innertube "gridContinuation": ParseGridContinuation "tvSurfaceContentContinuation": ParseTvSurfaceContentContinuation ' Ignored nodes: + ' 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 "compactRadioRenderer": ParseNotImplemented @@ -1363,6 +1365,10 @@ namespace Innertube end if end if + if lengthText = "" + lengthText = ParseText(ObjectUtils.Dig(nodeData, ["header", "trackTileHeaderRenderer", "duration"])) + end if + renderedLines = [] lines = ObjectUtils.Dig(nodeData, ["metadata", "tileMetadataRenderer", "lines"]) if IsArray(lines) @@ -1374,10 +1380,15 @@ namespace Innertube end for end if + title = ParseText(ObjectUtils.Dig(nodeData, ["metadata", "tileMetadataRenderer", "title"])) + if title = "" + title = ParseText(ObjectUtils.Dig(nodeData, ["header", "trackTileHeaderRenderer", "title"])) + end if + video = { "type": "video" "videoId": videoId - "title": ParseText(ObjectUtils.Dig(nodeData, ["metadata", "tileMetadataRenderer", "title"])) + "title": title "videoThumbnails": videoThumbnails "lengthText": lengthText "liveNow": liveNow