Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1172a82a26 | ||
|
|
c002028727 | ||
|
|
3ab65587df | ||
|
|
4d4fab4e06 | ||
|
|
9cfe14e87e | ||
|
|
e80a41ca72 | ||
|
|
4e8dfe1a23 | ||
|
|
e6302e48fe | ||
|
|
7796c63291 | ||
|
|
dc148a7c59 |
No files matched your search
@@ -5,6 +5,21 @@ 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.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.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).
|
||||||
|
|
||||||
|
## [0.19.1] - 2024-01-13
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- A hint on how to restore video to full screen
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Bookmarks are now added to the top of the list
|
||||||
|
- The search screen keyboard to make it easier to clear the search field
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug with request retry mechanism introduced in 0.19.0
|
||||||
|
|
||||||
## [0.19.0] - 2024-01-10
|
## [0.19.0] - 2024-01-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ In any case, I hope you find **Playlet** useful, and pleasant to use.
|
|||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
**Playlet** does not serve or distribute any material from unauthorized sources.<br/>
|
**Playlet** does not serve or distribute any material from unauthorized sources.<br/>
|
||||||
**Playlet** is simply a frontend to other systems (such as [Invidious](https://github.com/iv-org/invidious)), bringing the watching experience to the TV, as opposed to the existing frontends that are web and mobile focused.
|
**Playlet** is simply a frontend to other systems (such as [Invidious](https://github.com/iv-org/invidious)), bringing the watching experience to the TV, as opposed to the existing frontends that are web and mobile focused.<br/>
|
||||||
|
**Playlet** authors acknowledge that all trademarks and registered trademarks mentioned in this repository and related pages are the property of their respective owners. The use of these trademarks or trade names is for identification purposes only and does not imply any endorsement, affiliation, or sponsorship by the trademark owner.
|
||||||
|
|
||||||
<!-- markdownlint-configure-file {"MD024": { "siblings_only": true } } -->
|
<!-- markdownlint-configure-file {"MD024": { "siblings_only": true } } -->
|
||||||
@@ -4,8 +4,7 @@ This is an automated release. It is generated when new code is pushed to the mai
|
|||||||
|
|
||||||
To test this release:
|
To test this release:
|
||||||
|
|
||||||
- Open Playlet web app in a browser (`http://ROKU_IP_ADDRESS:8888/index.html`)
|
- Open Playlet web app settings in a browser (`http://ROKU_IP_ADDRESS:8888/index.html#settings`)
|
||||||
- Go to settings, and scroll down to `Developer settings`
|
- Scroll down to `Developer settings` and set `Playlet Library version` to `canary` and click `Apply`
|
||||||
- Set `Playlet Library version` to `canary` and click `Apply`
|
|
||||||
- Restart Playlet
|
- Restart Playlet
|
||||||
- You can verify that you're testing the `canary` release in the `Info` tab in Playlet or the web app
|
- You can verify that you're testing the `canary` release in the `Info` tab in Playlet or the web app
|
||||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
|||||||
|
|
||||||
info:
|
info:
|
||||||
title: Playlet Web API
|
title: Playlet Web API
|
||||||
version: 0.19.0
|
version: 0.19.1
|
||||||
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
+6
-6
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.14",
|
"@rokucommunity/bslint": "^0.8.14",
|
||||||
"@types/crypto-js": "^4.2.1",
|
"@types/crypto-js": "^4.2.1",
|
||||||
"@types/fs-extra": "^11.0.4",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/node": "^20.10.7",
|
"@types/node": "^20.11.0",
|
||||||
"@types/xml2js": "^0.4.14",
|
"@types/xml2js": "^0.4.14",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "0.65.16",
|
"brighterscript": "0.65.16",
|
||||||
@@ -370,9 +370,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.10.7",
|
"version": "20.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.0.tgz",
|
||||||
"integrity": "sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==",
|
"integrity": "sha512-o9bjXmDNcF7GbM4CNQpmi+TutCgap/K3w1JyKgxAjqx41zp9qlIAVFi0IhCNsJcXolEqLWhbFbEeL0PvYm4pcQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
|
|||||||
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"description": "Unofficial Youtube client for Roku",
|
"description": "Unofficial Youtube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.14",
|
"@rokucommunity/bslint": "^0.8.14",
|
||||||
"@types/crypto-js": "^4.2.1",
|
"@types/crypto-js": "^4.2.1",
|
||||||
"@types/fs-extra": "^11.0.4",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/node": "^20.10.7",
|
"@types/node": "^20.11.0",
|
||||||
"@types/xml2js": "^0.4.14",
|
"@types/xml2js": "^0.4.14",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "0.65.16",
|
"brighterscript": "0.65.16",
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.19.0"
|
"version": "0.19.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"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=19
|
minor_version=19
|
||||||
build_version=00000
|
build_version=00001
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.19.0"
|
"version": "0.19.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"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",
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ function Init()
|
|||||||
|
|
||||||
m.rowList.screen = m.top
|
m.rowList.screen = m.top
|
||||||
|
|
||||||
|
m.keyboard.keyGrid.keyDefinitionUri = "libpkg:/config/search-keyboard-layout.json5"
|
||||||
|
|
||||||
textEditBox = m.keyboard.textEditBox
|
textEditBox = m.keyboard.textEditBox
|
||||||
textEditBox.voiceEntryType = "generic"
|
textEditBox.voiceEntryType = "generic"
|
||||||
textEditBox.voiceEnabled = true
|
textEditBox.voiceEnabled = true
|
||||||
@@ -301,6 +303,10 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
if m.currentNavigtionNode.isSameNode(m.suggestions)
|
if m.currentNavigtionNode.isSameNode(m.suggestions)
|
||||||
OnSearchButtonFocused()
|
OnSearchButtonFocused()
|
||||||
end if
|
end if
|
||||||
|
if m.currentNavigtionNode.isSameNode(m.keyboard)
|
||||||
|
' First section, grid, row and key
|
||||||
|
m.keyboard.keyGrid.jumpToKey = [0, 0, 0, 0]
|
||||||
|
end if
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -29,12 +29,15 @@ function Load() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
for each bookmarkGroup in bookmarks.groups
|
groupCount = bookmarks.groups.Count()
|
||||||
|
' GetOrCreateBookmarkGroup inserts at the beginning of the list, so we need to iterate backwards
|
||||||
|
for i = groupCount - 1 to 0 step -1
|
||||||
|
bookmarkGroup = bookmarks.groups[i]
|
||||||
bookmarkGroupNode = GetOrCreateBookmarkGroup(bookmarkGroup.title)
|
bookmarkGroupNode = GetOrCreateBookmarkGroup(bookmarkGroup.title)
|
||||||
bookmarksCount = bookmarkGroup.bookmarks.Count()
|
bookmarksCount = bookmarkGroup.bookmarks.Count()
|
||||||
' AddFeedSourceBookmark inserts at the beginning of the list, so we need to iterate backwards
|
' AddFeedSourceBookmark also inserts at the beginning of the list, so we need to iterate backwards
|
||||||
for i = bookmarksCount - 1 to 0 step -1
|
for j = bookmarksCount - 1 to 0 step -1
|
||||||
bookmark = bookmarkGroup.bookmarks[i]
|
bookmark = bookmarkGroup.bookmarks[j]
|
||||||
AddFeedSourceBookmark(bookmark.feedSource, bookmark.id, bookmarkGroupNode)
|
AddFeedSourceBookmark(bookmark.feedSource, bookmark.id, bookmarkGroupNode)
|
||||||
end for
|
end for
|
||||||
end for
|
end for
|
||||||
@@ -85,7 +88,7 @@ function GetOrCreateBookmarkGroup(groupName as string) as object
|
|||||||
node = CreateObject("roSGNode", "ContentNode")
|
node = CreateObject("roSGNode", "ContentNode")
|
||||||
node.id = id
|
node.id = id
|
||||||
node.title = groupName
|
node.title = groupName
|
||||||
m.top.content.appendChild(node)
|
m.top.content.insertChild(node, 0)
|
||||||
LogInfo("Added bookmark group:", groupName)
|
LogInfo("Added bookmark group:", groupName)
|
||||||
return node
|
return node
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ namespace Invidious
|
|||||||
' Retrying should usually fix the issue.
|
' Retrying should usually fix the issue.
|
||||||
if response.StatusCode() = HttpClient.CurlErrors.CURLE_UNSUPPORTED_PROTOCOL
|
if response.StatusCode() = HttpClient.CurlErrors.CURLE_UNSUPPORTED_PROTOCOL
|
||||||
errorMessage = response.ErrorMessage()
|
errorMessage = response.ErrorMessage()
|
||||||
if errorMessage.Contains("HTTP/0.9")
|
if errorMessage.InStr("HTTP/0.9") <> -1
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ import "pkg:/source/utils/Logging.bs"
|
|||||||
function Init()
|
function Init()
|
||||||
SetPlayerStyle()
|
SetPlayerStyle()
|
||||||
SetupAnimation()
|
SetupAnimation()
|
||||||
|
m.fullScreenHint = m.top.findNode("fullScreenHint")
|
||||||
|
m.fullScreenHintLabel = m.top.findNode("fullScreenHintLabel")
|
||||||
|
m.fullScreenHintTimer = m.top.findNode("fullScreenHintTimer")
|
||||||
|
m.fullScreenHintTimer.ObserveField("fire", FuncName(OnFullScreenHintTimer))
|
||||||
|
|
||||||
' videoPlayingSuccess indicates if we started playing a video successfully
|
' videoPlayingSuccess indicates if we started playing a video successfully
|
||||||
' We use it to detect if we should try another link for a video, or if another error
|
' We use it to detect if we should try another link for a video, or if another error
|
||||||
@@ -33,14 +37,20 @@ function Init()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
rect = m.container.fullscreen ? m.top.maxRect : m.top.minRect
|
minRect = m.top.minRect
|
||||||
|
rect = m.container.fullscreen ? m.top.maxRect : minRect
|
||||||
|
|
||||||
m.top.width = rect.width
|
m.top.width = rect.width
|
||||||
m.top.height = rect.height
|
m.top.height = rect.height
|
||||||
m.top.translation = [rect.x, rect.y]
|
m.top.translation = [rect.x, rect.y]
|
||||||
|
|
||||||
|
m.fullScreenHint.width = minRect.width
|
||||||
|
m.fullScreenHintLabel.width = minRect.width
|
||||||
|
m.fullScreenHint.translation = [0, minRect.height - m.fullScreenHint.height]
|
||||||
|
|
||||||
' TODO:P2 show a loading spinner if video is loading minimized
|
' TODO:P2 show a loading spinner if video is loading minimized
|
||||||
m.top.enableUI = m.container.fullscreen
|
m.top.enableUI = m.container.fullscreen
|
||||||
|
m.top.showFullScreenHint = not m.container.fullscreen
|
||||||
|
|
||||||
m.container.observeFieldScoped("fullscreen", FuncName(OnFullScreenChange))
|
m.container.observeFieldScoped("fullscreen", FuncName(OnFullScreenChange))
|
||||||
m.top.ObserveField("state", FuncName(OnVideoPlayerStateChange))
|
m.top.ObserveField("state", FuncName(OnVideoPlayerStateChange))
|
||||||
@@ -319,6 +329,34 @@ function OnFullScreenChange()
|
|||||||
m.minimizeAnimation.control = "start"
|
m.minimizeAnimation.control = "start"
|
||||||
|
|
||||||
m.top.enableUI = m.container.fullscreen
|
m.top.enableUI = m.container.fullscreen
|
||||||
|
m.top.showFullScreenHint = not m.container.fullscreen
|
||||||
|
|
||||||
SponsorBlock.SetVisible(m.notifications, m.container.fullscreen)
|
SponsorBlock.SetVisible(m.notifications, m.container.fullscreen)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function OnShowFullScreenHint() as void
|
||||||
|
m.fullScreenHintTimer.control = "stop"
|
||||||
|
|
||||||
|
if m.container.fullscreen
|
||||||
|
m.fullScreenHint.visible = false
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
if m.top.showFullScreenHint
|
||||||
|
' Take 1 second until the shrink animation finishes to show the hint
|
||||||
|
m.fullScreenHintTimer.duration = 1
|
||||||
|
else
|
||||||
|
' Wait 5 seconds then hide the hint
|
||||||
|
m.fullScreenHintTimer.duration = 5
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.fullScreenHintTimer.control = "start"
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFullScreenHintTimer()
|
||||||
|
showFullScreenHint = m.top.showFullScreenHint
|
||||||
|
m.fullScreenHint.visible = showFullScreenHint
|
||||||
|
if showFullScreenHint
|
||||||
|
m.top.showFullScreenHint = false
|
||||||
|
end if
|
||||||
|
end function
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
<field id="minRect" type="rect2D" value="[834,460,426,240]" />
|
<field id="minRect" type="rect2D" value="[834,460,426,240]" />
|
||||||
<field id="maxRect" type="rect2D" value="[0,0,1280,720]" />
|
<field id="maxRect" type="rect2D" value="[0,0,1280,720]" />
|
||||||
<field id="chapter" type="string" alias="chapterLabel.text" />
|
<field id="chapter" type="string" alias="chapterLabel.text" />
|
||||||
|
<field id="showFullScreenHint" type="boolean" alwaysNotify="true" onChange="OnShowFullScreenHint" />
|
||||||
<function name="PlayWithContent" />
|
<function name="PlayWithContent" />
|
||||||
<function name="Close" />
|
<function name="Close" />
|
||||||
</interface>
|
</interface>
|
||||||
@@ -43,5 +44,24 @@
|
|||||||
key="[0.0, 0.5, 1.0]"
|
key="[0.0, 0.5, 1.0]"
|
||||||
fieldToInterp="VideoPlayer.translation" />
|
fieldToInterp="VideoPlayer.translation" />
|
||||||
</Animation>
|
</Animation>
|
||||||
|
<Rectangle
|
||||||
|
id="fullScreenHint"
|
||||||
|
height="26"
|
||||||
|
color="0x000000"
|
||||||
|
opacity="0.8"
|
||||||
|
visible="false">
|
||||||
|
<Label
|
||||||
|
id="fullScreenHintLabel"
|
||||||
|
text="Press Options (*) for full screen"
|
||||||
|
height="26"
|
||||||
|
color="0xFFFFFF"
|
||||||
|
horizAlign="center"
|
||||||
|
vertAlign="center"
|
||||||
|
font="font:SmallestSystemFont"
|
||||||
|
/>
|
||||||
|
<Timer
|
||||||
|
id="fullScreenHintTimer"
|
||||||
|
duration="5" />
|
||||||
|
</Rectangle>
|
||||||
</children>
|
</children>
|
||||||
</component>
|
</component>
|
||||||
@@ -0,0 +1,171 @@
|
|||||||
|
// This is a copy of the MiniKeyboard definition found here
|
||||||
|
// https://developer.roku.com/en-ca/docs/references/scenegraph/dynamic-voice-keyboard-nodes/key-definition-file.md#minikeyboard
|
||||||
|
// The last row of keys was moved to be the first row.
|
||||||
|
{
|
||||||
|
keyboardWidthFHD: 576,
|
||||||
|
keyboardHeightFHD: 630,
|
||||||
|
keyboardWidthHD: 384,
|
||||||
|
keyboardHeightHD: 420,
|
||||||
|
sections: [
|
||||||
|
{
|
||||||
|
grids: [
|
||||||
|
{
|
||||||
|
rows: [
|
||||||
|
{
|
||||||
|
keys: [
|
||||||
|
{
|
||||||
|
icon: "theme:DKB_ClearKeyBitmap",
|
||||||
|
focusIcon: "theme:DKB_ClearKeyFocusBitmap",
|
||||||
|
strOut: "clear",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "theme:DKB_SpaceKeyBitmap",
|
||||||
|
focusIcon: "theme:DKB_SpaceKeyFocusBitmap",
|
||||||
|
strOut: "space",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "theme:DKB_DeleteKeyBitmap",
|
||||||
|
focusIcon: "theme:DKB_DeleteKeyFocusBitmap",
|
||||||
|
autoRepeat: 1,
|
||||||
|
strOut: "backspace",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: [
|
||||||
|
{
|
||||||
|
label: "a",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "b",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "d",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "e",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "f",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: [
|
||||||
|
{
|
||||||
|
label: "g",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "h",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "i",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "j",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "k",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "l",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: [
|
||||||
|
{
|
||||||
|
label: "m",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "n",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "o",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "p",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "q",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "r",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: [
|
||||||
|
{
|
||||||
|
label: "s",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "t",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "u",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "v",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "w",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "x",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: [
|
||||||
|
{
|
||||||
|
label: "y",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "z",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "3",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "4",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: [
|
||||||
|
{
|
||||||
|
label: "5",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "6",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "7",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "8",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "9",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "0",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -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=19
|
minor_version=19
|
||||||
build_version=00000
|
build_version=00001
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
|
|
||||||
|
|||||||
@@ -113,20 +113,6 @@ namespace HttpClient
|
|||||||
return (new HttpRequest()).Method("HEAD").Url(url)
|
return (new HttpRequest()).Method("HEAD").Url(url)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function FromObject(obj as object) as HttpRequest
|
|
||||||
request = new HttpRequest()
|
|
||||||
|
|
||||||
for each key in obj
|
|
||||||
if IsFunction(request[key])
|
|
||||||
request[key](obj[key])
|
|
||||||
else
|
|
||||||
throw `Invalid key: "${key}" in object passed to HttpClient.FromObject`
|
|
||||||
end if
|
|
||||||
end for
|
|
||||||
|
|
||||||
return request
|
|
||||||
end function
|
|
||||||
|
|
||||||
class HttpRequest
|
class HttpRequest
|
||||||
|
|
||||||
public urlTransfer as object
|
public urlTransfer as object
|
||||||
@@ -374,7 +360,7 @@ namespace HttpClient
|
|||||||
response = invalid
|
response = invalid
|
||||||
|
|
||||||
response = m.AwaitInternal()
|
response = m.AwaitInternal()
|
||||||
if response.IsSuccess() or response.TimedOut() or response.IsCancelled()
|
if response.IsSuccess() or response.IsTimedOut() or response.IsCancelled()
|
||||||
return response
|
return response
|
||||||
end if
|
end if
|
||||||
triesLeft -= 1
|
triesLeft -= 1
|
||||||
@@ -413,7 +399,7 @@ namespace HttpClient
|
|||||||
sleep(backoffMs)
|
sleep(backoffMs)
|
||||||
|
|
||||||
response = m.AwaitInternal()
|
response = m.AwaitInternal()
|
||||||
if response.IsSuccess() or response.TimedOut() or response.IsCancelled() or response.StatusCode() < 500
|
if response.IsSuccess() or response.IsTimedOut() or response.IsCancelled() or response.StatusCode() < 500
|
||||||
return response
|
return response
|
||||||
end if
|
end if
|
||||||
triesLeft -= 1
|
triesLeft -= 1
|
||||||
@@ -554,7 +540,7 @@ namespace HttpClient
|
|||||||
return m.request._cache <> invalid
|
return m.request._cache <> invalid
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function TimedOut() as boolean
|
function IsTimedOut() as boolean
|
||||||
return not m.IsCached() and m.event = invalid
|
return not m.IsCached() and m.event = invalid
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -620,7 +606,7 @@ namespace HttpClient
|
|||||||
else
|
else
|
||||||
if m.request._sent <> true
|
if m.request._sent <> true
|
||||||
m._errorMessage = "Request not sent."
|
m._errorMessage = "Request not sent."
|
||||||
else if m.TimedOut()
|
else if m.IsTimedOut()
|
||||||
m._errorMessage = "Request timed out."
|
m._errorMessage = "Request timed out."
|
||||||
else if m.IsCancelled()
|
else if m.IsCancelled()
|
||||||
m._errorMessage = "Request cancelled."
|
m._errorMessage = "Request cancelled."
|
||||||
|
|||||||
@@ -7,15 +7,6 @@ class XmlObject
|
|||||||
|
|
||||||
private INDENT_SIZE = 2
|
private INDENT_SIZE = 2
|
||||||
|
|
||||||
function new()
|
|
||||||
m.escapeChars = {}
|
|
||||||
m.escapeChars["&"] = "&"
|
|
||||||
m.escapeChars["<"] = "<"
|
|
||||||
m.escapeChars[">"] = ">"
|
|
||||||
m.escapeChars[`"`] = `"`
|
|
||||||
m.escapeChars["'"] = "'"
|
|
||||||
end function
|
|
||||||
|
|
||||||
function Node(name as string, attributes = invalid as object) as boolean
|
function Node(name as string, attributes = invalid as object) as boolean
|
||||||
newNode = {
|
newNode = {
|
||||||
name: name
|
name: name
|
||||||
@@ -92,9 +83,11 @@ class XmlObject
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function XmlEscape(input as string) as string
|
function XmlEscape(input as string) as string
|
||||||
for each escChar in m.escapeChars
|
input = input.replace("&", "&")
|
||||||
input = input.replace(escChar, m.escapeChars[escChar])
|
input = input.replace("<", "<")
|
||||||
end for
|
input = input.replace(">", ">")
|
||||||
|
input = input.replace(`"`, """)
|
||||||
|
input = input.replace("'", "'")
|
||||||
return input
|
return input
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
Generated
+10
-10
@@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"@tsconfig/svelte": "^5.0.2",
|
"@tsconfig/svelte": "^5.0.2",
|
||||||
"@vitejs/plugin-legacy": "^5.2.0",
|
"@vitejs/plugin-legacy": "^5.2.0",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"daisyui": "^4.5.0",
|
"daisyui": "^4.6.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"postcss": "^8.4.33",
|
"postcss": "^8.4.33",
|
||||||
"svelte": "^4.2.8",
|
"svelte": "^4.2.8",
|
||||||
"svelte-check": "^3.6.2",
|
"svelte-check": "^3.6.3",
|
||||||
"svelte-preprocess": "^5.1.3",
|
"svelte-preprocess": "^5.1.3",
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
"terser": "^5.26.0",
|
"terser": "^5.26.0",
|
||||||
@@ -2925,9 +2925,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/daisyui": {
|
"node_modules/daisyui": {
|
||||||
"version": "4.5.0",
|
"version": "4.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.6.0.tgz",
|
||||||
"integrity": "sha512-RWQCPQ0vBUaxGy768O7Ku8SRQgwdoto1lDzuKeVOcMtYghuSbUY7NoPoMK+k8JH4s1J02OvpNAgtB9MeKpZIwg==",
|
"integrity": "sha512-B5ZB/sczXpp4LMdo/SZrtYY/U2hq+Vr9I15QawuWZ0VwgtSAbuZpAZUftKVryEsPuv3BM0yVlBED0nAmtis/dw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"css-selector-tokenizer": "^0.8",
|
"css-selector-tokenizer": "^0.8",
|
||||||
@@ -4234,9 +4234,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/svelte-check": {
|
"node_modules/svelte-check": {
|
||||||
"version": "3.6.2",
|
"version": "3.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.3.tgz",
|
||||||
"integrity": "sha512-E6iFh4aUCGJLRz6QZXH3gcN/VFfkzwtruWSRmlKrLWQTiO6VzLsivR6q02WYLGNAGecV3EocqZuCDrC2uttZ0g==",
|
"integrity": "sha512-Q2nGnoysxUnB9KjnjpQLZwdjK62DHyW6nuH/gm2qteFnDk0lCehe/6z8TsIvYeKjC6luKaWxiNGyOcWiLLPSwA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/trace-mapping": "^0.3.17",
|
"@jridgewell/trace-mapping": "^0.3.17",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@@ -14,12 +14,12 @@
|
|||||||
"@tsconfig/svelte": "^5.0.2",
|
"@tsconfig/svelte": "^5.0.2",
|
||||||
"@vitejs/plugin-legacy": "^5.2.0",
|
"@vitejs/plugin-legacy": "^5.2.0",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"daisyui": "^4.5.0",
|
"daisyui": "^4.6.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"postcss": "^8.4.33",
|
"postcss": "^8.4.33",
|
||||||
"svelte": "^4.2.8",
|
"svelte": "^4.2.8",
|
||||||
"svelte-check": "^3.6.2",
|
"svelte-check": "^3.6.3",
|
||||||
"svelte-preprocess": "^5.1.3",
|
"svelte-preprocess": "^5.1.3",
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
"terser": "^5.26.0",
|
"terser": "^5.26.0",
|
||||||
|
|||||||
Reference in new issue
Block a user