mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-09 15:02:14 +05:30
Use short syntax for comment entry-point detection
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
parent
83953d7fc2
commit
a455df4a6e
@ -383,7 +383,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
|
# When comments are enabled there should be a comments-entry-point section in the primary results
|
||||||
if 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
|
if section
|
||||||
comments_enabled = true
|
comments_enabled = true
|
||||||
|
Loading…
Reference in New Issue
Block a user