From 8934050961083f69794166a16998fc30825cb56b Mon Sep 17 00:00:00 2001 From: Fijxu Date: Fri, 22 May 2026 23:09:05 -0400 Subject: [PATCH] fix playlists parsing for playlists without metadataParts On some channels like MrBeast, metadataParts is absent, missing the author information, this is intended behaviour by Youtube since there is no author information attached to them. Example URL: https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA/playlists --- src/invidious/yt_backend/extractors.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious/yt_backend/extractors.cr b/src/invidious/yt_backend/extractors.cr index d0a30241..ab08a185 100644 --- a/src/invidious/yt_backend/extractors.cr +++ b/src/invidious/yt_backend/extractors.cr @@ -755,8 +755,8 @@ private module Parsers # "metadataParts": [ ... ] <-- metadataParts with the information we are searching for. # } # ] - metadata_parts = metadata.dig("metadata", "contentMetadataViewModel", "metadataRows") - .as_a.find { |row| row["metadataParts"]? } + metadata_parts = metadata.dig?("metadata", "contentMetadataViewModel", "metadataRows").try &.as_a + .find { |row| row["metadataParts"]? } .try &.dig("metadataParts", 0) if author_info = metadata_parts.try &.["text"]?