use region param in videos api endpoint
This commit is contained in:
1 parent
d8bfd8859e
commit
79d9e0f069
3 files changed
+10
-2
No files matched your search
@@ -107,6 +107,7 @@ namespace Invidious
|
||||
cacheSeconds = 18000 ' 5 hours
|
||||
cancellation = invalid
|
||||
tryCount = 2
|
||||
region = invalid
|
||||
|
||||
if options <> invalid
|
||||
if options.DoesExist("cacheSeconds")
|
||||
@@ -118,6 +119,9 @@ namespace Invidious
|
||||
if options.DoesExist("tryCount")
|
||||
tryCount = options.tryCount
|
||||
end if
|
||||
if options.DoesExist("region")
|
||||
region = options.region
|
||||
end if
|
||||
end if
|
||||
|
||||
instance = m.GetInstance()
|
||||
@@ -125,6 +129,10 @@ namespace Invidious
|
||||
|
||||
request = HttpClient.Get(url)
|
||||
|
||||
if not StringUtils.IsNullOrEmpty(region)
|
||||
request.QueryParam("region", region)
|
||||
end if
|
||||
|
||||
request.CacheSeconds(cacheSeconds)
|
||||
request.Cancellation(cancellation)
|
||||
|
||||
|
||||
Reference in new issue
Block a user