remove region arg from video fetch job
This commit is contained in:
1 parent
77204c4449
commit
7ca98e7ef2
2 files changed
-12
No files matched your search
@@ -97,7 +97,6 @@ namespace Invidious
|
||||
end function
|
||||
|
||||
function GetVideoMetadata(videoId as string, options = invalid as object) as object
|
||||
region = true
|
||||
' 5 hours cache. Videos should expire in 6 hours, but since we don't
|
||||
' have the exact expiration time, we'll use 5 hours. Invidious currently
|
||||
' Does a fresh fetch if the cache is older than 10 minutes.
|
||||
@@ -107,9 +106,6 @@ namespace Invidious
|
||||
tryCount = 2
|
||||
|
||||
if options <> invalid
|
||||
if options.DoesExist("region")
|
||||
region = options.region
|
||||
end if
|
||||
if options.DoesExist("cacheSeconds")
|
||||
cacheSeconds = options.cacheSeconds
|
||||
end if
|
||||
@@ -126,10 +122,6 @@ namespace Invidious
|
||||
|
||||
request = HttpClient.Get(url)
|
||||
|
||||
if region = true
|
||||
request.QueryParam("region", m.GetUserRegion())
|
||||
end if
|
||||
|
||||
request.CacheSeconds(cacheSeconds)
|
||||
request.Cancellation(cancellation)
|
||||
|
||||
|
||||
@@ -14,10 +14,6 @@ function VideoQueueViewContentTask(input as object) as object
|
||||
index = MathUtils.Clamp(input.index - 2, 0, videoNodes.Count() - 1)
|
||||
|
||||
requestOptions = {
|
||||
' Not providing a region should lead to a better DB hit rate
|
||||
' When the region is provided, the video will be fetched fresh every time
|
||||
' and will not be saved to the database.
|
||||
region: false
|
||||
cacheSeconds: 8640000 ' 100 days
|
||||
cancellation: cancellation
|
||||
tryCount: 1
|
||||
|
||||
Reference in new issue
Block a user