mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Add data for chapters to JSON endpoint for videos
This commit is contained in:
parent
6bddcea178
commit
2dc17d7409
1 changed files with 8 additions and 0 deletions
|
@ -201,6 +201,14 @@ module Invidious::JSONify::APIv1
|
|||
end
|
||||
end
|
||||
|
||||
if !video.chapters.empty?
|
||||
json.field "chapters" do
|
||||
json.object do
|
||||
Invidious::Videos::Chapters.to_json(json, video.chapters, video.automatically_generated_chapters?.as(Bool))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if !video.music.empty?
|
||||
json.field "musicTracks" do
|
||||
json.array do
|
||||
|
|
Loading…
Reference in a new issue