Added a 'published' video parameter

This commit is contained in:
RadoslavL
2023-10-07 16:57:47 +03:00
parent bb14f79496
commit 6b929da0e1
2 changed files with 49 additions and 5 deletions

View File

@@ -245,6 +245,7 @@ module Invidious::JSONify::APIv1
json.field "lengthSeconds", rv["length_seconds"]?.try &.to_i
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"]?.try { |t| Time.parse(t, "%Y-%m-%d", Time::Location::UTC).to_unix } || Time.utc
end
end
end