Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a13575681 | ||
|
|
1f67b307f1 | ||
|
|
37bce62b14 | ||
|
|
5dbc8611ed | ||
|
|
4151b39456 | ||
|
|
b59a0797c9 | ||
|
|
a5766c41ce | ||
|
|
383522372f | ||
|
|
92d8cc4f55 | ||
|
|
07b4fb7a60 | ||
|
|
e49f1e3023 | ||
|
|
83d0b707b5 | ||
|
|
ad23a85e4f | ||
|
|
da417f4fb2 | ||
|
|
797b536380 | ||
|
|
8016d66a46 | ||
|
|
b08e7c07f3 | ||
|
|
a018264f76 | ||
|
|
416a1b86d4 | ||
|
|
2e826e02cd |
No files matched your search
@@ -0,0 +1,50 @@
|
||||
name: Release trigger
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Release version (X.Y.Z)"
|
||||
required: true
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
release-pr:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Set package version
|
||||
run: npm version ${{ github.event.inputs.version }} --no-git-tag-version
|
||||
|
||||
# Replace "## [Unreleased]" with "## [X.Y.Z] - YYYY-MM-DD" in CHANGELOG.md
|
||||
- name: Set changelog version
|
||||
run: |
|
||||
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
|
||||
run: npm run build:release || exit 0
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
commit-message: "Release v${{ github.event.inputs.version }}"
|
||||
branch: release/${{ 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."
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
@@ -34,3 +34,4 @@ jobs:
|
||||
branch: chore/update-deps
|
||||
title: "[chore] update dependencies"
|
||||
body: "Weekly pull request to update dependencies."
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
@@ -5,6 +5,29 @@ 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/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.23.4] - 2024-05-04
|
||||
|
||||
### 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
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated announcement
|
||||
|
||||
## [0.23.1] - 2024-04-24
|
||||
|
||||
### Added
|
||||
|
||||
+5
-10
@@ -13,16 +13,11 @@ These are mostly the steps when releasing a new version:
|
||||
|
||||
## Playlet lib
|
||||
|
||||
- Create local branch `release/$VERSION` e.g. `release/0.10.0`
|
||||
- Set version in package.json
|
||||
- Update CHANGELOG.md section from `[Unreleased]` to `[$VERSION] - DATE`
|
||||
- `npm run build:release`
|
||||
- This should fail because there are uncommitted changes. This is expected.
|
||||
- Commit changes
|
||||
- Create pull request
|
||||
- Title: `Release v$VERSION`
|
||||
- Comment: `Release $VERSION \nIt should contain everything planned from #6`
|
||||
- Wait for CI and merge
|
||||
- Use the [Release trigger](https://github.com/iBicha/playlet/actions/workflows/release-trigger.yml) to trigger a release
|
||||
- Run workflow from **main** branch
|
||||
- Set the new version in the format X.Y.Z
|
||||
- Wait for the PR to be created
|
||||
- Inspect PR, wait for CI and merge
|
||||
- Wait for CI on main branch to create the `canary` release
|
||||
- Edit `canary` release
|
||||
- Tag: `v$VERSION`
|
||||
|
||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
||||
|
||||
info:
|
||||
title: Playlet Web API
|
||||
version: 0.23.1
|
||||
version: 0.23.4
|
||||
description:
|
||||
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
|
||||
|
||||
Generated
+48
-21
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"hasInstallScript": true,
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.20",
|
||||
@@ -27,7 +27,7 @@
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^2.0.1",
|
||||
"json5": "^2.2.3",
|
||||
"mailparser": "^3.7.0",
|
||||
"mailparser": "^3.7.1",
|
||||
"roku-deploy": "^3.12.0",
|
||||
"rooibos-roku": "5.12.0",
|
||||
"rounded-rect-9patch": "^1.0.1",
|
||||
@@ -2959,17 +2959,26 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/libmime": {
|
||||
"version": "5.3.4",
|
||||
"resolved": "https://registry.npmjs.org/libmime/-/libmime-5.3.4.tgz",
|
||||
"integrity": "sha512-TsqPdercr6DHrnoQx1F0nS2Y4yPT+fWuOjEP2rqzvV77hMYWomTe/rpm0u9JORQ/FavEXybAGcBJsQbLr9+hjA==",
|
||||
"version": "5.3.5",
|
||||
"resolved": "https://registry.npmjs.org/libmime/-/libmime-5.3.5.tgz",
|
||||
"integrity": "sha512-nSlR1yRZ43L3cZCiWEw7ali3jY29Hz9CQQ96Oy+sSspYnIP5N54ucOPHqooBsXzwrX1pwn13VUE05q4WmzfaLg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"encoding-japanese": "2.0.0",
|
||||
"encoding-japanese": "2.1.0",
|
||||
"iconv-lite": "0.6.3",
|
||||
"libbase64": "1.3.0",
|
||||
"libqp": "2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/libmime/node_modules/encoding-japanese": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/encoding-japanese/-/encoding-japanese-2.1.0.tgz",
|
||||
"integrity": "sha512-58XySVxUgVlBikBTbQ8WdDxBDHIdXucB16LO5PBHR8t75D54wQrNo4cg+58+R1CtJfKnsVsvt9XlteRaR8xw1w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/libmime/node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
@@ -3079,21 +3088,30 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mailparser": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/mailparser/-/mailparser-3.7.0.tgz",
|
||||
"integrity": "sha512-yFo1+4r3gHhTcazVGCv3D/uX5VJyyrx4iWkzKtJh8mujYIUm92kpG5BjKpZIJgEoKcKxbJVd4CPs+IImE1sKlQ==",
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/mailparser/-/mailparser-3.7.1.tgz",
|
||||
"integrity": "sha512-RCnBhy5q8XtB3mXzxcAfT1huNqN93HTYYyL6XawlIKycfxM/rXPg9tXoZ7D46+SgCS1zxKzw+BayDQSvncSTTw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"encoding-japanese": "2.0.0",
|
||||
"encoding-japanese": "2.1.0",
|
||||
"he": "1.2.0",
|
||||
"html-to-text": "9.0.5",
|
||||
"iconv-lite": "0.6.3",
|
||||
"libmime": "5.3.4",
|
||||
"libmime": "5.3.5",
|
||||
"linkify-it": "5.0.0",
|
||||
"mailsplit": "5.4.0",
|
||||
"nodemailer": "6.9.11",
|
||||
"punycode": "2.3.1",
|
||||
"tlds": "1.250.0"
|
||||
"nodemailer": "6.9.13",
|
||||
"punycode.js": "2.3.1",
|
||||
"tlds": "1.252.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mailparser/node_modules/encoding-japanese": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/encoding-japanese/-/encoding-japanese-2.1.0.tgz",
|
||||
"integrity": "sha512-58XySVxUgVlBikBTbQ8WdDxBDHIdXucB16LO5PBHR8t75D54wQrNo4cg+58+R1CtJfKnsVsvt9XlteRaR8xw1w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mailparser/node_modules/iconv-lite": {
|
||||
@@ -3488,9 +3506,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/nodemailer": {
|
||||
"version": "6.9.11",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.11.tgz",
|
||||
"integrity": "sha512-UiAkgiERuG94kl/3bKfE8o10epvDnl0vokNEtZDPTq9BWzIl6EFT9336SbIT4oaTBD8NmmUTLsQyXHV82eXSWg==",
|
||||
"version": "6.9.13",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.13.tgz",
|
||||
"integrity": "sha512-7o38Yogx6krdoBf3jCAqnIN4oSQFx+fMa0I7dK1D+me9kBxx12D+/33wSb+fhOCtIxvYJ+4x4IMEhmhCKfAiOA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
@@ -3913,6 +3931,15 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/punycode.js": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz",
|
||||
"integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/puppeteer": {
|
||||
"version": "13.7.0",
|
||||
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz",
|
||||
@@ -4806,9 +4833,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tlds": {
|
||||
"version": "1.250.0",
|
||||
"resolved": "https://registry.npmjs.org/tlds/-/tlds-1.250.0.tgz",
|
||||
"integrity": "sha512-rWsBfFCWKrjM/o2Q1TTUeYQv6tHSd/umUutDjVs6taTuEgRDIreVYIBgWRWW4ot7jp6n0UVUuxhTLWBtUmPu/w==",
|
||||
"version": "1.252.0",
|
||||
"resolved": "https://registry.npmjs.org/tlds/-/tlds-1.252.0.tgz",
|
||||
"integrity": "sha512-GA16+8HXvqtfEnw/DTcwB0UU354QE1n3+wh08oFjr6Znl7ZLAeUgYzCcK+/CCrOyE0vnHR8/pu3XXG3vDijXpQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tlds": "bin.js"
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.20",
|
||||
@@ -21,7 +21,7 @@
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^2.0.1",
|
||||
"json5": "^2.2.3",
|
||||
"mailparser": "^3.7.0",
|
||||
"mailparser": "^3.7.1",
|
||||
"roku-deploy": "^3.12.0",
|
||||
"rooibos-roku": "5.12.0",
|
||||
"rounded-rect-9patch": "^1.0.1",
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-app",
|
||||
"version": "0.23.1"
|
||||
"version": "0.23.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf ../build/playlet-app",
|
||||
|
||||
@@ -3,7 +3,7 @@ title=Playlet
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=23
|
||||
build_version=00001
|
||||
build_version=00004
|
||||
|
||||
ui_resolutions=hd
|
||||
|
||||
|
||||
@@ -46,10 +46,9 @@ function Main(args as object) as void
|
||||
input = CreateObject("roInput")
|
||||
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.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.error")
|
||||
systemLog.EnableType("http.complete")
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-lib",
|
||||
"version": "0.23.1"
|
||||
"version": "0.23.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf ../build/playlet-lib",
|
||||
|
||||
@@ -9,9 +9,7 @@ function Init()
|
||||
m.top.ObserveField("logLine", port)
|
||||
|
||||
scene = m.top.getScene()
|
||||
if scene.hasField("systemLogEvent")
|
||||
scene.ObserveFieldScoped("systemLogEvent", port)
|
||||
end if
|
||||
scene.ObserveFieldScoped("systemLogEvent", 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/OnNodeReadyNoOp.bs"
|
||||
import "pkg:/source/utils/LoadingScreen.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
|
||||
function Init()
|
||||
m.scene = m.top.getScene()
|
||||
@@ -19,7 +18,6 @@ function MainSceneContainerChanged()
|
||||
InitEcpArgs()
|
||||
m.scene.signalBeacon("AppLaunchComplete")
|
||||
CopyLoadingMessagesToCache()
|
||||
ShowAnnouncement()
|
||||
end function
|
||||
|
||||
function StartWebServer()
|
||||
@@ -32,26 +30,3 @@ function StartWebServer()
|
||||
m.dialServer = m.top.findNode("DialServer")
|
||||
m.dialServer@.StartServer()
|
||||
end function
|
||||
|
||||
function ShowAnnouncement()
|
||||
title = "Announcement"
|
||||
|
||||
message = [
|
||||
"YouTube has made changes that broke 3rd party apps, which is affecting Playlet and Invidious.",
|
||||
"Some videos might not play, and you might see error messages often.",
|
||||
"We're aware of the issue, and working on a fix.",
|
||||
"We apologize for the inconvenience.",
|
||||
]
|
||||
|
||||
buttons = [Tr(Locale.Buttons.OK)]
|
||||
|
||||
dialog = CreateObject("roSGNode", "SimpleDialog")
|
||||
dialog.title = title
|
||||
dialog.message = message
|
||||
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/OnNodeReadyNoOp.bs"
|
||||
'import "pkg:/source/utils/LoadingScreen.bs"
|
||||
'import "pkg:/source/utils/Locale.bs"
|
||||
|
||||
function Init()
|
||||
InitializeBindings() ' auto-generated!
|
||||
@@ -20,7 +19,6 @@ function MainSceneContainerChanged()
|
||||
InitEcpArgs()
|
||||
m.scene.signalBeacon("AppLaunchComplete")
|
||||
CopyLoadingMessagesToCache()
|
||||
ShowAnnouncement()
|
||||
end function
|
||||
|
||||
function StartWebServer()
|
||||
@@ -31,25 +29,4 @@ function StartWebServer()
|
||||
m.dialServer = m.top.findNode("DialServer")
|
||||
m.dialServer.callfunc("StartServer", invalid)
|
||||
end function
|
||||
|
||||
function ShowAnnouncement()
|
||||
title = "Announcement"
|
||||
message = [
|
||||
"YouTube has made changes that broke 3rd party apps, which is affecting Playlet and Invidious."
|
||||
"Some videos might not play, and you might see error messages often."
|
||||
"We're aware of the issue, and working on a fix."
|
||||
"We apologize for the inconvenience."
|
||||
]
|
||||
buttons = [
|
||||
Tr("OK")
|
||||
]
|
||||
dialog = CreateObject("roSGNode", "SimpleDialog")
|
||||
dialog.title = title
|
||||
dialog.message = message
|
||||
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
|
||||
@@ -29,13 +29,15 @@
|
||||
<Label
|
||||
id="titleLabel"
|
||||
width="500"
|
||||
maxLines="2"
|
||||
maxLines="3"
|
||||
wrap="true">
|
||||
<Font role="font" uri="font:BoldSystemFontFile" size="36" />
|
||||
</Label>
|
||||
<Label
|
||||
id="subtitleLabel"
|
||||
width="500"
|
||||
maxLines="2"
|
||||
wrap="true"
|
||||
font="font:SmallestBoldSystemFont" />
|
||||
<Label
|
||||
id="updatedLabel"
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
iconVisible="false"
|
||||
anchor="[0.5,0.5]"
|
||||
padding="[30,30]"
|
||||
translation="[580,530]" />
|
||||
translation="[580,545]" />
|
||||
</Rectangle>
|
||||
</children>
|
||||
</component>
|
||||
+35
@@ -32,6 +32,7 @@ function PrepareTests() as object
|
||||
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoComments), CanFetchVideoComments))
|
||||
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoCaptions), CanFetchVideoCaptions))
|
||||
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchVideoThumbnails), CanFetchVideoThumbails))
|
||||
content.AppendChild(CreateTestNode(Tr(Locale.InvidiousTesting.FetchWithCors), CanFetchWithCors))
|
||||
return content
|
||||
end function
|
||||
|
||||
@@ -312,3 +313,37 @@ function CanFetchVideoThumbails(instance as string, testNode as object, cancella
|
||||
testNode.details = ErrorUtils.Format(e)
|
||||
end try
|
||||
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
|
||||
location: ` ${DrillIntoObject(instance[1], ["region"], "N/A")}`
|
||||
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
|
||||
fieldWidths: fieldWidths
|
||||
})
|
||||
|
||||
@@ -34,7 +34,7 @@ class DashManifest
|
||||
|
||||
function fromVideoMetadata(metadata as object, local as boolean) as string
|
||||
adaptiveFormats = []
|
||||
adaptiveFormats.Append (metadata.adaptiveFormats)
|
||||
adaptiveFormats.Append(metadata.adaptiveFormats)
|
||||
|
||||
if local
|
||||
for i = 0 to adaptiveFormats.Count() - 1
|
||||
|
||||
@@ -43,11 +43,17 @@ namespace Invidious
|
||||
m.invidiousNode = invidiousNode
|
||||
end function
|
||||
|
||||
function GetUserRegion() as string
|
||||
if m._userRegion = invalid
|
||||
m._userRegion = m.invidiousNode.applicationInfo@.GetUserCountryCode()
|
||||
function GetUserCountryCode() as string
|
||||
if m._userCountryCode = invalid
|
||||
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
|
||||
return m._userCountryCode
|
||||
end function
|
||||
|
||||
function GetAuthenticationHeaders(token as string) as object
|
||||
@@ -89,7 +95,7 @@ namespace Invidious
|
||||
url = `${instance}${Invidious.SEARCH_SUGGEST_ENDPOINT}`
|
||||
|
||||
request = HttpClient.Get(url)
|
||||
request.QueryParam("region", m.GetUserRegion())
|
||||
request.QueryParam("region", m.GetUserCountryCode())
|
||||
request.QueryParam("q", q)
|
||||
request.CacheSeconds(60 * 60 * 24)
|
||||
|
||||
@@ -266,7 +272,7 @@ namespace Invidious
|
||||
if queryParam.default <> invalid
|
||||
if IsString(queryParam.type) and queryParam.type = "#ISO3166"
|
||||
if queryParam.default = "GetUserCountryCode"
|
||||
request.QueryParam(queryParamKey, m.GetUserRegion())
|
||||
request.QueryParam(queryParamKey, m.GetUserCountryCode())
|
||||
else
|
||||
request.QueryParam(queryParamKey, queryParam.default)
|
||||
end if
|
||||
|
||||
@@ -364,6 +364,10 @@
|
||||
<source>Fetch video thumbnails</source>
|
||||
<translation>Fetch video thumbnails</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch with CORS</source>
|
||||
<translation>Fetch with CORS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Press 'OK' for details</source>
|
||||
<translation>Press 'OK' for details</translation>
|
||||
@@ -432,6 +436,14 @@
|
||||
<source>The instance can fetch video thumbnail for ID %1 (%2)</source>
|
||||
<translation>The instance can fetch video thumbnail for ID %1 (%2)</translation>
|
||||
</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>
|
||||
<source>Passed</source>
|
||||
<translation>Passed</translation>
|
||||
|
||||
@@ -3,7 +3,7 @@ title=PlayletLib
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=23
|
||||
build_version=00001
|
||||
build_version=00004
|
||||
|
||||
ui_resolutions=hd
|
||||
|
||||
|
||||
@@ -69,20 +69,21 @@ class XmlObject
|
||||
|
||||
for i = 0 to node.children.count() - 1
|
||||
child = node.children[i]
|
||||
childIsString = IsString(child)
|
||||
if i = 0
|
||||
if not IsString(child)
|
||||
if not childIsString
|
||||
xmlString += `\n`
|
||||
end if
|
||||
end if
|
||||
|
||||
if IsString(child)
|
||||
if childIsString
|
||||
xmlString += m.XmlEscape(child)
|
||||
else
|
||||
xmlString += m.NodeToXmlString(child, indentLevel + 1)
|
||||
end if
|
||||
|
||||
if i = node.children.count() - 1
|
||||
if not IsString(child)
|
||||
if not childIsString
|
||||
xmlString += `${indentString}`
|
||||
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"
|
||||
FetchVideoCaptions = "Fetch video captions"
|
||||
FetchVideoThumbnails = "Fetch video thumbnails"
|
||||
FetchWithCors = "Fetch with CORS"
|
||||
|
||||
PressOkForDetails = "Press 'OK' for details"
|
||||
|
||||
@@ -138,6 +139,8 @@ namespace Locale
|
||||
ThumbnailNotReachable = "%1 is not reachable"
|
||||
InvalidThumbnailData = "Invalid thumbnail data %1 (Content-Type is not image/*)"
|
||||
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"
|
||||
Failed = "Failed"
|
||||
|
||||
Generated
+18
-18
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "playlet-web",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-web",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
||||
"@tailwindcss/typography": "^0.5.12",
|
||||
"@tailwindcss/typography": "^0.5.13",
|
||||
"@tsconfig/svelte": "^5.0.4",
|
||||
"@vitejs/plugin-legacy": "^5.3.2",
|
||||
"autoprefixer": "^10.4.19",
|
||||
@@ -18,13 +18,13 @@
|
||||
"ip": "^2.0.1",
|
||||
"postcss": "^8.4.38",
|
||||
"svelte": "^4.2.15",
|
||||
"svelte-check": "^3.6.9",
|
||||
"svelte-check": "^3.7.0",
|
||||
"svelte-preprocess": "^5.1.4",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"terser": "^5.30.3",
|
||||
"terser": "^5.30.4",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.9",
|
||||
"vite": "^5.2.10",
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
}
|
||||
},
|
||||
@@ -2386,9 +2386,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/typography": {
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.12.tgz",
|
||||
"integrity": "sha512-CNwpBpconcP7ppxmuq3qvaCxiRWnbhANpY/ruH4L5qs2GCiVDJXde/pjj2HWPV1+Q4G9+V/etrwUYopdcjAlyg==",
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.13.tgz",
|
||||
"integrity": "sha512-ADGcJ8dX21dVVHIwTRgzrcunY6YY9uSlAHHGVKvkA+vLc5qLwEszvKts40lx7z0qc4clpjclwLeK5rVCV2P/uw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lodash.castarray": "^4.4.0",
|
||||
@@ -4246,9 +4246,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/svelte-check": {
|
||||
"version": "3.6.9",
|
||||
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.9.tgz",
|
||||
"integrity": "sha512-hDQrk3L0osX07djQyMiXocKysTLfusqi8AriNcCiQxhQR49/LonYolcUGMtZ0fbUR8HTR198Prrgf52WWU9wEg==",
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.7.0.tgz",
|
||||
"integrity": "sha512-Va6sGL4Vy4znn0K+vaatk98zoBvG2aDee4y3r5X4S80z8DXfbACHvdLlyXa4C4c5tQzK9H0Uq2pbd20wH3ucjQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "^0.3.17",
|
||||
@@ -4410,9 +4410,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.30.3",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz",
|
||||
"integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==",
|
||||
"version": "5.30.4",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.30.4.tgz",
|
||||
"integrity": "sha512-xRdd0v64a8mFK9bnsKVdoNP9GQIKUAaJPTaqEQDL4w/J8WaW4sWXXoMZ+6SimPkfT5bElreXf8m9HnmPc3E1BQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
@@ -4588,9 +4588,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.2.9",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.9.tgz",
|
||||
"integrity": "sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==",
|
||||
"version": "5.2.10",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.10.tgz",
|
||||
"integrity": "sha512-PAzgUZbP7msvQvqdSD+ErD5qGnSFiGOoWmV5yAKUEI0kdhjbH6nMWVyZQC/hSc4aXwc0oJ9aEdIiF9Oje0JFCw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.20.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-web",
|
||||
"version": "0.23.1",
|
||||
"version": "0.23.4",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
||||
"@tailwindcss/typography": "^0.5.12",
|
||||
"@tailwindcss/typography": "^0.5.13",
|
||||
"@tsconfig/svelte": "^5.0.4",
|
||||
"@vitejs/plugin-legacy": "^5.3.2",
|
||||
"autoprefixer": "^10.4.19",
|
||||
@@ -19,13 +19,13 @@
|
||||
"ip": "^2.0.1",
|
||||
"postcss": "^8.4.38",
|
||||
"svelte": "^4.2.15",
|
||||
"svelte-check": "^3.6.9",
|
||||
"svelte-check": "^3.7.0",
|
||||
"svelte-preprocess": "^5.1.4",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"terser": "^5.30.3",
|
||||
"terser": "^5.30.4",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.9",
|
||||
"vite": "^5.2.10",
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
}
|
||||
}
|
||||
@@ -94,16 +94,14 @@ export class PlayletApi {
|
||||
args.timestamp = parseInt(args.timestamp);
|
||||
}
|
||||
}
|
||||
const response = await PlayletApi.postJson(`${PlayletApi.host()}/api/queue`, args);
|
||||
return await response.json();
|
||||
await PlayletApi.postJson(`${PlayletApi.host()}/api/queue`, args);
|
||||
}
|
||||
|
||||
static async queuePlaylist(args) {
|
||||
if (!args.playlistId) {
|
||||
return;
|
||||
}
|
||||
const response = await PlayletApi.postJson(`${PlayletApi.host()}/api/queue`, args);
|
||||
return await response.json();
|
||||
await PlayletApi.postJson(`${PlayletApi.host()}/api/queue`, args);
|
||||
}
|
||||
|
||||
static async openPlaylist(playlistId) {
|
||||
|
||||
Reference in new issue
Block a user