mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-19 20:08:29 +00:00
Add data for chapters to JSON endpoint for videos
This commit is contained in:
parent
9601de6a24
commit
c7e046f903
@ -218,6 +218,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 New Issue
Block a user