fix(parser): fix unavailable comments on videos
Some checks are pending
Build and release container directly from master / release (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.2, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.3, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.1, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.1, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.16.3, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Waiting to run
Invidious CI / build-docker (push) Waiting to run
Invidious CI / build-docker-arm64 (push) Waiting to run
Invidious CI / lint (push) Waiting to run

This commit is contained in:
Fijxu 2025-08-27 20:23:39 -04:00
parent 71e6c16348
commit 36ac67610d
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4

View File

@ -410,9 +410,9 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
# Comments enabled?
comments_enabled = false
# When comments are enabled there should be a comments-entry-point section in the primary results
# When comments are enabled there should be a comment-item-section section in the primary results
if primary_results
section = primary_results.as_a.find(&.dig?("itemSectionRenderer", "sectionIdentifier").== "comments-entry-point")
section = primary_results.as_a.find(&.dig?("itemSectionRenderer", "targetId").== "comments-section")
if section
comments_enabled = true