mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
API: Add playlist and start time to resolve_url
This adds `playlistId` and `startTimeSeconds` to /api/v1/resolveurl if these informations were returned by Youtube's endpoint.
This commit is contained in:
commit
9bd2072e1d
1 changed files with 2 additions and 0 deletions
|
@ -191,6 +191,8 @@ module Invidious::Routes::API::V1::Misc
|
|||
json.object do
|
||||
json.field "ucid", sub_endpoint["browseId"].as_s if sub_endpoint["browseId"]?
|
||||
json.field "videoId", sub_endpoint["videoId"].as_s if sub_endpoint["videoId"]?
|
||||
json.field "playlistId", sub_endpoint["playlistId"].as_s if sub_endpoint["playlistId"]?
|
||||
json.field "startTimeSeconds", sub_endpoint["startTimeSeconds"].as_i if sub_endpoint["startTimeSeconds"]?
|
||||
json.field "params", params.try &.as_s
|
||||
json.field "pageType", pageType
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue