mirror of
https://github.com/iv-org/invidious.git
synced 2025-02-24 08:18:22 -06:00
Corrected usage of publishedText variable throughout the code
This commit is contained in:
parent
7b7197cde8
commit
cab02d4959
@ -246,7 +246,11 @@ module Invidious::JSONify::APIv1
|
|||||||
json.field "viewCountText", rv["short_view_count"]?
|
json.field "viewCountText", rv["short_view_count"]?
|
||||||
json.field "viewCount", rv["view_count"]?.try &.empty? ? nil : rv["view_count"].to_i64
|
json.field "viewCount", rv["view_count"]?.try &.empty? ? nil : rv["view_count"].to_i64
|
||||||
json.field "published", rv["published"]?
|
json.field "published", rv["published"]?
|
||||||
json.field "publishedTimeText", translate(locale, "`x` ago", rv["publishedText"].to_s.gsub(" ago", ""))
|
if !rv[published].nil?
|
||||||
|
json.field "publishedText", translate(locale, "`x` ago", recode_date(rv[published], locale))
|
||||||
|
else
|
||||||
|
json.field "publishedText", translate(locale, "`x` ago", "NaN")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -56,7 +56,6 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)?
|
|||||||
"short_view_count" => JSON::Any.new(short_view_count || "0"),
|
"short_view_count" => JSON::Any.new(short_view_count || "0"),
|
||||||
"author_verified" => JSON::Any.new(author_verified),
|
"author_verified" => JSON::Any.new(author_verified),
|
||||||
"published" => JSON::Any.new(published || ""),
|
"published" => JSON::Any.new(published || ""),
|
||||||
"publishedText" => JSON::Any.new(published_time_text || ""),
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user