From c12436f46421f04567e83bc71c5d108c80187696 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 21 Sep 2025 19:26:04 -0400 Subject: [PATCH] dash gen bug --- CHANGELOG.md | 6 ++++++ .../src/components/Services/Dash/DashManifest.bs | 12 ++++++------ .../components/Services/Innertube/PlayerEndpoint.bs | 3 ++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3dd5816..e551208c 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 + +- Dash generation bug + ## [0.41.20] - 2025-09-21 ### Fixed diff --git a/playlet-lib/src/components/Services/Dash/DashManifest.bs b/playlet-lib/src/components/Services/Dash/DashManifest.bs index 47740d74..e562fba7 100644 --- a/playlet-lib/src/components/Services/Dash/DashManifest.bs +++ b/playlet-lib/src/components/Services/Dash/DashManifest.bs @@ -295,15 +295,15 @@ class DashManifest for i = 0 to streams.Count() - 1 stream = streams[i] if stream.type.startsWith("audio/") - if stream.bitrate = invalid + if StringUtils.IsNullOrEmpty(stream.bitrate) LogWarn("Invalid audio stream bitrate, itag:", stream.itag) continue for end if - if stream.init = invalid + if StringUtils.IsNullOrEmpty(stream.init) LogWarn("Invalid audio stream init, itag:", stream.itag) continue for end if - if stream.index = invalid + if StringUtils.IsNullOrEmpty(stream.index) LogWarn("Invalid audio stream index, itag:", stream.itag) continue for end if @@ -325,15 +325,15 @@ class DashManifest stream = streams[i] if stream.type.startsWith("video/") - if stream.bitrate = invalid + if StringUtils.IsNullOrEmpty(stream.bitrate) LogWarn("Invalid video stream bitrate, itag:", stream.itag) continue for end if - if stream.init = invalid + if StringUtils.IsNullOrEmpty(stream.init) LogWarn("Invalid video stream init, itag:", stream.itag) continue for end if - if stream.index = invalid + if StringUtils.IsNullOrEmpty(stream.index) LogWarn("Invalid video stream index, itag:", stream.itag) continue for end if diff --git a/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs b/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs index 47b506dc..c89294fa 100644 --- a/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs +++ b/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs @@ -101,7 +101,7 @@ namespace Innertube hasLiveStreamingData = FormatsHaveLiveStreamingData(adaptiveFormats) or FormatsHaveLiveStreamingData(formats) - adaptiveFormats = TransformFormats(adaptiveFormats, not hasLiveStreamingData) + adaptiveFormats = TransformFormats(adaptiveFormats, not isLive and not hasLiveStreamingData) formats = TransformFormats(formats, false) parsedResponse["type"] = "video" @@ -592,6 +592,7 @@ namespace Innertube end if for each fmt in formats url = fmt["url"] + ' TODO: source=yt_premiere_broadcast - is this considered live? if IsString(url) and url.InStr("yt_live_broadcast") <> -1 return true end if