Fixed Playlet backend error caused by Roku 14.5 update on Canada devices
This commit is contained in:
1 parent
bb2ca5515b
commit
49390ab0ae
4 files changed
+19
-7
No files matched your search
@@ -162,7 +162,12 @@ namespace Innertube
|
||||
end function
|
||||
|
||||
function GetCurrentLocale(deviceInfo as object) as string
|
||||
return deviceInfo.GetCurrentLocale()
|
||||
currentLocale = deviceInfo.GetCurrentLocale()
|
||||
' en_CA is not a valid locale for Innertube
|
||||
if currentLocale = "en_CA"
|
||||
currentLocale = "en_US"
|
||||
end if
|
||||
return currentLocale
|
||||
end function
|
||||
|
||||
function GetContentRegion(deviceInfo as object) as string
|
||||
|
||||
@@ -35,6 +35,10 @@ namespace Innertube
|
||||
})
|
||||
|
||||
request.Cancellation(cancellation)
|
||||
if raw
|
||||
request.NoCache()
|
||||
request.LogCurlCommand()
|
||||
end if
|
||||
|
||||
response = request.Await()
|
||||
if not response.IsSuccess()
|
||||
|
||||
+6
-5
@@ -316,17 +316,18 @@ namespace Http
|
||||
end if
|
||||
|
||||
result = InnertubeService.Search(query, options)
|
||||
if result.error <> invalid
|
||||
response.Json(result)
|
||||
response.http_code = 500
|
||||
return true
|
||||
end if
|
||||
|
||||
if raw
|
||||
response.Json(result)
|
||||
return true
|
||||
end if
|
||||
|
||||
if result.error <> invalid
|
||||
response.Json(result)
|
||||
response.http_code = 500
|
||||
return true
|
||||
end if
|
||||
|
||||
if not IsArray(result.feeds) or result.feeds.Count() = 0
|
||||
response.Json({
|
||||
"error": "Failed to search"
|
||||
|
||||
Reference in new issue
Block a user