From eed14d08a8c33424c2f8d7223351de04b20f47d2 Mon Sep 17 00:00:00 2001 From: RadoslavL <63926126+RadoslavL@users.noreply.github.com> Date: Thu, 31 Oct 2024 09:59:06 +0200 Subject: [PATCH] Update src/invidious/jsonify/api_v1/video_json.cr Co-authored-by: Samantaz Fox --- src/invidious/jsonify/api_v1/video_json.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/jsonify/api_v1/video_json.cr b/src/invidious/jsonify/api_v1/video_json.cr index 8c9a5cd3..53a4d241 100644 --- a/src/invidious/jsonify/api_v1/video_json.cr +++ b/src/invidious/jsonify/api_v1/video_json.cr @@ -246,7 +246,7 @@ module Invidious::JSONify::APIv1 json.field "viewCountText", rv["short_view_count"]? json.field "viewCount", rv["view_count"]?.try &.empty? ? nil : rv["view_count"].to_i64 json.field "published", rv["published"]? - if !rv["published"].nil? + if !rv["published"]?.nil? json.field "publishedText", translate(locale, "`x` ago", recode_date(Time.parse_rfc3339(rv["published"].to_s), locale)) else json.field "publishedText", ""