diff --git a/src/invidious.cr b/src/invidious.cr index 7e1094076..deebd44e4 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -221,7 +221,7 @@ end decrypt_function = [] of {name: String, value: Int32} spawn do loop do - client = make_client(YT_URL) + client = make_client(YT_URL) begin decrypt_function = update_decrypt_function(client) @@ -589,7 +589,8 @@ get "/api/v1/comments/:id" do |env| end content_text = item_comment["contentText"]["simpleText"]?.try &.as_s.rchop('\ufeff') - content_text ||= item_comment["contentText"]["runs"][0]["text"].as_s.rchop('\ufeff') + content_text ||= item_comment["contentText"]["runs"].as_a.map { |comment| comment["text"] } + .join("").rchop('\ufeff') json.field "author", item_comment["authorText"]["simpleText"] json.field "authorThumbnails" do diff --git a/src/invidious/helpers.cr b/src/invidious/helpers.cr index 370e1efdc..9c949bf50 100644 --- a/src/invidious/helpers.cr +++ b/src/invidious/helpers.cr @@ -519,12 +519,13 @@ def template_youtube_comments(comments) if child["replies"]? replies_html = <<-END_HTML
-
-
-

- View #{child["replies"]["replyCount"]} replies -

+
+
END_HTML end