diff options
| author | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-07 22:02:35 -0500 |
|---|---|---|
| committer | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-07 22:02:35 -0500 |
| commit | b893bdac0d6b76a61e2cd972b29e44cf5b9c88f0 (patch) | |
| tree | 34c427667e4fc7b8b137c7b0189d09ed7f7955eb /src | |
| parent | d6dd341594cc837001ed57cbea3103d22c9988c1 (diff) | |
| download | invidious-b893bdac0d6b76a61e2cd972b29e44cf5b9c88f0.tar.gz invidious-b893bdac0d6b76a61e2cd972b29e44cf5b9c88f0.tar.bz2 invidious-b893bdac0d6b76a61e2cd972b29e44cf5b9c88f0.zip | |
parse isPinned, add support for strikethrough
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/comments.cr | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index d691ca36..357a461c 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -181,6 +181,8 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b json.field "content", html_to_content(content_html) json.field "contentHtml", content_html + json.field "isPinned", (node_comment["pinnedCommentBadge"]? != nil) + json.field "published", published.to_unix json.field "publishedText", translate(locale, "`x` ago", recode_date(published, locale)) @@ -670,6 +672,7 @@ def content_to_comment_html(content, video_id : String? = "") end text = "<b>#{text}</b>" if run["bold"]? + text = "<s>#{text}</s>" if run["strikethrough"]? text = "<i>#{text}</i>" if run["italics"]? text |
