mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Use the new youtube api for comments (#2217)
* use the new youtube api for comments * remove PG_DB & action parameter + allow force region * support new comments data with onResponseReceivedEndpoints
This commit is contained in:
parent
2fdb2c7c9a
commit
88c5e3b6fa
3 changed files with 45 additions and 51 deletions
|
@ -1873,9 +1873,6 @@ get "/api/v1/comments/:id" do |env|
|
|||
format = env.params.query["format"]?
|
||||
format ||= "json"
|
||||
|
||||
action = env.params.query["action"]?
|
||||
action ||= "action_get_comments"
|
||||
|
||||
continuation = env.params.query["continuation"]?
|
||||
sort_by = env.params.query["sort_by"]?.try &.downcase
|
||||
|
||||
|
@ -1883,7 +1880,7 @@ get "/api/v1/comments/:id" do |env|
|
|||
sort_by ||= "top"
|
||||
|
||||
begin
|
||||
comments = fetch_youtube_comments(id, PG_DB, continuation, format, locale, thin_mode, region, sort_by: sort_by, action: action)
|
||||
comments = fetch_youtube_comments(id, continuation, format, locale, thin_mode, region, sort_by: sort_by)
|
||||
rescue ex
|
||||
next error_json(500, ex)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue