mirror of
https://github.com/iv-org/invidious.git
synced 2025-01-10 03:20:35 +05:30
Use short syntax for comment entry-point detection
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
parent
78446a37e8
commit
f73ec76f11
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user