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
|
response = context.response
|
||||||
|
|
||||||
videoId = request.query.v
|
videoId = request.query.v
|
||||||
|
t = request.query.t
|
||||||
|
|
||||||
if StringUtils.IsNullOrEmpty(videoId)
|
if StringUtils.IsNullOrEmpty(videoId)
|
||||||
response.Json({
|
response.Json({
|
||||||
"error": "Missing 'v' query parameter"
|
"error": "Missing 'v' query parameter"
|
||||||
@@ -605,7 +607,11 @@ namespace Http
|
|||||||
return true
|
return true
|
||||||
end if
|
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
|
return true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user