mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Update source and licenses
This commit is contained in:
parent
ba02be08bb
commit
6fb44083ec
7 changed files with 27 additions and 1061 deletions
|
@ -347,7 +347,6 @@ get "/watch" do |env|
|
|||
|
||||
params = process_video_params(env.params.query, preferences)
|
||||
env.params.query.delete_all("listen")
|
||||
env.params.query.delete_all("iv_load_policy")
|
||||
|
||||
begin
|
||||
video = get_video(id, PG_DB, proxies, region: params.region)
|
||||
|
@ -359,9 +358,12 @@ get "/watch" do |env|
|
|||
next templated "error"
|
||||
end
|
||||
|
||||
if preferences.annotations_subscribed && subscriptions.includes? video.ucid
|
||||
if preferences.annotations_subscribed &&
|
||||
subscriptions.includes?(video.ucid) &&
|
||||
(env.params.query["iv_load_policy"]? || "1") == "1"
|
||||
params.annotations = true
|
||||
end
|
||||
env.params.query.delete_all("iv_load_policy")
|
||||
|
||||
if watched && !watched.includes? id
|
||||
PG_DB.exec("UPDATE users SET watched = watched || $1 WHERE email = $2", [id], user.as(User).email)
|
||||
|
@ -554,7 +556,9 @@ get "/embed/:id" do |env|
|
|||
next templated "error"
|
||||
end
|
||||
|
||||
if preferences.annotations_subscribed && subscriptions.includes? video.ucid
|
||||
if preferences.annotations_subscribed &&
|
||||
subscriptions.includes?(video.ucid) &&
|
||||
(env.params.query["iv_load_policy"]? || "1") == "1"
|
||||
params.annotations = true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue