From b2c0f7efc373e924e401c030849c20566e813d0a Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Mon, 15 Aug 2022 10:34:52 +0200 Subject: [PATCH] Fix missing hash key: "toggleButtonRenderer" (issue #3260) --- src/invidious/videos.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index f87c6b47..cb1d1acf 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -1012,7 +1012,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any if toplevel_buttons likes_button = toplevel_buttons.as_a - .find(&.dig("toggleButtonRenderer", "defaultIcon", "iconType").as_s.== "LIKE") + .find(&.dig?("toggleButtonRenderer", "defaultIcon", "iconType").=== "LIKE") .try &.["toggleButtonRenderer"] if likes_button