Invidious is an alternative front-end to YouTube
Fix: related videos is a Hash(String, String)
Samantaz Fox3593f67eb60d
diff --git a/src/invidious/videos.cr b/src/invidious/videos.crindex 8ba667db..1504e390 100644--- a/src/invidious/videos.cr+++ b/src/invidious/videos.cr@@ -853,6 +853,7 @@ end# the same 11 first entries as the compact rendered.## TODO: "compactRadioRenderer" (Mix) and+# TODO: Use a proper struct/class instead of a hacky JSON objectdef parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)?return nil if !related["videoId"]?@@ -868,7 +869,7 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)?.try &.dig?("runs", 0)author = channel_info.try &.dig?("text")- author_verified = has_verified_badge?(related["ownerBadges"]?)+ author_verified = has_verified_badge?(related["ownerBadges"]?).to_sucid = channel_info.try { |ci| HelperExtractors.get_browse_id(ci) }