From f73ec76f117bc4399bda7ca8de2471d62823e78d Mon Sep 17 00:00:00 2001 From: syeopite <70992037+syeopite@users.noreply.github.com> Date: Sun, 17 Sep 2023 18:30:06 +0000 Subject: [PATCH] Use short syntax for comment entry-point detection Co-authored-by: Samantaz Fox --- src/invidious/videos/parser.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index 46f2ad53..c75ec7c1 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -421,7 +421,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any # When comments are enabled there should be a comments-entry-point section in the primary results if primary_results - section = primary_results.as_a.find { |s| s.dig?("itemSectionRenderer", "sectionIdentifier") == "comments-entry-point" } + section = primary_results.as_a.find(&.dig?("itemSectionRenderer", "sectionIdentifier").== "comments-entry-point") if section comments_enabled = true