diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2023-02-10 23:42:04 +0100 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2023-02-10 23:42:04 +0100 |
| commit | feeb872791c38d164eff1a52a5d2645fab509895 (patch) | |
| tree | f447f7f435746c70db052aa3a5c99cc22e919ac4 /src | |
| parent | d6dd341594cc837001ed57cbea3103d22c9988c1 (diff) | |
| parent | e0c70d34cc3f937149d5c36c76aed8d8b57b4de5 (diff) | |
| download | invidious-feeb872791c38d164eff1a52a5d2645fab509895.tar.gz invidious-feeb872791c38d164eff1a52a5d2645fab509895.tar.bz2 invidious-feeb872791c38d164eff1a52a5d2645fab509895.zip | |
YT Comments: parse isPinned and strikethroughs (#3626)
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..41b0efa8 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"]?.try(&.as_bool) == true) + 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 |
