mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add support for AAhBBmCCsDDms in video start and end params
This commit is contained in:
parent
fef2cbc0b2
commit
75f8fcd40b
3 changed files with 35 additions and 7 deletions
|
@ -242,17 +242,23 @@ get "/watch" do |env|
|
|||
next env.redirect "/"
|
||||
end
|
||||
|
||||
video_start = env.params.query["start"]?.try &.to_i
|
||||
video_start ||= 0
|
||||
if env.params.query["start"]?
|
||||
video_start = decode_time(env.params.query["start"])
|
||||
else
|
||||
video_start = 0
|
||||
end
|
||||
|
||||
video_end = env.params.query["end"]?.try &.to_i
|
||||
video_end ||= -1
|
||||
if env.params.query["end"]?
|
||||
video_end = decode_time(env.params.query["end"])
|
||||
else
|
||||
video_end = -1
|
||||
end
|
||||
|
||||
listen = false
|
||||
if env.params.query["listen"]? && env.params.query["listen"] == "true"
|
||||
listen = true
|
||||
env.params.query.delete_all("listen")
|
||||
end
|
||||
listen ||= false
|
||||
|
||||
authorized = env.get? "authorized"
|
||||
if authorized
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue