Fixed Playlet backend error caused by Roku 14.5 update on Canada devices

This commit is contained in:
Brahim Hadriche committed 2025-05-03 22:34:57 -04:00
1 parent bb2ca5515b
commit 49390ab0ae
4 files changed
+19 -7

No files matched your search

+3 -1
View File
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
- Nothing worth mentioning yet.
### Fixed
- Playlet backend error caused by Roku 14.5 update on Canada devices
## [0.36.6] - 2025-05-03
@@ -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()
@@ -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"