From ba4318b62e45fc64e36584b4539bba802c91933f Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sun, 18 Oct 2026 00:05:06 -0300 Subject: [PATCH] fix comment preferences for nojs --- src/invidious/routes/watch.cr | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr index e3f59fe26..8a7d117a1 100644 --- a/src/invidious/routes/watch.cr +++ b/src/invidious/routes/watch.cr @@ -73,24 +73,12 @@ module Invidious::Routes::Watch if nojs if preferences - # Disables youtube comments source = preferences.comments[0] if source.empty? source = preferences.comments[1] + comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, preferences.thin_mode, region))["contentHtml"] end - - if source == "youtube" - begin - comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, preferences.thin_mode, region))["contentHtml"] - rescue - if preferences.comments[1] == "youtube" - comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, preferences.thin_mode, region))["contentHtml"] - end - end - end - else - comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, preferences.thin_mode, region))["contentHtml"] end comment_html ||= ""