videos: move API's JSON structure to a dedicated module

This commit is contained in:
Samantaz Fox
2022-08-23 19:03:09 +02:00
parent ae03ed7bf7
commit 87a5d70062
9 changed files with 272 additions and 255 deletions

View File

@@ -76,7 +76,7 @@ struct SearchVideo
json.field "authorUrl", "/channel/#{self.ucid}"
json.field "videoThumbnails" do
generate_thumbnails(json, self.id)
Invidious::JSONify::APIv1.thumbnails(json, self.id)
end
json.field "description", html_to_content(self.description_html)
@@ -155,7 +155,7 @@ struct SearchPlaylist
json.field "lengthSeconds", video.length_seconds
json.field "videoThumbnails" do
generate_thumbnails(json, video.id)
Invidious::JSONify::APIv1.thumbnails(json, video.id)
end
end
end