Done some refactoring

This commit is contained in:
Jonas Wunderlich
2022-03-13 20:16:30 +01:00
parent a09fbad8b0
commit aa09bbe23d
9 changed files with 23 additions and 17 deletions

View File

@@ -145,8 +145,9 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b
content_html = node_comment["contentText"]?.try { |t| parse_content(t) } || ""
author = node_comment["authorText"]?.try &.["simpleText"]? || ""
verified = (node_comment["authorCommentBadge"]? != nil)
json.field "verified", (verified || false)
json.field "verified", (node_comment["authorCommentBadge"]? != nil)
json.field "author", author
json.field "authorThumbnails" do
json.array do