diff --git a/assets/css/default.css b/assets/css/default.css index 244a5edd..e449df22 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -1,3 +1,10 @@ +.channel-owner { + background-color: #008BEC; + color: beige; + border-radius: 9px; + padding: 1px 6px; +} + .h-box { padding-left: 1em; padding-right: 1em; diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 3b9dd8eb..34113c97 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -158,6 +158,8 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale) comment_count = body["header"]["commentsHeaderRenderer"]["countText"]["simpleText"].as_s.delete("Comments,").to_i json.field "commentCount", comment_count end + + json.field "videoId", id json.field "comments" do json.array do @@ -217,6 +219,16 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale) json.field "publishedText", translate(locale, "`x` ago", recode_date(published)) json.field "likeCount", node_comment["likeCount"] json.field "commentId", node_comment["commentId"] + json.field "authorIsChannelOwner", node_comment["authorIsChannelOwner"] + + if node_comment["creatorHeart"]? + json.field "creatorHeart" do + json.object do + json.field "creatorThumbnail", node_comment["creatorHeart"]["creatorHeartRenderer"]["creatorThumbnail"]["thumbnails"][2] + json.field "creatorName", node_comment["creatorHeart"]["creatorHeartRenderer"]["creatorThumbnail"]["accessibility"]["accessibilityData"]["label"] + end + end + end if node_replies && !response["commentRepliesContinuation"]? reply_count = node_replies["moreText"]["simpleText"].as_s.delete("View all reply replies,") @@ -326,12 +338,12 @@ def template_youtube_comments(comments, locale)

- #{child["author"]} + #{child["author"]}

#{child["contentHtml"]}

#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64)))} | - [YT] + [YT] | #{number_with_separator(child["likeCount"])}