mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-30 02:32:56 +05:30
Fix type cast for viewCount
This commit is contained in:
parent
b902880a05
commit
3896230199
@ -428,8 +428,8 @@ struct Video
|
|||||||
end
|
end
|
||||||
|
|
||||||
json.field "author", rv["author"]
|
json.field "author", rv["author"]
|
||||||
json.field "authorUrl", rv["author_url"] if rv["author_url"]?
|
json.field "authorUrl", rv["author_url"]?
|
||||||
json.field "authorId", rv["ucid"] if rv["ucid"]?
|
json.field "authorId", rv["ucid"]?
|
||||||
if rv["author_thumbnail"]?
|
if rv["author_thumbnail"]?
|
||||||
json.field "authorThumbnails" do
|
json.field "authorThumbnails" do
|
||||||
json.array do
|
json.array do
|
||||||
@ -448,7 +448,7 @@ struct Video
|
|||||||
|
|
||||||
json.field "lengthSeconds", rv["length_seconds"].to_i
|
json.field "lengthSeconds", rv["length_seconds"].to_i
|
||||||
json.field "viewCountText", rv["short_view_count_text"]
|
json.field "viewCountText", rv["short_view_count_text"]
|
||||||
json.field "viewCount", rv["view_count"].to_i if rv["view_count"]?
|
json.field "viewCount", rv["view_count"]?.try &.to_i64
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user