Revert "use region param in videos api endpoint" (#317)
This reverts commit 79d9e0f069.
This commit is contained in:
1 parent
79d9e0f069
commit
405e1aa703
3 files changed
+2
-10
No files matched your search
@@ -107,7 +107,6 @@ namespace Invidious
|
|||||||
cacheSeconds = 18000 ' 5 hours
|
cacheSeconds = 18000 ' 5 hours
|
||||||
cancellation = invalid
|
cancellation = invalid
|
||||||
tryCount = 2
|
tryCount = 2
|
||||||
region = invalid
|
|
||||||
|
|
||||||
if options <> invalid
|
if options <> invalid
|
||||||
if options.DoesExist("cacheSeconds")
|
if options.DoesExist("cacheSeconds")
|
||||||
@@ -119,9 +118,6 @@ namespace Invidious
|
|||||||
if options.DoesExist("tryCount")
|
if options.DoesExist("tryCount")
|
||||||
tryCount = options.tryCount
|
tryCount = options.tryCount
|
||||||
end if
|
end if
|
||||||
if options.DoesExist("region")
|
|
||||||
region = options.region
|
|
||||||
end if
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
instance = m.GetInstance()
|
instance = m.GetInstance()
|
||||||
@@ -129,10 +125,6 @@ namespace Invidious
|
|||||||
|
|
||||||
request = HttpClient.Get(url)
|
request = HttpClient.Get(url)
|
||||||
|
|
||||||
if not StringUtils.IsNullOrEmpty(region)
|
|
||||||
request.QueryParam("region", region)
|
|
||||||
end if
|
|
||||||
|
|
||||||
request.CacheSeconds(cacheSeconds)
|
request.CacheSeconds(cacheSeconds)
|
||||||
request.Cancellation(cancellation)
|
request.Cancellation(cancellation)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function VideoContentTask(input as object) as object
|
|||||||
|
|
||||||
service = new Invidious.InvidiousService(invidiousNode)
|
service = new Invidious.InvidiousService(invidiousNode)
|
||||||
|
|
||||||
response = service.GetVideoMetadata(contentNode.videoId, { region: "US", cancellation: m.top.cancellation })
|
response = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
|
||||||
|
|
||||||
if m.top.cancel
|
if m.top.cancel
|
||||||
return invalid
|
return invalid
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace Http
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
metadataRequest = m.invidiousService.GetVideoMetadata(v, { region: "US" })
|
metadataRequest = m.invidiousService.GetVideoMetadata(v)
|
||||||
if not metadataRequest.IsSuccess()
|
if not metadataRequest.IsSuccess()
|
||||||
response.Default(metadataRequest.StatusCode(), metadataRequest.ErrorMessage())
|
response.Default(metadataRequest.StatusCode(), metadataRequest.ErrorMessage())
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in new issue
Block a user