Fix redirect missing timestamp param
This commit is contained in:
1 parent
a598d362ba
commit
6f74ee61f6
1 file changed
+7
-1
+7
-1
@@ -597,6 +597,8 @@ namespace Http
|
||||
response = context.response
|
||||
|
||||
videoId = request.query.v
|
||||
t = request.query.t
|
||||
|
||||
if StringUtils.IsNullOrEmpty(videoId)
|
||||
response.Json({
|
||||
"error": "Missing 'v' query parameter"
|
||||
@@ -605,7 +607,11 @@ namespace Http
|
||||
return true
|
||||
end if
|
||||
|
||||
response.Redirect(`https://redirect.invidious.io/watch?v=${videoId}`)
|
||||
url = `https://redirect.invidious.io/watch?v=${videoId}`
|
||||
if not StringUtils.IsNullOrEmpty(t)
|
||||
url = `${url}&t=${t}`
|
||||
end if
|
||||
response.Redirect(url)
|
||||
return true
|
||||
end function
|
||||
|
||||
|
||||
Reference in new issue
Block a user