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.
pull/4431/head
Samantaz Fox 4 months ago
commit 9bd2072e1d
No known key found for this signature in database
GPG Key ID: F42821059186176E

@ -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…
Cancel
Save