From cc5beb56304d1a142fc0dfa2b00730acd44d14ab Mon Sep 17 00:00:00 2001 From: wrvnnull Date: Mon, 17 Aug 2026 05:30:36 +0800 Subject: [PATCH] Continue scan past empty browseId in parse_related_video (#5722) get_browse_id returns "" (not nil) when no browseId is present, so the previous stopped on the first empty run and never reached a later creator that did carry a channel id. Now skip empty ids and keep scanning until a non-empty browseId is found (fixes the Greptile P1: first byline run empty, later run has id). --- src/invidious/videos/parser.cr | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index 97488373..de6a1b96 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -32,11 +32,16 @@ module Invidious::Videos::Parser ucid = byline.try do |b| runs = b.dig?("runs") next nil unless runs + found_id = nil runs.as_a.each do |run| - if id = HelperExtractors.get_browse_id(run) - break id - end + id = HelperExtractors.get_browse_id(run) + # get_browse_id returns "" (not nil) when no browseId is present, so an + # empty first run must not stop the scan. Only keep a non-empty id. + next if id.empty? + found_id = id + break end + found_id end author_verified = has_verified_badge?(related["ownerBadges"]?).to_s