Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a13575681 | ||
|
|
1f67b307f1 | ||
|
|
37bce62b14 | ||
|
|
5dbc8611ed | ||
|
|
4151b39456 | ||
|
|
b59a0797c9 | ||
|
|
a5766c41ce | ||
|
|
383522372f | ||
|
|
92d8cc4f55 | ||
|
|
07b4fb7a60 | ||
|
|
e49f1e3023 | ||
|
|
83d0b707b5 | ||
|
|
ad23a85e4f |
No files matched your search
@@ -4,9 +4,13 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: "Release version"
|
description: "Release version (X.Y.Z)"
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-pr:
|
release-pr:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -32,6 +36,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sed -i "s/## \[Unreleased\]/## \[${{ github.event.inputs.version }}\] - $(date +%Y-%m-%d)/" CHANGELOG.md
|
sed -i "s/## \[Unreleased\]/## \[${{ github.event.inputs.version }}\] - $(date +%Y-%m-%d)/" CHANGELOG.md
|
||||||
|
|
||||||
|
# Building for release should sync the version in multiple files, and then fail if there are any changes.
|
||||||
- name: Build for release
|
- name: Build for release
|
||||||
run: npm run build:release || exit 0
|
run: npm run build:release || exit 0
|
||||||
|
|
||||||
@@ -42,3 +47,4 @@ jobs:
|
|||||||
branch: release/${{ github.event.inputs.version }}
|
branch: release/${{ github.event.inputs.version }}
|
||||||
title: "Release v${{ github.event.inputs.version }}"
|
title: "Release v${{ github.event.inputs.version }}"
|
||||||
body: "Release ${{ github.event.inputs.version }}. See CHANGELOG.md and roadmap #6 for details."
|
body: "Release ${{ github.event.inputs.version }}. See CHANGELOG.md and roadmap #6 for details."
|
||||||
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
@@ -34,3 +34,4 @@ jobs:
|
|||||||
branch: chore/update-deps
|
branch: chore/update-deps
|
||||||
title: "[chore] update dependencies"
|
title: "[chore] update dependencies"
|
||||||
body: "Weekly pull request to update dependencies."
|
body: "Weekly pull request to update dependencies."
|
||||||
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
+15
-2
@@ -5,9 +5,22 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased]
|
## [0.23.4] - 2024-05-04
|
||||||
|
|
||||||
- Nothing worth mentioning yet
|
### Added
|
||||||
|
|
||||||
|
- An invidious instance "fetch with CORS" test
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- a bug where public Invidious instances all showed `N/A` in the health column
|
||||||
|
- a bug where trending and search wouldn't work in certain countries
|
||||||
|
|
||||||
|
## [0.23.3] - 2024-04-28
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Removed announcement - most public instances are now updated
|
||||||
|
|
||||||
## [0.23.2] - 2024-04-27
|
## [0.23.2] - 2024-04-27
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
|||||||
|
|
||||||
info:
|
info:
|
||||||
title: Playlet Web API
|
title: Playlet Web API
|
||||||
version: 0.23.2
|
version: 0.23.4
|
||||||
description:
|
description:
|
||||||
Playlet Web API is a RESTful API for controlling the Playlet app on
|
Playlet Web API is a RESTful API for controlling the Playlet app on
|
||||||
Roku devices. The API is intended to be used by the Playlet web app, but can
|
Roku devices. The API is intended to be used by the Playlet web app, but can
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.20",
|
"@rokucommunity/bslint": "^0.8.20",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"description": "Unofficial YouTube client for Roku",
|
"description": "Unofficial YouTube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.20",
|
"@rokucommunity/bslint": "^0.8.20",
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.23.2"
|
"version": "0.23.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"description": "Unofficial YouTube client for Roku",
|
"description": "Unofficial YouTube client for Roku",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "rm -rf ../build/playlet-app",
|
"prebuild": "rm -rf ../build/playlet-app",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title=Playlet
|
|||||||
# Do not update version manually, it is auto updated from package.json
|
# Do not update version manually, it is auto updated from package.json
|
||||||
major_version=0
|
major_version=0
|
||||||
minor_version=23
|
minor_version=23
|
||||||
build_version=00002
|
build_version=00004
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
|
|
||||||
|
|||||||
@@ -46,10 +46,9 @@ function Main(args as object) as void
|
|||||||
input = CreateObject("roInput")
|
input = CreateObject("roInput")
|
||||||
input.setMessagePort(port)
|
input.setMessagePort(port)
|
||||||
|
|
||||||
' TODO:P2 follow up on bug where roSystemLog does not fire for a video player in ComponentLibrary
|
|
||||||
' https://community.roku.com/t5/Roku-Developer-Program/BUG-roSystemLog-not-firing-with-ComponentLibrary/td-p/906075
|
|
||||||
systemLog = CreateObject("roSystemLog")
|
systemLog = CreateObject("roSystemLog")
|
||||||
systemLog.SetMessagePort(port)
|
systemLog.SetMessagePort(port)
|
||||||
|
' Although all types are enabled, they are filtered in Playlet Lib to avoid spamming the logs
|
||||||
systemLog.EnableType("http.connect")
|
systemLog.EnableType("http.connect")
|
||||||
systemLog.EnableType("http.error")
|
systemLog.EnableType("http.error")
|
||||||
systemLog.EnableType("http.complete")
|
systemLog.EnableType("http.complete")
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.23.2"
|
"version": "0.23.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"description": "Unofficial YouTube client for Roku",
|
"description": "Unofficial YouTube client for Roku",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "rm -rf ../build/playlet-lib",
|
"prebuild": "rm -rf ../build/playlet-lib",
|
||||||
|
|||||||
@@ -9,9 +9,7 @@ function Init()
|
|||||||
m.top.ObserveField("logLine", port)
|
m.top.ObserveField("logLine", port)
|
||||||
|
|
||||||
scene = m.top.getScene()
|
scene = m.top.getScene()
|
||||||
if scene.hasField("systemLogEvent")
|
|
||||||
scene.ObserveFieldScoped("systemLogEvent", port)
|
scene.ObserveFieldScoped("systemLogEvent", port)
|
||||||
end if
|
|
||||||
|
|
||||||
m.port = port
|
m.port = port
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import "pkg:/components/EcpArgs.bs"
|
|||||||
import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
|
import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
|
||||||
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||||
import "pkg:/source/utils/LoadingScreen.bs"
|
import "pkg:/source/utils/LoadingScreen.bs"
|
||||||
import "pkg:/source/utils/Locale.bs"
|
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.scene = m.top.getScene()
|
m.scene = m.top.getScene()
|
||||||
@@ -19,7 +18,6 @@ function MainSceneContainerChanged()
|
|||||||
InitEcpArgs()
|
InitEcpArgs()
|
||||||
m.scene.signalBeacon("AppLaunchComplete")
|
m.scene.signalBeacon("AppLaunchComplete")
|
||||||
CopyLoadingMessagesToCache()
|
CopyLoadingMessagesToCache()
|
||||||
ShowAnnouncement()
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function StartWebServer()
|
function StartWebServer()
|
||||||
@@ -32,37 +30,3 @@ function StartWebServer()
|
|||||||
m.dialServer = m.top.findNode("DialServer")
|
m.dialServer = m.top.findNode("DialServer")
|
||||||
m.dialServer@.StartServer()
|
m.dialServer@.StartServer()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ShowAnnouncement()
|
|
||||||
title = "Announcement"
|
|
||||||
|
|
||||||
message = [
|
|
||||||
"Invidious was experiencing an outage, and a fix has been deployed.",
|
|
||||||
"If you are experiencing issues playing videos:",
|
|
||||||
]
|
|
||||||
|
|
||||||
bulletText = [
|
|
||||||
"For custom Invidious instances, please update to the latest version.",
|
|
||||||
"For public Invidious instances, go to Settings -> Invidious -> Instance, and select an instance with a version 2024.04.27 or newer."
|
|
||||||
]
|
|
||||||
|
|
||||||
bottomMessage = [
|
|
||||||
"If you don't know what instance you're using, follow the instructions from step 2."
|
|
||||||
"We apologize for the inconvenience."
|
|
||||||
]
|
|
||||||
|
|
||||||
buttons = [Tr(Locale.Buttons.OK)]
|
|
||||||
|
|
||||||
dialog = CreateObject("roSGNode", "SimpleDialog")
|
|
||||||
dialog.title = title
|
|
||||||
dialog.message = message
|
|
||||||
dialog.bulletText = bulletText
|
|
||||||
dialog.bulletType = "numbered"
|
|
||||||
dialog.bottomMessage = bottomMessage
|
|
||||||
dialog.buttons = buttons
|
|
||||||
deviceInfo = CreateObject("roDeviceInfo")
|
|
||||||
displaySize = deviceInfo.GetDisplaySize()
|
|
||||||
dialog.width = displaySize.w - 180
|
|
||||||
|
|
||||||
m.top.getScene().dialog = dialog
|
|
||||||
end function
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
'import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
|
'import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
|
||||||
'import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
'import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||||
'import "pkg:/source/utils/LoadingScreen.bs"
|
'import "pkg:/source/utils/LoadingScreen.bs"
|
||||||
'import "pkg:/source/utils/Locale.bs"
|
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
InitializeBindings() ' auto-generated!
|
InitializeBindings() ' auto-generated!
|
||||||
@@ -20,7 +19,6 @@ function MainSceneContainerChanged()
|
|||||||
InitEcpArgs()
|
InitEcpArgs()
|
||||||
m.scene.signalBeacon("AppLaunchComplete")
|
m.scene.signalBeacon("AppLaunchComplete")
|
||||||
CopyLoadingMessagesToCache()
|
CopyLoadingMessagesToCache()
|
||||||
ShowAnnouncement()
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function StartWebServer()
|
function StartWebServer()
|
||||||
@@ -31,34 +29,4 @@ function StartWebServer()
|
|||||||
m.dialServer = m.top.findNode("DialServer")
|
m.dialServer = m.top.findNode("DialServer")
|
||||||
m.dialServer.callfunc("StartServer", invalid)
|
m.dialServer.callfunc("StartServer", invalid)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ShowAnnouncement()
|
|
||||||
title = "Announcement"
|
|
||||||
message = [
|
|
||||||
"Invidious was experiencing an outage, and a fix has been deployed."
|
|
||||||
"If you are experiencing issues playing videos:"
|
|
||||||
]
|
|
||||||
bulletText = [
|
|
||||||
"For custom Invidious instances, please update to the latest version."
|
|
||||||
"For public Invidious instances, go to Settings -> Invidious -> Instance, and select an instance with a version 2024.04.27 or newer."
|
|
||||||
]
|
|
||||||
bottomMessage = [
|
|
||||||
"If you don't know what instance you're using, follow the instructions from step 2."
|
|
||||||
"We apologize for the inconvenience."
|
|
||||||
]
|
|
||||||
buttons = [
|
|
||||||
Tr("OK")
|
|
||||||
]
|
|
||||||
dialog = CreateObject("roSGNode", "SimpleDialog")
|
|
||||||
dialog.title = title
|
|
||||||
dialog.message = message
|
|
||||||
dialog.bulletText = bulletText
|
|
||||||
dialog.bulletType = "numbered"
|
|
||||||
dialog.bottomMessage = bottomMessage
|
|
||||||
dialog.buttons = buttons
|
|
||||||
deviceInfo = CreateObject("roDeviceInfo")
|
|
||||||
displaySize = deviceInfo.GetDisplaySize()
|
|
||||||
dialog.width = displaySize.w - 180
|
|
||||||
m.top.getScene().dialog = dialog
|
|
||||||
end function
|
|
||||||
'//# sourceMappingURL=./MainScene.brs.map
|
'//# sourceMappingURL=./MainScene.brs.map
|
||||||
@@ -29,13 +29,15 @@
|
|||||||
<Label
|
<Label
|
||||||
id="titleLabel"
|
id="titleLabel"
|
||||||
width="500"
|
width="500"
|
||||||
maxLines="2"
|
maxLines="3"
|
||||||
wrap="true">
|
wrap="true">
|
||||||
<Font role="font" uri="font:BoldSystemFontFile" size="36" />
|
<Font role="font" uri="font:BoldSystemFontFile" size="36" />
|
||||||
</Label>
|
</Label>
|
||||||
<Label
|
<Label
|
||||||
id="subtitleLabel"
|
id="subtitleLabel"
|
||||||
width="500"
|
width="500"
|
||||||
|
maxLines="2"
|
||||||
|
wrap="true"
|
||||||
font="font:SmallestBoldSystemFont" />
|
font="font:SmallestBoldSystemFont" />
|
||||||
<Label
|
<Label
|
||||||
id="updatedLabel"
|
id="updatedLabel"
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@
|
|||||||
iconVisible="false"
|
iconVisible="false"
|
||||||
anchor="[0.5,0.5]"
|
anchor="[0.5,0.5]"
|
||||||
padding="[30,30]"
|
padding="[30,30]"
|
||||||
translation="[580,530]" />
|
translation="[580,545]" />
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
</children>
|
</children>
|
||||||
</component>
|
</component>
|
||||||
+35
@@ -32,6 +32,7 @@ function PrepareTests() as object
|
|||||||
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoComments), CanFetchVideoComments))
|
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoComments), CanFetchVideoComments))
|
||||||
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoCaptions), CanFetchVideoCaptions))
|
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoCaptions), CanFetchVideoCaptions))
|
||||||
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoThumbnails), CanFetchVideoThumbails))
|
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoThumbnails), CanFetchVideoThumbails))
|
||||||
|
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchWithCors), CanFetchWithCors))
|
||||||
return content
|
return content
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -312,3 +313,37 @@ function CanFetchVideoThumbails(instance as string, testNode as object, cancella
|
|||||||
testNode.details = ErrorUtils.Format(e)
|
testNode.details = ErrorUtils.Format(e)
|
||||||
end try
|
end try
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function CanFetchWithCors(instance as string, testNode as object, cancellation as object) as void
|
||||||
|
try
|
||||||
|
url = `${instance}/api/v1/trending`
|
||||||
|
response = HttpClient.Get(url).NoCache().Cancellation(cancellation).Await()
|
||||||
|
|
||||||
|
if not response.IsSuccess()
|
||||||
|
testNode.state = "failed"
|
||||||
|
testNode.details = response.ErrorMessage()
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
json = response.Json()
|
||||||
|
if json = invalid
|
||||||
|
testNode.state = "failed"
|
||||||
|
testNode.details = Tr(Locale.InvidiousTesting.InvalidJsonFrom).Replace("%1", url)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
headers = response.Headers()
|
||||||
|
corsHeader = headers["Access-Control-Allow-Origin"]
|
||||||
|
if not IsString(corsHeader) or corsHeader <> "*"
|
||||||
|
testNode.state = "failed"
|
||||||
|
testNode.details = Tr(Locale.InvidiousTesting.CorsHeaderNotSetCorrectly).Replace("%1", url)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
testNode.state = "passed"
|
||||||
|
testNode.details = Tr(Locale.InvidiousTesting.TheInstanceCanFetchWithCors).Replace("%1", url)
|
||||||
|
catch e
|
||||||
|
testNode.state = "failed"
|
||||||
|
testNode.details = ErrorUtils.Format(e)
|
||||||
|
end try
|
||||||
|
end function
|
||||||
+1
-1
@@ -77,7 +77,7 @@ function CreateListItemContent(instance as object, fieldWidths as object) as obj
|
|||||||
' Leave 5 spaces for the flag, just to simplify the layout
|
' Leave 5 spaces for the flag, just to simplify the layout
|
||||||
location: ` ${DrillIntoObject(instance[1], ["region"], "N/A")}`
|
location: ` ${DrillIntoObject(instance[1], ["region"], "N/A")}`
|
||||||
flag: GetFlagUrl(DrillIntoObject(instance[1], ["flag"], ""))
|
flag: GetFlagUrl(DrillIntoObject(instance[1], ["flag"], ""))
|
||||||
health: DrillIntoObject(instance[1], ["monitor", "30dRatio", "ratio"], "N/A")
|
health: DrillIntoObject(instance[1], ["monitor", "uptime"], "N/A")
|
||||||
uri: instance[1].uri
|
uri: instance[1].uri
|
||||||
fieldWidths: fieldWidths
|
fieldWidths: fieldWidths
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class DashManifest
|
|||||||
|
|
||||||
function fromVideoMetadata(metadata as object, local as boolean) as string
|
function fromVideoMetadata(metadata as object, local as boolean) as string
|
||||||
adaptiveFormats = []
|
adaptiveFormats = []
|
||||||
adaptiveFormats.Append (metadata.adaptiveFormats)
|
adaptiveFormats.Append(metadata.adaptiveFormats)
|
||||||
|
|
||||||
if local
|
if local
|
||||||
for i = 0 to adaptiveFormats.Count() - 1
|
for i = 0 to adaptiveFormats.Count() - 1
|
||||||
|
|||||||
@@ -43,11 +43,17 @@ namespace Invidious
|
|||||||
m.invidiousNode = invidiousNode
|
m.invidiousNode = invidiousNode
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetUserRegion() as string
|
function GetUserCountryCode() as string
|
||||||
if m._userRegion = invalid
|
if m._userCountryCode = invalid
|
||||||
m._userRegion = m.invidiousNode.applicationInfo@.GetUserCountryCode()
|
m._userCountryCode = m.invidiousNode.applicationInfo@.GetUserCountryCode()
|
||||||
|
|
||||||
|
' GetUserCountryCode() can return OT, which is not a valid country code.
|
||||||
|
' https://github.com/iBicha/playlet/issues/372
|
||||||
|
if ValidString(m._userCountryCode) = "OT"
|
||||||
|
m._userCountryCode = "US"
|
||||||
end if
|
end if
|
||||||
return m._userRegion
|
end if
|
||||||
|
return m._userCountryCode
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetAuthenticationHeaders(token as string) as object
|
function GetAuthenticationHeaders(token as string) as object
|
||||||
@@ -89,7 +95,7 @@ namespace Invidious
|
|||||||
url = `${instance}${Invidious.SEARCH_SUGGEST_ENDPOINT}`
|
url = `${instance}${Invidious.SEARCH_SUGGEST_ENDPOINT}`
|
||||||
|
|
||||||
request = HttpClient.Get(url)
|
request = HttpClient.Get(url)
|
||||||
request.QueryParam("region", m.GetUserRegion())
|
request.QueryParam("region", m.GetUserCountryCode())
|
||||||
request.QueryParam("q", q)
|
request.QueryParam("q", q)
|
||||||
request.CacheSeconds(60 * 60 * 24)
|
request.CacheSeconds(60 * 60 * 24)
|
||||||
|
|
||||||
@@ -266,7 +272,7 @@ namespace Invidious
|
|||||||
if queryParam.default <> invalid
|
if queryParam.default <> invalid
|
||||||
if IsString(queryParam.type) and queryParam.type = "#ISO3166"
|
if IsString(queryParam.type) and queryParam.type = "#ISO3166"
|
||||||
if queryParam.default = "GetUserCountryCode"
|
if queryParam.default = "GetUserCountryCode"
|
||||||
request.QueryParam(queryParamKey, m.GetUserRegion())
|
request.QueryParam(queryParamKey, m.GetUserCountryCode())
|
||||||
else
|
else
|
||||||
request.QueryParam(queryParamKey, queryParam.default)
|
request.QueryParam(queryParamKey, queryParam.default)
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -364,6 +364,10 @@
|
|||||||
<source>Fetch video thumbnails</source>
|
<source>Fetch video thumbnails</source>
|
||||||
<translation>Fetch video thumbnails</translation>
|
<translation>Fetch video thumbnails</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Fetch with CORS</source>
|
||||||
|
<translation>Fetch with CORS</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Press 'OK' for details</source>
|
<source>Press 'OK' for details</source>
|
||||||
<translation>Press 'OK' for details</translation>
|
<translation>Press 'OK' for details</translation>
|
||||||
@@ -432,6 +436,14 @@
|
|||||||
<source>The instance can fetch video thumbnail for ID %1 (%2)</source>
|
<source>The instance can fetch video thumbnail for ID %1 (%2)</source>
|
||||||
<translation>The instance can fetch video thumbnail for ID %1 (%2)</translation>
|
<translation>The instance can fetch video thumbnail for ID %1 (%2)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>CORS header not set correctly from %1</source>
|
||||||
|
<translation>CORS header not set correctly from %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>The instance can fetch with CORS from %1</source>
|
||||||
|
<translation>The instance can fetch with CORS from %1</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Passed</source>
|
<source>Passed</source>
|
||||||
<translation>Passed</translation>
|
<translation>Passed</translation>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title=PlayletLib
|
|||||||
# Do not update version manually, it is auto updated from package.json
|
# Do not update version manually, it is auto updated from package.json
|
||||||
major_version=0
|
major_version=0
|
||||||
minor_version=23
|
minor_version=23
|
||||||
build_version=00002
|
build_version=00004
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
|
|
||||||
|
|||||||
@@ -69,20 +69,21 @@ class XmlObject
|
|||||||
|
|
||||||
for i = 0 to node.children.count() - 1
|
for i = 0 to node.children.count() - 1
|
||||||
child = node.children[i]
|
child = node.children[i]
|
||||||
|
childIsString = IsString(child)
|
||||||
if i = 0
|
if i = 0
|
||||||
if not IsString(child)
|
if not childIsString
|
||||||
xmlString += `\n`
|
xmlString += `\n`
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if IsString(child)
|
if childIsString
|
||||||
xmlString += m.XmlEscape(child)
|
xmlString += m.XmlEscape(child)
|
||||||
else
|
else
|
||||||
xmlString += m.NodeToXmlString(child, indentLevel + 1)
|
xmlString += m.NodeToXmlString(child, indentLevel + 1)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if i = node.children.count() - 1
|
if i = node.children.count() - 1
|
||||||
if not IsString(child)
|
if not childIsString
|
||||||
xmlString += `${indentString}`
|
xmlString += `${indentString}`
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
namespace Tests
|
||||||
|
|
||||||
|
@suite
|
||||||
|
class XmlObjectTests extends Rooibos.BaseTestSuite
|
||||||
|
|
||||||
|
@describe("XmlObject")
|
||||||
|
|
||||||
|
@it("creates valid XML")
|
||||||
|
function _()
|
||||||
|
xml = new XmlObject()
|
||||||
|
if xml.Node("Person", { "name": `John "Joker" Doe`, "age": 30 })
|
||||||
|
xml.EmptyNode("Address", { "street": "123 Main St", "city": "Anytown", "state": "NY" })
|
||||||
|
if xml.Node("Metadata")
|
||||||
|
xml.TextNode("Data", "Some data")
|
||||||
|
xml.End()
|
||||||
|
end if
|
||||||
|
xml.End()
|
||||||
|
end if
|
||||||
|
|
||||||
|
expected = `<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Person age="30" name="John "Joker" Doe">
|
||||||
|
<Address city="Anytown" state="NY" street="123 Main St" />
|
||||||
|
<Metadata>
|
||||||
|
<Data>Some data</Data>
|
||||||
|
</Metadata>
|
||||||
|
</Person>
|
||||||
|
`
|
||||||
|
|
||||||
|
m.assertEqual(xml.ToXmlString(), expected)
|
||||||
|
end function
|
||||||
|
|
||||||
|
end class
|
||||||
|
|
||||||
|
end namespace
|
||||||
@@ -118,6 +118,7 @@ namespace Locale
|
|||||||
FetchVideoComments = "Fetch video comments"
|
FetchVideoComments = "Fetch video comments"
|
||||||
FetchVideoCaptions = "Fetch video captions"
|
FetchVideoCaptions = "Fetch video captions"
|
||||||
FetchVideoThumbnails = "Fetch video thumbnails"
|
FetchVideoThumbnails = "Fetch video thumbnails"
|
||||||
|
FetchWithCors = "Fetch with CORS"
|
||||||
|
|
||||||
PressOkForDetails = "Press 'OK' for details"
|
PressOkForDetails = "Press 'OK' for details"
|
||||||
|
|
||||||
@@ -138,6 +139,8 @@ namespace Locale
|
|||||||
ThumbnailNotReachable = "%1 is not reachable"
|
ThumbnailNotReachable = "%1 is not reachable"
|
||||||
InvalidThumbnailData = "Invalid thumbnail data %1 (Content-Type is not image/*)"
|
InvalidThumbnailData = "Invalid thumbnail data %1 (Content-Type is not image/*)"
|
||||||
TheInstanceCanFetchVideoThumbnails = "The instance can fetch video thumbnail for ID %1 (%2)"
|
TheInstanceCanFetchVideoThumbnails = "The instance can fetch video thumbnail for ID %1 (%2)"
|
||||||
|
CorsHeaderNotSetCorrectly = "CORS header not set correctly from %1"
|
||||||
|
TheInstanceCanFetchWithCors = "The instance can fetch with CORS from %1"
|
||||||
|
|
||||||
Passed = "Passed"
|
Passed = "Passed"
|
||||||
Failed = "Failed"
|
Failed = "Failed"
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
||||||
"@tailwindcss/typography": "^0.5.13",
|
"@tailwindcss/typography": "^0.5.13",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.23.2",
|
"version": "0.23.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
Reference in new issue
Block a user