Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1172a82a26 | ||
|
|
c002028727 | ||
|
|
3ab65587df | ||
|
|
4d4fab4e06 | ||
|
|
9cfe14e87e | ||
|
|
e80a41ca72 | ||
|
|
4e8dfe1a23 | ||
|
|
e6302e48fe | ||
|
|
7796c63291 | ||
|
|
dc148a7c59 | ||
|
|
9df1b70e49 | ||
|
|
bb471a5cde | ||
|
|
b68aad7d4a | ||
|
|
73b6314ec7 | ||
|
|
29969db3e4 | ||
|
|
5335a0273b | ||
|
|
641c9ef5bf | ||
|
|
b0257d97e0 | ||
|
|
5c9c1c204f | ||
|
|
11afc34ecc | ||
|
|
3edfce1366 | ||
|
|
5ff02af7ac | ||
|
|
0cc8cdf2be | ||
|
|
3ecac831bf | ||
|
|
86d5710969 | ||
|
|
575935f5ac | ||
|
|
7eb20dfe2c | ||
|
|
0b01830ad9 | ||
|
|
33fdf796a2 | ||
|
|
fd7bdde733 | ||
|
|
e7324495fe | ||
|
|
2e7b3d0aa5 | ||
|
|
20f345593e | ||
|
|
754da7e836 | ||
|
|
85c3eb8321 | ||
|
|
e59e45e310 | ||
|
|
2548fb9097 | ||
|
|
1cb80f71b5 | ||
|
|
0a7a6c65e2 | ||
|
|
529b915d7f | ||
|
|
a76a2cb77f | ||
|
|
707739b901 | ||
|
|
8c72258879 | ||
|
|
d245c072e9 | ||
|
|
0f000590a0 | ||
|
|
93c1e48d39 | ||
|
|
d6c7d81347 | ||
|
|
331f2ff3cb | ||
|
|
6c42fbe056 | ||
|
|
7e8c828007 | ||
|
|
ba59aad767 | ||
|
|
36ae525154 | ||
|
|
5ef130bc51 | ||
|
|
39591abc34 | ||
|
|
84bd50d970 | ||
|
|
fd0259615b | ||
|
|
e53ad785c6 | ||
|
|
cbda8dbf9b | ||
|
|
242298911c | ||
|
|
8f1d3778d8 | ||
|
|
192401c847 | ||
|
|
132e3ec3e3 | ||
|
|
3570f011c4 | ||
|
|
482daf5e12 | ||
|
|
64f5985aae | ||
|
|
a1aed7d253 | ||
|
|
f581d568d9 | ||
|
|
54b0acbe8f | ||
|
|
6e4262e6a5 | ||
|
|
4c90cf1e98 | ||
|
|
72f547cc22 | ||
|
|
1cee5d61ab | ||
|
|
d87337d389 | ||
|
|
2ba2115da7 | ||
|
|
49be599c32 | ||
|
|
8d5646aeb3 | ||
|
|
07b0e422ff | ||
|
|
35325bfae2 | ||
|
|
c122d286dc | ||
|
|
66208d941d | ||
|
|
9cf6626efb | ||
|
|
69c87228af | ||
|
|
2502eae462 | ||
|
|
b0e0c2d09d | ||
|
|
5982b5a75f | ||
|
|
51966cb33f | ||
|
|
bfe8a3c860 | ||
|
|
ef17ff44af | ||
|
|
826228e939 | ||
|
|
b77519493d | ||
|
|
6a46d4cd09 | ||
|
|
382cbe33d3 | ||
|
|
e9b57c9c08 | ||
|
|
457242057d | ||
|
|
665f76701d | ||
|
|
258726fadb | ||
|
|
215a23c91d | ||
|
|
19ecc25852 | ||
|
|
0ae524f88c | ||
|
|
8bf16bfbd5 | ||
|
|
0acb7031d3 | ||
|
|
0ddc9a48aa | ||
|
|
3ac4d959d3 | ||
|
|
19de693298 | ||
|
|
46af79c2ae | ||
|
|
fd077a0d1a | ||
|
|
981e95b0d4 | ||
|
|
8883a59fcb | ||
|
|
662cb4b634 | ||
|
|
7269fdff7d | ||
|
|
710e892545 | ||
|
|
7dd5561faa | ||
|
|
d40a12d1f1 | ||
|
|
1170f422ec | ||
|
|
2639267e1f | ||
|
|
3b35adeae9 | ||
|
|
e8b6cd1588 | ||
|
|
0377f075be | ||
|
|
89034378fb | ||
|
|
9ae8601a32 | ||
|
|
61327401b0 | ||
|
|
94a017a878 | ||
|
|
eb3d1724e4 | ||
|
|
9d95834ebb | ||
|
|
9201b8dfe0 | ||
|
|
cf17fed02e | ||
|
|
f8d202be56 | ||
|
|
af091fe8f7 | ||
|
|
d89b1c519d | ||
|
|
dca3e42c79 | ||
|
|
2f72c6471a | ||
|
|
413e73c1c0 | ||
|
|
2a57cc99c7 | ||
|
|
d65f930247 | ||
|
|
ed632a7a62 | ||
|
|
89ea45ed54 | ||
|
|
d7e5732fde | ||
|
|
9f5a605e8f | ||
|
|
45da0880ba | ||
|
|
9e47d4d42e | ||
|
|
3312bbc56e | ||
|
|
e1cda5cc5c | ||
|
|
af0ddf68c5 | ||
|
|
3559a3fff6 | ||
|
|
e0709452be | ||
|
|
9bbf8dd038 | ||
|
|
64d655fca9 | ||
|
|
ecb738ab1f | ||
|
|
c14fa7a1d3 | ||
|
|
96f24a12a7 | ||
|
|
665fa44a49 | ||
|
|
3c43934081 | ||
|
|
e941bc2439 | ||
|
|
c35779b211 | ||
|
|
7adb90ccc2 | ||
|
|
59ed47108d | ||
|
|
2eb0cf88af | ||
|
|
38a1d9a950 | ||
|
|
c1bb059d66 | ||
|
|
da71382b4a | ||
|
|
4c32243e6e | ||
|
|
91be37fd8a | ||
|
|
54db808b83 | ||
|
|
8f722276f3 | ||
|
|
3b5d7a9520 | ||
|
|
94773d5c3a | ||
|
|
60fb566a01 | ||
|
|
ac9709fc4a | ||
|
|
1f1a4479da |
No files matched your search
@@ -3,6 +3,7 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -63,6 +64,11 @@ jobs:
|
|||||||
latest_release=$(awk 'BEGIN { RS="## \\[" } NR==2 { print "## ["$0 }' CHANGELOG.md)
|
latest_release=$(awk 'BEGIN { RS="## \\[" } NR==2 { print "## ["$0 }' CHANGELOG.md)
|
||||||
echo -e "\n$latest_release" >> docs/canary-changelog.md
|
echo -e "\n$latest_release" >> docs/canary-changelog.md
|
||||||
|
|
||||||
|
# A bug in gh cli causes the release to be created as a draft, and not released.
|
||||||
|
# See https://github.com/cli/cli/issues/8458
|
||||||
|
- name: Wait 10 seconds
|
||||||
|
run: sleep 10
|
||||||
|
|
||||||
- name: Create Canary release
|
- name: Create Canary release
|
||||||
run: gh release create canary ./release/playlet.zip ./release/playlet-lib.zip --notes-file docs/canary-changelog.md --prerelease --title Canary
|
run: gh release create canary ./release/playlet.zip ./release/playlet-lib.zip --notes-file docs/canary-changelog.md --prerelease --title Canary
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
name: Stats
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 11 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_wiki_stats:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Checkout Wiki
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: ${{ github.repository }}.wiki
|
||||||
|
path: ./playlet.wiki
|
||||||
|
|
||||||
|
- name: Configure repo
|
||||||
|
run: |
|
||||||
|
git config --local user.email "githubaction@githubaction.com"
|
||||||
|
git config --local user.name "github-action wiki updater"
|
||||||
|
working-directory: ./playlet.wiki
|
||||||
|
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
cache: "npm"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Download attachements
|
||||||
|
run: node tools/download-stats.js
|
||||||
|
env:
|
||||||
|
EMAIL: ${{ secrets.EMAIL }}
|
||||||
|
EMAIL_APP_PASSWORD: ${{ secrets.EMAIL_APP_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Update wiki
|
||||||
|
run: git add "." && git commit -m "Update stats" --no-verify && git push || true
|
||||||
|
working-directory: ./playlet.wiki
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
name: Update Dependencies
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * 6"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_deps:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
cache: "npm"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Update dependencies
|
||||||
|
run: npm run update-deps
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm i
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v5
|
||||||
|
with:
|
||||||
|
commit-message: "update dependencies"
|
||||||
|
branch: chore/update-deps
|
||||||
|
title: "[chore] update dependencies"
|
||||||
|
body: "Weekly pull request to update dependencies."
|
||||||
@@ -5,6 +5,126 @@ 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
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- A home screen editor allowing to enable/disable feeds, and change their order.
|
||||||
|
- The editor can be accessed from the Settings screen.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- `HTTP/0.9 when not allowed` errors by adding a retry to web requests
|
||||||
|
- Issue where a bookmarked video is no longer valid (such as a video made private, or a live stream that ended)
|
||||||
|
- [Perf] App loads slightly faster (~500ms)
|
||||||
|
|
||||||
|
## [0.18.1] - 2024-01-02
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A rare bug that causes the app to crash when displaying video cells
|
||||||
|
- A rare bug where a long press can cause a crash
|
||||||
|
- [Attempt] to fix a crash caused by execution timeout when stopping a video takes too long
|
||||||
|
- Unsupported subtitles (subtitles that can't be rendered will not be used)
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- `Funny` and `News` from the Home screen.
|
||||||
|
- These are not standard feeds (like `Trending`), and are just search results for `Funny` and `News`. They were added in earlier Playlet versions to have more content in the Home screen.
|
||||||
|
- If you like to add these two feeds to your bookmarks:
|
||||||
|
- Search for `Funny` (or `News`)
|
||||||
|
- Set the `Sort by` filter to `Upload date`
|
||||||
|
- Press and hold the `Ok` button while a video from the search result is selected
|
||||||
|
- Choose the `Add to "Search - Funny"` option
|
||||||
|
|
||||||
|
## [0.18.0] - 2023-12-28
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Medium video quality in the settings (For most videos, this is 360p)
|
||||||
|
- Invidious watch history feed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- (Regression) Issue where auto-play keeps playing the same videos in a loop
|
||||||
|
- Small search box styling bug for Safari
|
||||||
|
- A bug where the skipping of a sponsored section at the end of a video leads to an infinite loop
|
||||||
|
- A couple of bugs when listing Invidious public instances
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Xmas theme logo - can't publish it before end of year... ([link](https://blog.roku.com/developer/channel-store-blackouts-2023))
|
||||||
|
|
||||||
|
## [0.17.3] - 2023-12-13
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Xmas theme logo
|
||||||
|
|
||||||
|
## [0.17.2] - 2023-12-10
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Loading message
|
||||||
|
|
||||||
|
## [0.17.1] - 2023-12-08
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- An instance test to make sure thumbnails are reachable
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A rare error when video player is closed but does not have valid content
|
||||||
|
- A rare error that can occur with loading indicators causing a crash
|
||||||
|
|
||||||
|
## [0.17.0] - 2023-11-17
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Playlet logo in web app is clickable, and launches app if not already on
|
||||||
|
- Remote control in web app
|
||||||
|
- Clickable buttons and keyboard support
|
||||||
|
|
||||||
|
## [0.16.0] - 2023-11-13
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- User interface for the Queue: Press and hold `Options (*)` to show the queue
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Crash when video player has no content
|
||||||
|
- Execution timeout on cirlce posters
|
||||||
|
|
||||||
|
## [0.15.1] - 2023-11-10
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- An option to disable search history
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A rare bug that causes the app to crash when displaying video cells
|
||||||
|
- A bug where we show error dialogs that happened on screens that are already closed
|
||||||
|
- A bug where bookmarks show duplicate videos
|
||||||
|
- A bug where watch history is not always sent to Invidious
|
||||||
|
|
||||||
## [0.15.0] - 2023-11-05
|
## [0.15.0] - 2023-11-05
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -62,14 +62,25 @@ More under [Screenshots](./docs/screenshots/README.md)
|
|||||||
### Customize Invidious instance
|
### Customize Invidious instance
|
||||||
|
|
||||||
1. Open settings in Playlet
|
1. Open settings in Playlet
|
||||||
1. Scan QR Code with Phone
|
1. Select Invidious -> Instance
|
||||||
1. Change the Invidious instance
|
1. Set a custom instance, or choose a public one hosted by volunteers (from https://api.invidious.io/)
|
||||||
1. You can also do this from the settings tab
|
1. Optionally, Select `Test instance` to make sure it works
|
||||||
|
1. Hit save
|
||||||
|
|
||||||
|
> ℹ️ **Note**: If you are logged in when you change the instance, you will remain logged in to the old instance. In this case, Playlet will use the old instance to retrieve your subscriptions and your playlists, but will use the new instance for everything else. After switching to a new instance, you can log out and log in again to use your profile on the new instance.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
For everything related to Playlet app development, please see the [documentation](./docs/README.md)
|
For everything related to Playlet app development, please see the [documentation](./docs/README.md)
|
||||||
|
|
||||||
|
## Analytics and reporting
|
||||||
|
|
||||||
|
We do not collect any usage data, anonymous or not. But Roku does, and you can find the data made available to Playlet in the [Wiki](https://github.com/iBicha/playlet/wiki).
|
||||||
|
Most software in the wild collect some data to make sure things work, and to prioritize features.
|
||||||
|
Because we don't do that, we wouldn't know if people using Playlet are facing issues, unless these issues get reported.
|
||||||
|
Playlet could run on variaty of devices, with different capabilities and screen sizes, and different Invidious instances.
|
||||||
|
That's why it's important to report any issues you encouter using Playlet, otherwise it's unlikely that they get addressed.
|
||||||
|
|
||||||
## Why Playlet
|
## Why Playlet
|
||||||
|
|
||||||
```none
|
```none
|
||||||
@@ -90,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 } } -->
|
||||||
@@ -3,11 +3,16 @@
|
|||||||
"createPackage": false,
|
"createPackage": false,
|
||||||
"diagnosticFilters": [
|
"diagnosticFilters": [
|
||||||
{
|
{
|
||||||
"src": "**/roku_modules/**/*.*"
|
"src": "**/*.part.xml",
|
||||||
},
|
"codes": [
|
||||||
1090
|
// 1067 - Cannot find function with name '${name}' in component scope
|
||||||
|
// This is to prevent errors where the onChange function is not found in the component scope
|
||||||
|
1067
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"diagnosticLevel": "error",
|
"diagnosticLevel": "error",
|
||||||
|
// The validation regex rules are validated using the validation-plugin.ts plugin
|
||||||
"validation": [
|
"validation": [
|
||||||
{
|
{
|
||||||
"code": "NO_SET_FOCUS",
|
"code": "NO_SET_FOCUS",
|
||||||
@@ -20,6 +25,21 @@
|
|||||||
"regex": "\\.observeField(scoped)?\\s*\\(\\s*\"\\w+\"\\s*,\\s*\"\\w+\"\\s*\\)",
|
"regex": "\\.observeField(scoped)?\\s*\\(\\s*\"\\w+\"\\s*,\\s*\"\\w+\"\\s*\\)",
|
||||||
"regexFlags": "ig",
|
"regexFlags": "ig",
|
||||||
"message": "observeField(\"field\", \"callback\") is not allowed. Use observeField(\"field\", FuncName(callback)) instead."
|
"message": "observeField(\"field\", \"callback\") is not allowed. Use observeField(\"field\", FuncName(callback)) instead."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "NO_INVALID_CALLFUNC_ARG",
|
||||||
|
"regex": "@\\.\\w+\\(invalid\\)",
|
||||||
|
"regexFlags": "ig",
|
||||||
|
"message": "the arg invalid in @.func(invalid) is not needed. Just use @.func() instead."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Tagging unused variables (Available since Roku OS 11.0) – Variables can explicitly
|
||||||
|
// be marked as unused by prepending an underscore to the value (for example, sub myTask(_x)).
|
||||||
|
// https://developer.roku.com/en-ca/docs/references/brightscript/language/expressions-variables-types.md#types
|
||||||
|
"code": "UNUSED_ARG_STARTS_WITH_UNDERSCORE",
|
||||||
|
"regex": "\\b(?!_unused)unused\\b",
|
||||||
|
"regexFlags": "ig",
|
||||||
|
"message": "unused args should start with _ (e.g. _unused)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
@@ -50,16 +70,13 @@
|
|||||||
"../tools/bs-plugins/json-yaml-plugin.ts",
|
"../tools/bs-plugins/json-yaml-plugin.ts",
|
||||||
"../tools/bs-plugins/validation-plugin.ts",
|
"../tools/bs-plugins/validation-plugin.ts",
|
||||||
"../tools/bs-plugins/logger-plugin.ts",
|
"../tools/bs-plugins/logger-plugin.ts",
|
||||||
"../tools/bs-plugins/image-gen-plugin.ts"
|
"../tools/bs-plugins/image-gen-plugin.ts",
|
||||||
|
"../tools/bs-plugins/type-gen-plugin.ts"
|
||||||
],
|
],
|
||||||
"retainStagingDir": true,
|
"retainStagingDir": true,
|
||||||
"require": [
|
"require": [
|
||||||
"ts-node/register"
|
"ts-node/register"
|
||||||
],
|
],
|
||||||
"rokuLog": {
|
"sourceMap": true,
|
||||||
"insertPkgPath": true,
|
"pruneEmptyCodeFiles": true
|
||||||
"removeComments": false,
|
|
||||||
"strip": false
|
|
||||||
},
|
|
||||||
"sourceMap": true
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "bsconfig.base.json",
|
"extends": "bsconfig.base.jsonc",
|
||||||
"files": [
|
"files": [
|
||||||
"source/**",
|
"source/**",
|
||||||
"components/**",
|
"components/**",
|
||||||
@@ -26,7 +26,8 @@
|
|||||||
"../tools/bs-plugins/json-yaml-plugin.ts",
|
"../tools/bs-plugins/json-yaml-plugin.ts",
|
||||||
"../tools/bs-plugins/validation-plugin.ts",
|
"../tools/bs-plugins/validation-plugin.ts",
|
||||||
"../tools/bs-plugins/logger-plugin.ts",
|
"../tools/bs-plugins/logger-plugin.ts",
|
||||||
"../tools/bs-plugins/image-gen-plugin.ts"
|
"../tools/bs-plugins/image-gen-plugin.ts",
|
||||||
|
"../tools/bs-plugins/type-gen-plugin.ts"
|
||||||
],
|
],
|
||||||
"rooibos": {
|
"rooibos": {
|
||||||
"logLevel": 2,
|
"logLevel": 2,
|
||||||
@@ -5,23 +5,32 @@
|
|||||||
"**/bslib.brs"
|
"**/bslib.brs"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"aa-comma-style": "no-dangling",
|
// Code style
|
||||||
"anon-function-style": "no-sub",
|
|
||||||
"assign-all-paths": "warn",
|
|
||||||
"block-if-style": "no-then",
|
|
||||||
"case-sensitivity": "warn",
|
|
||||||
"condition-style": "no-group",
|
|
||||||
"consistent-return": "error",
|
|
||||||
"eol-last": "always",
|
|
||||||
"inline-if-style": "never",
|
"inline-if-style": "never",
|
||||||
|
"block-if-style": "no-then",
|
||||||
|
"condition-style": "no-group",
|
||||||
"named-function-style": "no-sub",
|
"named-function-style": "no-sub",
|
||||||
|
"anon-function-style": "no-sub",
|
||||||
|
"aa-comma-style": "never",
|
||||||
"no-print": "warn",
|
"no-print": "warn",
|
||||||
"no-stop": "error",
|
|
||||||
"no-todo": "off",
|
"no-todo": "off",
|
||||||
|
"no-stop": "error",
|
||||||
|
"eol-last": "always",
|
||||||
|
// Strictness
|
||||||
"type-annotations": "all",
|
"type-annotations": "all",
|
||||||
"unreachable-code": "warn",
|
// Color
|
||||||
|
"color-format": "hash-hex",
|
||||||
|
"color-case": "upper",
|
||||||
|
"color-alpha": "always",
|
||||||
|
"color-alpha-defaults": "allowed",
|
||||||
|
"color-cert": "always",
|
||||||
|
// Code flow
|
||||||
|
"assign-all-paths": "error",
|
||||||
|
"unsafe-path-loop": "error",
|
||||||
"unsafe-iterators": "error",
|
"unsafe-iterators": "error",
|
||||||
"unsafe-path-loop": "warn",
|
"unreachable-code": "warn",
|
||||||
"unused-variable": "warn"
|
"case-sensitivity": "error",
|
||||||
|
"unused-variable": "error",
|
||||||
|
"consistent-return": "error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ That's pretty much it.
|
|||||||
There are a few reasons we made this separation:
|
There are a few reasons we made this separation:
|
||||||
|
|
||||||
- Playlet relies on [Invidious](https://github.com/iv-org/invidious). Invidious tries to keep up with Youtube making changes to their platform, but sometimes, a breaking change happens that requires Playlet to react quickly. Releasing through the Roku Channel store can take days, or a week. During this time, Playlet would be not functional, and that's not acceptable.
|
- Playlet relies on [Invidious](https://github.com/iv-org/invidious). Invidious tries to keep up with Youtube making changes to their platform, but sometimes, a breaking change happens that requires Playlet to react quickly. Releasing through the Roku Channel store can take days, or a week. During this time, Playlet would be not functional, and that's not acceptable.
|
||||||
- The ability to roll back: Sometimes an app breaking bug gets released. Allowing users to choose a seperate version is a flexible way to keep things working. Although right now rollbacks are behind a - hidden by default - developer menu, the reasoning still stands.
|
- The ability to roll back: Sometimes an app breaking bug gets released. Allowing users to choose a seperate version is a flexible way to keep things working. For example, it's possible to choose a different verrsion from the developer settings in the web app.
|
||||||
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very conveninct and less of a hassle, than going through the Roku Channel store.
|
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very conveninct and less of a hassle, than going through the Roku Channel store.
|
||||||
- I've had instances where I was trying to pass the certfication for Playlet to publish it. One of the criterias is to pass a some automated tests. But the tests were failing because their system could not connect to their Roku test devices (connection keeps timing out). My only option was to keep trying over and over until it worked.
|
- I've had instances where I was trying to pass the certfication for Playlet to publish it. One of the criterias is to pass a some automated tests. But the tests were failing because their system could not connect to their Roku test devices (connection keeps timing out). My only option was to keep trying over and over until it worked.
|
||||||
- It might sound that Playlet Lib is just a workaround for the Roku Channel release process. But phrased differently, Roku Channel release process is not good enough of what we need for Playlet.
|
- It might sound that Playlet Lib is just a workaround for the Roku Channel release process. But phrased differently, Roku Channel release process is not good enough of what we need for Playlet.
|
||||||
@@ -163,7 +163,7 @@ Playlet lib comes equipped with a web server that runs on port 8888 when the app
|
|||||||
- Allows remotely casting videos, change preferences, etc.
|
- Allows remotely casting videos, change preferences, etc.
|
||||||
- Authentication using Invidious
|
- Authentication using Invidious
|
||||||
|
|
||||||
The web server runs on a continiously running [Task](https://developer.roku.com/en-ca/docs/references/scenegraph/control-nodes/task.md) and uses a middeware system to manage routes, serve static files, [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), and more.
|
The web server runs on a continuously running [Task](https://developer.roku.com/en-ca/docs/references/scenegraph/control-nodes/task.md) and uses a middeware system to manage routes, serve static files, [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), and more.
|
||||||
|
|
||||||
The server's API enpoints are described through the Open API spec file [playlet-web-api.yml](./playlet-web-api.yml)
|
The server's API enpoints are described through the Open API spec file [playlet-web-api.yml](./playlet-web-api.yml)
|
||||||
|
|
||||||
@@ -256,7 +256,7 @@ The web app uses [Svelte](https://svelte.dev/), [Vite](https://vitejs.dev/) and
|
|||||||
|
|
||||||
Since modifying the web app code requires building all three projects (Playlet, Playlet lib, and Playlet web app) this makes the iteration speed very slow, and we lose the benefits of web development, such as hot reloads.
|
Since modifying the web app code requires building all three projects (Playlet, Playlet lib, and Playlet web app) this makes the iteration speed very slow, and we lose the benefits of web development, such as hot reloads.
|
||||||
|
|
||||||
For that reason, the recommended iteration when working on the dev app is:
|
For that reason, the recommended iteration when working on the web app is:
|
||||||
|
|
||||||
1. Start `Playlet (dev)` (by selecting `Playlet (dev)` and pressing Play in VS Code)
|
1. Start `Playlet (dev)` (by selecting `Playlet (dev)` and pressing Play in VS Code)
|
||||||
1. Once Playlet starts, switch to `Playlet Web (dev)` and press play. Do not stop `Playlet (dev)`
|
1. Once Playlet starts, switch to `Playlet Web (dev)` and press play. Do not stop `Playlet (dev)`
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ These are mostly the steps when releasing a new version:
|
|||||||
|
|
||||||
For releasing to the store (when needed), this is done following a Playlet lib release:
|
For releasing to the store (when needed), this is done following a Playlet lib release:
|
||||||
|
|
||||||
- Switch to main branch and pull changes - **match commit corresponding to the release.**
|
- Switch to main branch and pull changes, **including tags** - **match commit corresponding to the release.**
|
||||||
- `npm run build:release:ci`
|
- `npm run build:release:ci`
|
||||||
- This makes sure to have a valid app in the staging folder
|
- This makes sure to have a valid app in the staging folder
|
||||||
- `npm run sign-released-package`
|
- `npm run sign-released-package`
|
||||||
|
|||||||
@@ -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.15.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
|
||||||
@@ -153,7 +153,7 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
index:
|
index:
|
||||||
type: integer
|
type: integer
|
||||||
playlistIndex
|
playlistIndex:
|
||||||
type: integer
|
type: integer
|
||||||
items:
|
items:
|
||||||
type: array
|
type: array
|
||||||
@@ -178,7 +178,7 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
index:
|
index:
|
||||||
type: integer
|
type: integer
|
||||||
playlistIndex
|
playlistIndex:
|
||||||
type: integer
|
type: integer
|
||||||
items:
|
items:
|
||||||
type: array
|
type: array
|
||||||
@@ -227,6 +227,41 @@ paths:
|
|||||||
description: No Content
|
description: No Content
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
|
/api/home-layout:
|
||||||
|
get:
|
||||||
|
summary: Get home layout
|
||||||
|
description: Get the current home layout. This is the layout of the home screen, based on user preferences.
|
||||||
|
operationId: getHomeLayout
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
feedSources:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
apiType:
|
||||||
|
type: string
|
||||||
|
endpoint:
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
queryParams:
|
||||||
|
type: object
|
||||||
|
additionalProperties: true
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
/api/playlet-lib-urls:
|
/api/playlet-lib-urls:
|
||||||
get:
|
get:
|
||||||
summary: Get Playlet lib URLs
|
summary: Get Playlet lib URLs
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
- [Bindings](#bindings)
|
- [Bindings](#bindings)
|
||||||
- [Async Task Generator](#async-task-generator)
|
- [Async Task Generator](#async-task-generator)
|
||||||
- [Tracking transpilied files](#tracking-transpilied-files)
|
- [Tracking transpilied files](#tracking-transpilied-files)
|
||||||
|
- [Logger](#logger)
|
||||||
|
- [Type Gen](#type-gen)
|
||||||
|
|
||||||
Playlet implements a few [Brighterscript Plugins](https://github.com/rokucommunity/brighterscript/blob/master/docs/plugins.md). The plugins inject themselves in the compilation process, allowing the modification of bs scripts, xml components, and even assets or the app manifest. Let's start with a simple one:
|
Playlet implements a few [Brighterscript Plugins](https://github.com/rokucommunity/brighterscript/blob/master/docs/plugins.md). The plugins inject themselves in the compilation process, allowing the modification of bs scripts, xml components, and even assets or the app manifest. Let's start with a simple one:
|
||||||
|
|
||||||
@@ -427,7 +429,7 @@ myNode = CreateObject("roSGNode", "MyComponent")
|
|||||||
' Add it to the right parent
|
' Add it to the right parent
|
||||||
myParentNode.appendChild(myNode)
|
myParentNode.appendChild(myNode)
|
||||||
' Trigger the binding manually
|
' Trigger the binding manually
|
||||||
myNode@.BindNode(invalid)
|
myNode@.BindNode()
|
||||||
```
|
```
|
||||||
|
|
||||||
calling `BindNode` will trigger all the binding steps just for this node. But it is expected that all its dependencies are already in the scene and can be found.
|
calling `BindNode` will trigger all the binding steps just for this node. But it is expected that all its dependencies are already in the scene and can be found.
|
||||||
@@ -468,7 +470,10 @@ end function
|
|||||||
And use the function like so
|
And use the function like so
|
||||||
|
|
||||||
```brighterscript
|
```brighterscript
|
||||||
StartAsyncTask(MyBackgroundTask, {myVar: "some input"}, function(output as object) as void
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
|
|
||||||
|
AsyncTask.Start(Tasks.MyBackgroundTask, {myVar: "some input"}, function(output as object) as void
|
||||||
if output.success
|
if output.success
|
||||||
print(output.result.value)
|
print(output.result.value)
|
||||||
end if
|
end if
|
||||||
@@ -477,7 +482,7 @@ end function)
|
|||||||
|
|
||||||
The rest will be taken care of by the plugin, which will generate an `xml` file containing the task component, and a script that handles calling the function.
|
The rest will be taken care of by the plugin, which will generate an `xml` file containing the task component, and a script that handles calling the function.
|
||||||
|
|
||||||
Although very useful, this pattern might not be the best for long running tasks (like the Web Server) or other tasks that require task reuse. This is because `StartAsyncTask` create a new instance of the task every time.
|
Although very useful, this pattern might not be the best for long running tasks (like the Web Server) or other tasks that require task reuse. This is because `AsyncTask.Start` create a new instance of the task every time.
|
||||||
|
|
||||||
## Tracking transpilied files
|
## Tracking transpilied files
|
||||||
|
|
||||||
@@ -499,3 +504,70 @@ Additionally, if there's a folder `MyFolder` and `MyFolder.transpiled` in the so
|
|||||||
To reduce the noise of this plugin, it only runs when we're making a test build.
|
To reduce the noise of this plugin, it only runs when we're making a test build.
|
||||||
|
|
||||||
Because we continiously make test build in Github actions, the tracked transpilied files will be automatically added to PRs, so that we notice if outputs do not look right.
|
Because we continiously make test build in Github actions, the tracked transpilied files will be automatically added to PRs, so that we notice if outputs do not look right.
|
||||||
|
|
||||||
|
## Logger
|
||||||
|
|
||||||
|
**[Source](/tools/bs-plugins/logger-plugin.ts)**
|
||||||
|
|
||||||
|
### Why
|
||||||
|
|
||||||
|
The logger plugin does some code transformation to log calls, which can add caller path at compile time, or the filename, based on debug/release configuration.
|
||||||
|
|
||||||
|
### How
|
||||||
|
|
||||||
|
The logger plugin searches for calls to the predefined functions `LogError`, `LogWarn`, `LogInfo` and `LogDebug`. Once found, it does the following (we take `LogError` as an example):
|
||||||
|
|
||||||
|
- It replaces calls of `LogError` with `LogErrorX` where X is the number of arguments.
|
||||||
|
- For example, it replaces `LogError("Cannot complete operation:", error)` with `LogError2("Cannot complete operation:", error)`
|
||||||
|
- Based on usage, it generates `LogErrorX` functions used. Example:
|
||||||
|
|
||||||
|
```brs
|
||||||
|
function LogError2(arg0, arg1) as void
|
||||||
|
logger = m.global.logger
|
||||||
|
if logger.logLevel < 0
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
m.global.logger.logLine = "[ERROR]" + ToString(arg0) + " " + ToString(arg1)
|
||||||
|
end function
|
||||||
|
```
|
||||||
|
|
||||||
|
- Finally, it adds the caller file and line number to the args.
|
||||||
|
- `LogError("Cannot complete operation:", error)` is replaced with `LogError(CALLER, "Cannot complete operation:", error)`
|
||||||
|
- `CALLER` would be the full path to the source .bs file and line number, for easier debugging
|
||||||
|
- In release mode, `CALLER` would be only the file name and line number, without the full path. This is so that dev directory does not get "leaked" in releases.
|
||||||
|
|
||||||
|
This is implemented to make it easy to identify where logs came from, and to generate log functions with the right number of parameters based on usage. This way we do not need all combination of functions (`LogError`, `LogWarn`, `LogInfo` and `LogDebug` multiplied by number of parameters, `LogError1`, `LogError2`, `LogError3`, and so on). Since brightscript does not support function templates or function overloading, it is either this method, or use optional parameters (but then we would have to check which parameter was passed, and which was is using the default value.) and end up with a log function with logs of if's else'es.
|
||||||
|
|
||||||
|
To understand more about what's being generated, download `playlet-lib.zip` from [releases](https://github.com/iBicha/playlet/releases), extract, and inspect the file `source/utils/Logging.brs`. You will see it contains log functions in the form `LogVerbX`, that are generated based on usage.
|
||||||
|
|
||||||
|
To give credit where credit is due, some of the ideas here (like adding the source location to the log) came from [roku-log](https://github.com/georgejecook/roku-log)
|
||||||
|
|
||||||
|
## Type Gen
|
||||||
|
|
||||||
|
**[Source](/tools/bs-plugins/type-gen-plugin.ts)**
|
||||||
|
|
||||||
|
### Why
|
||||||
|
|
||||||
|
I found myself implementing type checking functions like `IsBool`, `IsInt`, and `IsString`, and functions for getting a valid type, like `ValidBool`, `ValidInt`, and `ValidString`. The implementation is the same, why not generate them?
|
||||||
|
|
||||||
|
### How
|
||||||
|
|
||||||
|
Simply we declare them in an object describing the type, the interface, and the default value, and generate all corresponding functions.
|
||||||
|
|
||||||
|
Sample output:
|
||||||
|
|
||||||
|
```brs
|
||||||
|
' Returns true if the given object is of type Bool, false otherwise
|
||||||
|
function IsBool(obj as dynamic) as boolean
|
||||||
|
return obj <> invalid and GetInterface(obj, "ifBoolean") <> invalid
|
||||||
|
end function
|
||||||
|
|
||||||
|
' Returns the given object if it is of type Bool, otherwise returns the default value `false`
|
||||||
|
function ValidBool(obj as dynamic) as boolean
|
||||||
|
if obj <> invalid and GetInterface(obj, "ifBoolean") <> invalid
|
||||||
|
return obj
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
```
|
||||||
@@ -1,30 +1,37 @@
|
|||||||
# Screenshots
|
# Screenshots
|
||||||
|
|
||||||
## Home
|
## Playlet
|
||||||
|
|
||||||

|
| Home | Search |
|
||||||
|
| ------------------- | ----------------------- |
|
||||||
|
|  |  |
|
||||||
|
|
||||||
## Search
|
| Bookmarks | Queue + Picture-in-picture |
|
||||||
|
| ----------------------------- | ----------------------------------------------------- |
|
||||||
|
|  |  |
|
||||||
|
|
||||||

|
| Channel | Playlist |
|
||||||
|
| ------------------------- | --------------------------- |
|
||||||
|
|  |  |
|
||||||
|
|
||||||
## Settings
|
| Settings | Invidious instances | Invidious testing |
|
||||||
|
| --------------------------- | ------------------------------------------------ | --------------------------------------------- |
|
||||||
|
|  |  |  |
|
||||||
|
|
||||||

|
| Link to web app | App info |
|
||||||
|
| ----------------------------------- | --------------------------- |
|
||||||
|
|  |  |
|
||||||
|
|
||||||
## Playlist
|
## Playlet web app
|
||||||
|
|
||||||

|
| Home | Search | Settings |
|
||||||
|
|
||||||
## Link to web app
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## App info
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Web app
|
|
||||||
|
|
||||||
|  |  |  |
|
|
||||||
| ---------------------------------- | -------------------------------------- | ------------------------------------------ |
|
| ---------------------------------- | -------------------------------------- | ------------------------------------------ |
|
||||||
|
|  |  |  |
|
||||||
|
|
||||||
|
| Bookmarks | Remote | Cast video |
|
||||||
|
| ------------------------------------ | ------------------------------ | -------------------------------- |
|
||||||
|
|  |  |  |
|
||||||
|
|
||||||
|
| App info | | |
|
||||||
|
| ------------------------------ | --- | --- |
|
||||||
|
|  | | |
|
||||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 639 KiB |
|
After Width: | Height: | Size: 982 KiB |
|
Before Width: | Height: | Size: 358 KiB After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 362 KiB After Width: | Height: | Size: 751 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 256 KiB |
@@ -1,39 +1,41 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.15.0",
|
"version": "0.19.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.15.0",
|
"version": "0.19.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.11",
|
"@rokucommunity/bslint": "^0.8.14",
|
||||||
"@types/crypto-js": "^4.1.3",
|
"@types/crypto-js": "^4.2.1",
|
||||||
"@types/fs-extra": "^11.0.3",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/node": "^20.8.10",
|
"@types/node": "^20.11.0",
|
||||||
"@types/xml2js": "^0.4.13",
|
"@types/xml2js": "^0.4.14",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "^0.65.8",
|
"brighterscript": "0.65.16",
|
||||||
"brighterscript-formatter": "^1.6.34",
|
"brighterscript-formatter": "^1.6.37",
|
||||||
"convert-svg-to-png": "^0.6.4",
|
"convert-svg-to-png": "^0.6.4",
|
||||||
"cross-fetch": "^4.0.0",
|
"cross-fetch": "^4.0.0",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.2.0",
|
||||||
"glob": "^10.3.10",
|
"glob": "^10.3.10",
|
||||||
|
"imap": "^0.8.19",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"roku-deploy": "^3.10.3",
|
"mailparser": "^3.6.6",
|
||||||
"rooibos-roku": "^5.8.0",
|
"roku-deploy": "^3.11.2",
|
||||||
|
"rooibos-roku": "^5.10.0",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.3.3",
|
||||||
"xml2js": "^0.6.2",
|
"xml2js": "^0.6.2",
|
||||||
"yaml": "^2.3.3"
|
"yaml": "^2.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18"
|
"node": "18"
|
||||||
@@ -274,9 +276,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@rokucommunity/bslint": {
|
"node_modules/@rokucommunity/bslint": {
|
||||||
"version": "0.8.11",
|
"version": "0.8.14",
|
||||||
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.11.tgz",
|
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.14.tgz",
|
||||||
"integrity": "sha512-PKtYRngih4oybTN7IEZ4aQp2Bm6a1P4GyKo+F6eJkUmzbCN2glVXvWq+REHBinqEAYyL/3YiSsD4brFWCVPHcw==",
|
"integrity": "sha512-vKD2weW5I8jOXe+2xHN9FZ9GUCkbE/FOTbWcziLXrObraXJZcNRqk+fWDvi7go79ourQ/9DmYfmFH0bocjOMqg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
@@ -305,6 +307,19 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@selderee/plugin-htmlparser2": {
|
||||||
|
"version": "0.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz",
|
||||||
|
"integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"domhandler": "^5.0.3",
|
||||||
|
"selderee": "^0.11.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@tsconfig/node10": {
|
"node_modules/@tsconfig/node10": {
|
||||||
"version": "1.0.9",
|
"version": "1.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||||
@@ -330,15 +345,15 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/crypto-js": {
|
"node_modules/@types/crypto-js": {
|
||||||
"version": "4.1.3",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.1.tgz",
|
||||||
"integrity": "sha512-YP1sYYayLe7Eg5oXyLLvOLfxBfZ5Fgpz6sVWkpB18wDMywCLPWmqzRz+9gyuOoLF0fzDTTFwlyNbx7koONUwqA==",
|
"integrity": "sha512-FSPGd9+OcSok3RsM0UZ/9fcvMOXJ1ENE/ZbLfOPlBWj7BgXtEAM8VYfTtT760GiLbQIMoVozwVuisjvsVwqYWw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/fs-extra": {
|
"node_modules/@types/fs-extra": {
|
||||||
"version": "11.0.3",
|
"version": "11.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz",
|
||||||
"integrity": "sha512-sF59BlXtUdzEAL1u0MSvuzWd7PdZvZEtnaVkzX5mjpdWTJ8brG0jUqve3jPCzSzvAKKMHTG8F8o/WMQLtleZdQ==",
|
"integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/jsonfile": "*",
|
"@types/jsonfile": "*",
|
||||||
@@ -355,18 +370,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.8.10",
|
"version": "20.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.0.tgz",
|
||||||
"integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==",
|
"integrity": "sha512-o9bjXmDNcF7GbM4CNQpmi+TutCgap/K3w1JyKgxAjqx41zp9qlIAVFi0IhCNsJcXolEqLWhbFbEeL0PvYm4pcQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/xml2js": {
|
"node_modules/@types/xml2js": {
|
||||||
"version": "0.4.13",
|
"version": "0.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.13.tgz",
|
"resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.14.tgz",
|
||||||
"integrity": "sha512-nuT42GzgoUa4zZgBoF4d+Zqc12/FlVxXCT4xU6j3RfqTFVQWrUAClI/0sNJ5ImM9Wv6KB42KMG2xsVMn4cSBzA==",
|
"integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
@@ -713,9 +728,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brighterscript": {
|
"node_modules/brighterscript": {
|
||||||
"version": "0.65.8",
|
"version": "0.65.16",
|
||||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.8.tgz",
|
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.16.tgz",
|
||||||
"integrity": "sha512-mqarSnGCl/VSTRj1oY9wRMZJV9s8dH+rZZ2P1yE7d1nZQucVpAIGICW83G9AJHQYUDjrGsKHn5UfAfaZaE1KCA==",
|
"integrity": "sha512-2RJMF8itkrPXtZ92JkJf3emvzcCl5ETXGVyPsdO/hMKbUGinEGMRFG07FR0bzjRotbALzsozGE/Hjzw412Sjww==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rokucommunity/bslib": "^0.1.1",
|
"@rokucommunity/bslib": "^0.1.1",
|
||||||
@@ -741,7 +756,7 @@
|
|||||||
"parse-ms": "^2.1.0",
|
"parse-ms": "^2.1.0",
|
||||||
"readline": "^1.3.0",
|
"readline": "^1.3.0",
|
||||||
"require-relative": "^0.8.7",
|
"require-relative": "^0.8.7",
|
||||||
"roku-deploy": "^3.10.3",
|
"roku-deploy": "^3.11.2",
|
||||||
"serialize-error": "^7.0.1",
|
"serialize-error": "^7.0.1",
|
||||||
"source-map": "^0.7.4",
|
"source-map": "^0.7.4",
|
||||||
"vscode-languageserver": "7.0.0",
|
"vscode-languageserver": "7.0.0",
|
||||||
@@ -756,12 +771,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brighterscript-formatter": {
|
"node_modules/brighterscript-formatter": {
|
||||||
"version": "1.6.34",
|
"version": "1.6.37",
|
||||||
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.34.tgz",
|
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.37.tgz",
|
||||||
"integrity": "sha512-qGjoiIVrbvgit4RkSF4iNZKFCaavzQG/7G9ZgJs87rBHeCOvqBy+e264cD/KwDnhg4kMdvty45zZ+Um8Oeo2UQ==",
|
"integrity": "sha512-jIlqRjPVIp2WwB9Pe0YwK4KU4G3WqhRsqRluuOFY1sTDVW0R/AKXMvCfTsu99L2W7CbpeWA4UjOPzl9JOqN5hw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brighterscript": "^0.65.8",
|
"brighterscript": "^0.65.16",
|
||||||
"glob-all": "^3.3.0",
|
"glob-all": "^3.3.0",
|
||||||
"jsonc-parser": "^3.0.0",
|
"jsonc-parser": "^3.0.0",
|
||||||
"source-map": "^0.7.3",
|
"source-map": "^0.7.3",
|
||||||
@@ -1574,9 +1589,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/dayjs": {
|
"node_modules/dayjs": {
|
||||||
"version": "1.11.8",
|
"version": "1.11.10",
|
||||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
|
||||||
"integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==",
|
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/debounce-promise": {
|
"node_modules/debounce-promise": {
|
||||||
@@ -1603,6 +1618,15 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/deepmerge": {
|
||||||
|
"version": "4.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||||
|
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/delayed-stream": {
|
"node_modules/delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
@@ -1761,6 +1785,15 @@
|
|||||||
"iconv-lite": "^0.6.2"
|
"iconv-lite": "^0.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/encoding-japanese": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/encoding-japanese/-/encoding-japanese-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-++P0RhebUC8MJAwJOsT93dT+5oc5oPImp1HubZpAuCZ5kTLnhuuBhKHj2jJeO/Gj93idPBWmIuQ9QWMe5rX3pQ==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/encoding/node_modules/iconv-lite": {
|
"node_modules/encoding/node_modules/iconv-lite": {
|
||||||
"version": "0.6.3",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
@@ -1942,9 +1975,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fast-glob": {
|
"node_modules/fast-glob": {
|
||||||
"version": "3.2.12",
|
"version": "3.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
|
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
|
||||||
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
|
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nodelib/fs.stat": "^2.0.2",
|
"@nodelib/fs.stat": "^2.0.2",
|
||||||
@@ -1964,9 +1997,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fastq": {
|
"node_modules/fastq": {
|
||||||
"version": "1.15.0",
|
"version": "1.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz",
|
||||||
"integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
|
"integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"reusify": "^1.0.4"
|
"reusify": "^1.0.4"
|
||||||
@@ -2109,9 +2142,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fs-extra": {
|
"node_modules/fs-extra": {
|
||||||
"version": "11.1.1",
|
"version": "11.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||||
"integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==",
|
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"graceful-fs": "^4.2.0",
|
"graceful-fs": "^4.2.0",
|
||||||
@@ -2382,6 +2415,31 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/he": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"he": "bin/he"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/html-to-text": {
|
||||||
|
"version": "9.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz",
|
||||||
|
"integrity": "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@selderee/plugin-htmlparser2": "^0.11.0",
|
||||||
|
"deepmerge": "^4.3.1",
|
||||||
|
"dom-serializer": "^2.0.0",
|
||||||
|
"htmlparser2": "^8.0.2",
|
||||||
|
"selderee": "^0.11.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/htmlparser2": {
|
"node_modules/htmlparser2": {
|
||||||
"version": "8.0.2",
|
"version": "8.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz",
|
||||||
@@ -2499,6 +2557,43 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/imap": {
|
||||||
|
"version": "0.8.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/imap/-/imap-0.8.19.tgz",
|
||||||
|
"integrity": "sha512-z5DxEA1uRnZG73UcPA4ES5NSCGnPuuouUx43OPX7KZx1yzq3N8/vx2mtXEShT5inxB3pRgnfG1hijfu7XN2YMw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"readable-stream": "1.1.x",
|
||||||
|
"utf7": ">=1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/imap/node_modules/isarray": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||||
|
"integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/imap/node_modules/readable-stream": {
|
||||||
|
"version": "1.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||||
|
"integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"core-util-is": "~1.0.0",
|
||||||
|
"inherits": "~2.0.1",
|
||||||
|
"isarray": "0.0.1",
|
||||||
|
"string_decoder": "~0.10.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/imap/node_modules/string_decoder": {
|
||||||
|
"version": "0.10.31",
|
||||||
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||||
|
"integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/immediate": {
|
"node_modules/immediate": {
|
||||||
"version": "3.0.6",
|
"version": "3.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||||
@@ -2752,6 +2847,51 @@
|
|||||||
"lcov-parse": "bin/cli.js"
|
"lcov-parse": "bin/cli.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/leac": {
|
||||||
|
"version": "0.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/leac/-/leac-0.6.0.tgz",
|
||||||
|
"integrity": "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/libbase64": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/libbase64/-/libbase64-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-l+nePcPbIG1fNlqMzrh68MLkX/gTxk/+vdvAb388Ssi7UuUN31MI44w4Yf33mM3Cm4xDfw48mdf3rkdHszLNew==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/libmime": {
|
||||||
|
"version": "5.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/libmime/-/libmime-5.2.1.tgz",
|
||||||
|
"integrity": "sha512-A0z9O4+5q+ZTj7QwNe/Juy1KARNb4WaviO4mYeFC4b8dBT2EEqK2pkM+GC8MVnkOjqhl5nYQxRgnPYRRTNmuSQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"encoding-japanese": "2.0.0",
|
||||||
|
"iconv-lite": "0.6.3",
|
||||||
|
"libbase64": "1.2.1",
|
||||||
|
"libqp": "2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/libmime/node_modules/iconv-lite": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/libqp": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/libqp/-/libqp-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-Ka0eC5LkF3IPNQHJmYBWljJsw0UvM6j+QdKRbWyCdTmYwvIDE6a7bCm0UkTAL/K+3KXK5qXT/ClcInU01OpdLg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/lie": {
|
"node_modules/lie": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
||||||
@@ -2761,6 +2901,15 @@
|
|||||||
"immediate": "~3.0.5"
|
"immediate": "~3.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/linkify-it": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"uc.micro": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/locate-path": {
|
"node_modules/locate-path": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||||
@@ -2773,6 +2922,12 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/lodash": {
|
||||||
|
"version": "4.17.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||||
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/lodash.omit": {
|
"node_modules/lodash.omit": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
|
||||||
@@ -2824,6 +2979,70 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/mailparser": {
|
||||||
|
"version": "3.6.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/mailparser/-/mailparser-3.6.6.tgz",
|
||||||
|
"integrity": "sha512-noCjBl3FToxmqTP2fp7z17hQsiCroWNntfTd8O+UejOAF59xeN5WGZK27ilexXV2e2X/cbUhG3L8sfEKaz0/sw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"encoding-japanese": "2.0.0",
|
||||||
|
"he": "1.2.0",
|
||||||
|
"html-to-text": "9.0.5",
|
||||||
|
"iconv-lite": "0.6.3",
|
||||||
|
"libmime": "5.2.1",
|
||||||
|
"linkify-it": "5.0.0",
|
||||||
|
"mailsplit": "5.4.0",
|
||||||
|
"nodemailer": "6.9.8",
|
||||||
|
"tlds": "1.248.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mailparser/node_modules/iconv-lite": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mailsplit": {
|
||||||
|
"version": "5.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mailsplit/-/mailsplit-5.4.0.tgz",
|
||||||
|
"integrity": "sha512-wnYxX5D5qymGIPYLwnp6h8n1+6P6vz/MJn5AzGjZ8pwICWssL+CCQjWBIToOVHASmATot4ktvlLo6CyLfOXWYA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"libbase64": "1.2.1",
|
||||||
|
"libmime": "5.2.0",
|
||||||
|
"libqp": "2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mailsplit/node_modules/iconv-lite": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mailsplit/node_modules/libmime": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/libmime/-/libmime-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-X2U5Wx0YmK0rXFbk67ASMeqYIkZ6E5vY7pNWRKtnNzqjvdYYG8xtPDpCnuUEnPU9vlgNev+JoSrcaKSUaNvfsw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"encoding-japanese": "2.0.0",
|
||||||
|
"iconv-lite": "0.6.3",
|
||||||
|
"libbase64": "1.2.1",
|
||||||
|
"libqp": "2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/make-error": {
|
"node_modules/make-error": {
|
||||||
"version": "1.3.6",
|
"version": "1.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||||
@@ -2980,6 +3199,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/nodemailer": {
|
||||||
|
"version": "6.9.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.8.tgz",
|
||||||
|
"integrity": "sha512-cfrYUk16e67Ks051i4CntM9kshRYei1/o/Gi8K1d+R34OIs21xdFnW7Pt7EucmVKA0LKtqUGNcjMZ7ehjl49mQ==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/normalize-path": {
|
"node_modules/normalize-path": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||||
@@ -3159,6 +3387,19 @@
|
|||||||
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/parseley": {
|
||||||
|
"version": "0.12.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz",
|
||||||
|
"integrity": "sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"leac": "^0.6.0",
|
||||||
|
"peberminta": "^0.9.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/parseurl": {
|
"node_modules/parseurl": {
|
||||||
"version": "1.3.3",
|
"version": "1.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
@@ -3241,6 +3482,15 @@
|
|||||||
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
|
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/peberminta": {
|
||||||
|
"version": "0.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.9.0.tgz",
|
||||||
|
"integrity": "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/pend": {
|
"node_modules/pend": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||||
@@ -3376,9 +3626,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/punycode": {
|
"node_modules/punycode": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||||
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
|
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
@@ -3673,9 +3923,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/roku-deploy": {
|
"node_modules/roku-deploy": {
|
||||||
"version": "3.10.3",
|
"version": "3.11.2",
|
||||||
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.3.tgz",
|
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.11.2.tgz",
|
||||||
"integrity": "sha512-COJSQ638QklcM+8AN1nujFuzT04rTZLFuLSww35edm8w/y0l60oF/Iu7TQ46m75DwoGFzGFfomLEmA1ltQk9mA==",
|
"integrity": "sha512-3JDlnbTxv6Xk5GVolQoA3+d34MLZXXwZWMySprHwazZoWLP3LvulYHP92YvFOJAo/aI4IZp/TFA8kR82IrmHKA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
@@ -3686,6 +3936,7 @@
|
|||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
"jsonc-parser": "^2.3.0",
|
"jsonc-parser": "^2.3.0",
|
||||||
"jszip": "^3.6.0",
|
"jszip": "^3.6.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"micromatch": "^4.0.4",
|
"micromatch": "^4.0.4",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"parse-ms": "^2.1.0",
|
"parse-ms": "^2.1.0",
|
||||||
@@ -3743,9 +3994,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rooibos-roku": {
|
"node_modules/rooibos-roku": {
|
||||||
"version": "5.8.0",
|
"version": "5.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.10.0.tgz",
|
||||||
"integrity": "sha512-mPAszwOH1VdxMgSaoXQ/CgpAZ3RQ0A+d3BoxyY8axMsYS5kPO/8dL8fa7iFTGEZYA7803Ur52zlyN8GXqV5nLg==",
|
"integrity": "sha512-Idiv3nWQOEr5V8z8oHcIovjcoBffgqRtTQ5B6K+x/cGAouKxyVJp0fsZ80xQvUul9IwHQ0XIPUYbNWCR3RQ3sA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"source-map": "^0.7.3",
|
"source-map": "^0.7.3",
|
||||||
@@ -3846,6 +4097,18 @@
|
|||||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/selderee": {
|
||||||
|
"version": "0.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz",
|
||||||
|
"integrity": "sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"parseley": "^0.12.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.5.4",
|
"version": "7.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||||
@@ -4021,9 +4284,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/sshpk": {
|
"node_modules/sshpk": {
|
||||||
"version": "1.17.0",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz",
|
||||||
"integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
|
"integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"asn1": "~0.2.3",
|
"asn1": "~0.2.3",
|
||||||
@@ -4213,6 +4476,15 @@
|
|||||||
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
|
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/tlds": {
|
||||||
|
"version": "1.248.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tlds/-/tlds-1.248.0.tgz",
|
||||||
|
"integrity": "sha512-noj0KdpWTBhwsKxMOXk0rN9otg4kTgLm4WohERRHbJ9IY+kSDKr3RmjitaQ3JFzny+DyvBOQKlFZhp0G0qNSfg==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"tlds": "bin.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tmp": {
|
"node_modules/tmp": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
|
||||||
@@ -4253,9 +4525,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/ts-node": {
|
"node_modules/ts-node": {
|
||||||
"version": "10.9.1",
|
"version": "10.9.2",
|
||||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
|
||||||
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
|
"integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cspotcode/source-map-support": "^0.8.0",
|
"@cspotcode/source-map-support": "^0.8.0",
|
||||||
@@ -4327,9 +4599,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.2.2",
|
"version": "5.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
|
||||||
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
|
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
@@ -4339,6 +4611,12 @@
|
|||||||
"node": ">=14.17"
|
"node": ">=14.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/uc.micro": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-DffL94LsNOccVn4hyfRe5rdKa273swqeA5DJpMOeFmEn1wCDc7nAbbB0gXlgBCL7TNzeTv6G7XVWzan7iJtfig==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/unbzip2-stream": {
|
"node_modules/unbzip2-stream": {
|
||||||
"version": "1.4.3",
|
"version": "1.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
||||||
@@ -4398,6 +4676,24 @@
|
|||||||
"requires-port": "^1.0.0"
|
"requires-port": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/utf7": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/utf7/-/utf7-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-qQrPtYLLLl12NF4DrM9CvfkxkYI97xOb5dsnGZHE3teFr0tWiEZ9UdgMPczv24vl708cYMpe6mGXGHrotIp3Bw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"semver": "~5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/utf7/node_modules/semver": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/util-deprecate": {
|
"node_modules/util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
@@ -4703,9 +4999,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/yaml": {
|
"node_modules/yaml": {
|
||||||
"version": "2.3.3",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
|
||||||
"integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==",
|
"integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14"
|
"node": ">= 14"
|
||||||
|
|||||||
@@ -1,33 +1,35 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.15.0",
|
"version": "0.19.1",
|
||||||
"description": "Unofficial Youtube client for Roku",
|
"description": "Unofficial Youtube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.11",
|
"@rokucommunity/bslint": "^0.8.14",
|
||||||
"@types/crypto-js": "^4.1.3",
|
"@types/crypto-js": "^4.2.1",
|
||||||
"@types/fs-extra": "^11.0.3",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/node": "^20.8.10",
|
"@types/node": "^20.11.0",
|
||||||
"@types/xml2js": "^0.4.13",
|
"@types/xml2js": "^0.4.14",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "^0.65.8",
|
"brighterscript": "0.65.16",
|
||||||
"brighterscript-formatter": "^1.6.34",
|
"brighterscript-formatter": "^1.6.37",
|
||||||
"convert-svg-to-png": "^0.6.4",
|
"convert-svg-to-png": "^0.6.4",
|
||||||
"cross-fetch": "^4.0.0",
|
"cross-fetch": "^4.0.0",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.2.0",
|
||||||
"glob": "^10.3.10",
|
"glob": "^10.3.10",
|
||||||
|
"imap": "^0.8.19",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"roku-deploy": "^3.10.3",
|
"mailparser": "^3.6.6",
|
||||||
"rooibos-roku": "^5.8.0",
|
"roku-deploy": "^3.11.2",
|
||||||
|
"rooibos-roku": "^5.10.0",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.3.3",
|
||||||
"xml2js": "^0.6.2",
|
"xml2js": "^0.6.2",
|
||||||
"yaml": "^2.3.3"
|
"yaml": "^2.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18"
|
"node": "18"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../config/bsconfig.base.json",
|
"extends": "../config/bsconfig.base.jsonc",
|
||||||
"rootDir": "src/",
|
"rootDir": "src/",
|
||||||
"stagingDir": "../build/playlet-app",
|
"stagingDir": "../build/playlet-app",
|
||||||
"outFile": "../dist/playlet-app.zip"
|
"outFile": "../dist/playlet-app.zip"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../config/bsconfig.tests.base.json",
|
"extends": "../config/bsconfig.tests.base.jsonc",
|
||||||
"rootDir": "src/",
|
"rootDir": "src/",
|
||||||
"stagingDir": "../build/playlet-app-tests",
|
"stagingDir": "../build/playlet-app-tests",
|
||||||
"outFile": "../build/playlet-app-tests.zip"
|
"outFile": "../build/playlet-app-tests.zip"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.15.0",
|
"version": "0.19.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.15.0"
|
"version": "0.19.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.15.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",
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
|
import "LoadingMessages.bs"
|
||||||
|
import "pkg:/source/Logger.bs"
|
||||||
|
|
||||||
function Init() as void
|
function Init() as void
|
||||||
m.top.backgroundColor = "0x242424FF"
|
m.scene = m.top.getScene()
|
||||||
|
m.top.backgroundColor = "#242424FF"
|
||||||
m.top.backgroundURI = ""
|
m.top.backgroundURI = ""
|
||||||
|
|
||||||
m.loadingIndicator = m.top.findNode("LoadingIndicator")
|
m.loadingIndicator = m.top.findNode("LoadingIndicator")
|
||||||
m.loadingIndicator.visible = true
|
|
||||||
m.global.addFields({
|
m.global.addFields({
|
||||||
loadingIndicator: m.loadingIndicator
|
loadingIndicator: m.loadingIndicator
|
||||||
})
|
})
|
||||||
|
|
||||||
|
m.loadingIndicator.visible = true
|
||||||
|
m.loadingIndicator.message = GetLoadingMessage()
|
||||||
|
|
||||||
m.playletLibUrls = GetPlayletLibUrls()
|
m.playletLibUrls = GetPlayletLibUrls()
|
||||||
m.playletLibUrlIndex = 0
|
m.playletLibUrlIndex = 0
|
||||||
|
|
||||||
@@ -16,17 +22,17 @@ end function
|
|||||||
|
|
||||||
function GetPlayletLibUrls() as object
|
function GetPlayletLibUrls() as object
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
debug = { type: "debug", link: ReadManifestValue("playlet_lib_debug_url") }
|
debug = { type: "debug", link: Manifest.ReadValue("playlet_lib_debug_url") }
|
||||||
return [debug]
|
return [debug]
|
||||||
#else
|
#else
|
||||||
savedUrls = GetPlayletLibUrlsFromRegistry()
|
savedUrls = Registry.GetPlayletLibUrlsFromRegistry()
|
||||||
if savedUrls <> invalid
|
if savedUrls <> invalid
|
||||||
m.shouldClearRegistryOnLoadFail = true
|
m.shouldClearRegistryOnLoadFail = true
|
||||||
return savedUrls
|
return savedUrls
|
||||||
end if
|
end if
|
||||||
|
|
||||||
github = { type: "github", link: ReadManifestValue("playlet_lib_remote_url") }
|
github = { type: "github", link: Manifest.ReadValue("playlet_lib_remote_url") }
|
||||||
embedded = { type: "embedded", link: ReadManifestValue("playlet_lib_embedded_url") }
|
embedded = { type: "embedded", link: Manifest.ReadValue("playlet_lib_embedded_url") }
|
||||||
return [github, embedded]
|
return [github, embedded]
|
||||||
#end if
|
#end if
|
||||||
end function
|
end function
|
||||||
@@ -35,39 +41,31 @@ function LoadPlayletLib() as void
|
|||||||
if m.playletLibUrlIndex >= m.playletLibUrls.Count()
|
if m.playletLibUrlIndex >= m.playletLibUrls.Count()
|
||||||
m.loadingIndicator.visible = false
|
m.loadingIndicator.visible = false
|
||||||
if m.shouldClearRegistryOnLoadFail = true
|
if m.shouldClearRegistryOnLoadFail = true
|
||||||
DeleteRegistryKey("playlet_lib_urls", "Playlet")
|
Registry.DeleteKey("playlet_lib_urls", "Playlet")
|
||||||
end if
|
end if
|
||||||
ShowPlayletLibLoadErrorDialog()
|
ShowPlayletLibLoadErrorDialog()
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
RemoveComponentLibrary()
|
RemoveComponentLibrary()
|
||||||
m.lib = m.top.getScene().createChild("ComponentLibrary")
|
|
||||||
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
|
||||||
m.lib.observeField("loadStatus", "OnLoadStatusChanged")
|
|
||||||
|
|
||||||
uri = m.playletLibUrls[m.playletLibUrlIndex].link
|
uri = m.playletLibUrls[m.playletLibUrlIndex].link
|
||||||
' bs:disable-next-line LINT3012
|
LoadComponentLibrary(uri)
|
||||||
?"Loading Playlet lib from " uri
|
|
||||||
m.lib.uri = uri
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnLoadStatusChanged() as void
|
function OnLoadStatusChanged() as void
|
||||||
libUrl = m.playletLibUrls[m.playletLibUrlIndex]
|
libUrl = m.playletLibUrls[m.playletLibUrlIndex]
|
||||||
if m.lib.loadStatus = "ready"
|
if m.lib.loadStatus = "ready"
|
||||||
RemoveComponentLibrary()
|
RemoveComponentLibrary()
|
||||||
' bs:disable-next-line LINT3012
|
Logger.Log(`Playlet lib loaded from ${libUrl.link} in ${m.timer.TotalMilliseconds()} ms`)
|
||||||
?"Playlet lib loaded from " libUrl.link
|
m.timer = invalid
|
||||||
scene = m.top.getScene()
|
m.scene.playletLibLoadedUrl = libUrl
|
||||||
scene.playletLibLoadedUrl = libUrl
|
container = m.scene.findNode("MainSceneContainer")
|
||||||
container = scene.findNode("MainSceneContainer")
|
|
||||||
container.createChild("PlayletLib:MainScene")
|
container.createChild("PlayletLib:MainScene")
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if m.lib.loadStatus = "failed"
|
if m.lib.loadStatus = "failed"
|
||||||
' bs:disable-next-line LINT3012
|
Logger.Log(`Playlet lib failed to load from ${libUrl.link}`)
|
||||||
?"Playlet lib failed to load from " libUrl.link
|
|
||||||
' Try next url
|
' Try next url
|
||||||
m.playletLibUrlIndex += 1
|
m.playletLibUrlIndex += 1
|
||||||
LoadPlayletLib()
|
LoadPlayletLib()
|
||||||
@@ -79,11 +77,23 @@ function RemoveComponentLibrary() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
scene = m.top.getScene()
|
m.lib.unobserveField("loadStatus")
|
||||||
scene.removeChild(m.lib)
|
m.scene.removeChild(m.lib)
|
||||||
m.lib = invalid
|
m.lib = invalid
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function LoadComponentLibrary(uri as string)
|
||||||
|
m.timer = CreateObject("roTimespan")
|
||||||
|
m.timer.mark()
|
||||||
|
|
||||||
|
m.lib = m.scene.createChild("ComponentLibrary")
|
||||||
|
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
||||||
|
m.lib.observeField("loadStatus", "OnLoadStatusChanged")
|
||||||
|
|
||||||
|
Logger.Log(`Loading Playlet lib from ${uri}`)
|
||||||
|
m.lib.uri = uri
|
||||||
|
end function
|
||||||
|
|
||||||
function ShowPlayletLibLoadErrorDialog()
|
function ShowPlayletLibLoadErrorDialog()
|
||||||
message = [
|
message = [
|
||||||
"Could not load Playlet component library from any of the following urls:",
|
"Could not load Playlet component library from any of the following urls:",
|
||||||
@@ -99,5 +109,5 @@ function ShowPlayletLibLoadErrorDialog()
|
|||||||
"If the problem persist, contact Playlet authors."
|
"If the problem persist, contact Playlet authors."
|
||||||
]
|
]
|
||||||
|
|
||||||
ShowErrorDialog(message, bulletText, bottomText)
|
Dialog.ShowError(message, bulletText, bottomText)
|
||||||
end function
|
end function
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
function GetLoadingMessage() as string
|
||||||
|
messages = GetLoadingMessagesFromCache()
|
||||||
|
if messages = invalid or messages.count() = 0
|
||||||
|
messages = [
|
||||||
|
"Now loading Playlet...",
|
||||||
|
"One moment please...",
|
||||||
|
"Downloading the internet...",
|
||||||
|
"Unclogging the tubes...",
|
||||||
|
"Warming up the flux capacitor...",
|
||||||
|
"Loading, ehm, stuff...",
|
||||||
|
"Restoring quantum entanglement...",
|
||||||
|
"Searching for kitten videos...",
|
||||||
|
"One Mississippi... two Mississippi...",
|
||||||
|
"Checking the TV's extended warranty...",
|
||||||
|
"Deleting system32...",
|
||||||
|
"Updating: 3 hours 32 minutes remaining...",
|
||||||
|
"Asking ChatGPT for humorous loading messages...",
|
||||||
|
"Loading today's sponsor... NordVPN!",
|
||||||
|
"Don't worry, this is normal...",
|
||||||
|
"Don't forget to like and subscribe...",
|
||||||
|
"Shoveling coal into the server...",
|
||||||
|
"Counting down from infinity...",
|
||||||
|
]
|
||||||
|
end if
|
||||||
|
index = GetRandom(0, messages.count() - 1)
|
||||||
|
return messages[index]
|
||||||
|
end function
|
||||||
|
|
||||||
|
function GetLoadingMessagesFromCache() as object
|
||||||
|
messagesFile = ReadAsciiFile("cachefs:/loading_messages_v1.json")
|
||||||
|
if messagesFile = invalid or messagesFile = ""
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
return ParseJson(messagesFile)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function GetRandom(min as integer, max as integer) as integer
|
||||||
|
dateTime = CreateObject("roDateTime")
|
||||||
|
random = Rnd(max) + dateTime.GetMilliseconds()
|
||||||
|
return min + (random mod (max - min + 1))
|
||||||
|
end function
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
<component name="LoadingIndicator" extends="Group">
|
<component name="LoadingIndicator" extends="Group">
|
||||||
|
<interface>
|
||||||
|
<field id="message" type="string" alias="messageLabel.text" />
|
||||||
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
width="1280"
|
width="1280"
|
||||||
@@ -9,6 +12,16 @@
|
|||||||
id="busySpinner"
|
id="busySpinner"
|
||||||
inheritParentOpacity="false"
|
inheritParentOpacity="false"
|
||||||
spinInterval="1" />
|
spinInterval="1" />
|
||||||
|
<Label
|
||||||
|
id="messageLabel"
|
||||||
|
inheritParentOpacity="false"
|
||||||
|
width="1280"
|
||||||
|
height="200"
|
||||||
|
horizAlign="center"
|
||||||
|
translation="[0,460]"
|
||||||
|
wrap="true">
|
||||||
|
<Font role="font" uri="font:SystemFontFile" size="28" />
|
||||||
|
</Label>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
</children>
|
</children>
|
||||||
</component>
|
</component>
|
||||||
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -3,24 +3,24 @@
|
|||||||
outputs: [
|
outputs: [
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/channel-poster_fhd.png',
|
outputFilePath: 'images/channel-poster_fhd.png',
|
||||||
outputHash: 'd644a0db84deed0bcc41a41d08a4ef75',
|
outputHash: '50729b5bdd2a7c0fd4a1d502812117d4',
|
||||||
width: 540,
|
width: 540,
|
||||||
height: 405,
|
height: 405,
|
||||||
background: '#FFFFFF',
|
background: '#EEEEEE',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/channel-poster_hd.png',
|
outputFilePath: 'images/channel-poster_hd.png',
|
||||||
outputHash: 'd07a4ffaa021b55528bee91710f4e9d2',
|
outputHash: '8022dc6fa993ce3194c5aea37d6ea49a',
|
||||||
width: 290,
|
width: 290,
|
||||||
height: 218,
|
height: 218,
|
||||||
background: '#FFFFFF',
|
background: '#EEEEEE',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/channel-poster_sd.png',
|
outputFilePath: 'images/channel-poster_sd.png',
|
||||||
outputHash: '66a311c639f89ff009e4624468282b2f',
|
outputHash: '63b8f12ac155c29b4e85db17a2886817',
|
||||||
width: 246,
|
width: 246,
|
||||||
height: 140,
|
height: 140,
|
||||||
background: '#FFFFFF',
|
background: '#EEEEEE',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@ 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=15
|
minor_version=19
|
||||||
build_version=00000
|
build_version=00001
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +1,45 @@
|
|||||||
function ShowErrorDialog(message as object, bulletText as object, bottomMessage as object)
|
namespace Dialog
|
||||||
' TODO:P2 a null check on StandardMessageDialog, only available on 10.0 and later
|
|
||||||
dialog = CreateObject("roSGNode", "StandardMessageDialog")
|
|
||||||
dialog.message = message
|
|
||||||
dialog.bulletText = bulletText
|
|
||||||
dialog.bottomMessage = bottomMessage
|
|
||||||
dialog.title = "Error loading Playlet"
|
|
||||||
dialog.buttons = ["Exit"]
|
|
||||||
|
|
||||||
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
function ShowError(message as object, bulletText as object, bottomMessage as object)
|
||||||
dialog.observeField("buttonSelected", "OnButtonSelected")
|
' Note: dialog can be null since StandardMessageDialog is only available on 10.0 and later
|
||||||
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
msgDialog = CreateObject("roSGNode", "StandardMessageDialog")
|
||||||
dialog.observeField("wasClosed", "OnDialogClosed")
|
SetPalette(msgDialog)
|
||||||
|
msgDialog.message = message
|
||||||
|
msgDialog.bulletText = bulletText
|
||||||
|
msgDialog.bottomMessage = bottomMessage
|
||||||
|
msgDialog.title = "Error loading Playlet"
|
||||||
|
msgDialog.buttons = ["Exit"]
|
||||||
|
|
||||||
m.top.getScene().dialog = dialog
|
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
||||||
end function
|
msgDialog.observeField("buttonSelected", "OnButtonSelected")
|
||||||
|
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
||||||
|
msgDialog.observeField("wasClosed", "OnDialogClosed")
|
||||||
|
|
||||||
function OnButtonSelected()
|
m.top.getScene().dialog = msgDialog
|
||||||
m.top.getScene().dialog.close = true
|
end function
|
||||||
end function
|
|
||||||
|
function SetPalette(msgDialog as object)
|
||||||
|
palette = createObject("roSGNode", "RSGPalette")
|
||||||
|
palette.colors = {
|
||||||
|
DialogBackgroundColor: "#242424FF"
|
||||||
|
DialogFocusColor: "#CECECEFF"
|
||||||
|
DialogFocusItemColor: "#202020FF"
|
||||||
|
DialogSecondaryTextColor: "#DBDBDBFF"
|
||||||
|
DialogSecondaryItemColor: "#FF1C30FF"
|
||||||
|
DialogTextColor: "#DBDBDBFF"
|
||||||
|
}
|
||||||
|
msgDialog.palette = palette
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnButtonSelected()
|
||||||
|
m.top.getScene().dialog.close = true
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnDialogClosed()
|
||||||
|
' TODO:P1 throw an exception to cause a crash report to be generated
|
||||||
|
' Should include which playlet lib failed to load
|
||||||
|
m.top.getScene().exitChannel = true
|
||||||
|
end function
|
||||||
|
|
||||||
|
end namespace
|
||||||
|
|
||||||
function OnDialogClosed()
|
|
||||||
' TODO:P1 throw an exception to cause a crash report to be generated
|
|
||||||
' Should include which playlet lib failed to load
|
|
||||||
m.top.getScene().exitChannel = true
|
|
||||||
end function
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
namespace Logger
|
||||||
|
|
||||||
|
' Put the file at the root directry to avoid needing to create a folder
|
||||||
|
const LOGS_FILE_PATH = "cachefs:/playlet_startup_logs.txt"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
DeleteFile(LOGS_FILE_PATH)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Log(msg as string)
|
||||||
|
msg = "[APP] " + msg
|
||||||
|
' bs:disable-next-line LINT3012
|
||||||
|
print(msg)
|
||||||
|
|
||||||
|
buffer = CreateObject("roByteArray")
|
||||||
|
buffer.FromAsciiString(msg + `\n`)
|
||||||
|
buffer.AppendFile(LOGS_FILE_PATH)
|
||||||
|
end function
|
||||||
|
|
||||||
|
end namespace
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
' Playlet (App to play videos from an Invidious server on Roku TVs)
|
' Playlet (App to play videos from an Invidious server on Roku TVs)
|
||||||
' Copyright (C) 2022 Brahim Hadriche
|
' Copyright (C) 2024 Brahim Hadriche
|
||||||
|
|
||||||
' This program is free software: you can redistribute it and/or modify
|
' This program is free software: you can redistribute it and/or modify
|
||||||
' it under the terms of the GNU Affero General Public License as published by
|
' it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -19,8 +19,9 @@ function Main(args as object) as void
|
|||||||
port = CreateObject("roMessagePort")
|
port = CreateObject("roMessagePort")
|
||||||
screen.setMessagePort(port)
|
screen.setMessagePort(port)
|
||||||
m.global = screen.getGlobalNode()
|
m.global = screen.getGlobalNode()
|
||||||
|
Logger.Init()
|
||||||
|
|
||||||
ClearPlayletLibUrlsIfNeeded(args)
|
Registry.ClearPlayletLibUrlsIfNeeded(args)
|
||||||
|
|
||||||
scene = screen.CreateScene("BootstrapScene")
|
scene = screen.CreateScene("BootstrapScene")
|
||||||
screen.show()
|
screen.show()
|
||||||
@@ -28,16 +29,16 @@ function Main(args as object) as void
|
|||||||
scene.ObserveField("exitChannel", port)
|
scene.ObserveField("exitChannel", port)
|
||||||
scene.launchArgs = args
|
scene.launchArgs = args
|
||||||
|
|
||||||
' These vars are needed to pass certification.
|
|
||||||
' The actual work is done in Playlet Lib
|
|
||||||
' bs:disable-next-line LINT1005
|
|
||||||
contentId = args.contentId
|
|
||||||
' bs:disable-next-line LINT1005
|
|
||||||
mediaType = args.mediaType
|
|
||||||
|
|
||||||
' Do not signal app launch complete here, we're doing it over at Playlet Lib
|
|
||||||
' This is needed to pass cetification
|
|
||||||
if false
|
if false
|
||||||
|
' These vars are needed to pass certification.
|
||||||
|
' The actual work is done in Playlet Lib
|
||||||
|
' bs:disable-next-line LINT1005
|
||||||
|
contentId = args.contentId
|
||||||
|
' bs:disable-next-line LINT1005
|
||||||
|
mediaType = args.mediaType
|
||||||
|
|
||||||
|
' Do not signal app launch complete here, we're doing it over at Playlet Lib
|
||||||
|
' This is needed to pass cetification
|
||||||
scene.signalBeacon("AppLaunchComplete")
|
scene.signalBeacon("AppLaunchComplete")
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@ function Main(args as object) as void
|
|||||||
field = msg.getField()
|
field = msg.getField()
|
||||||
data = msg.getData()
|
data = msg.getData()
|
||||||
if field = "exitChannel" and data = true
|
if field = "exitChannel" and data = true
|
||||||
END
|
return
|
||||||
end if
|
end if
|
||||||
else if msgType = "roInputEvent"
|
else if msgType = "roInputEvent"
|
||||||
scene.inputArgs = msg.getInfo()
|
scene.inputArgs = msg.getInfo()
|
||||||
@@ -85,10 +86,3 @@ function Main(args as object) as void
|
|||||||
end while
|
end while
|
||||||
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ClearPlayletLibUrlsIfNeeded(launchArgs as object) as void
|
|
||||||
if launchArgs = invalid or launchArgs.clearPlayletLibUrls = invalid
|
|
||||||
return
|
|
||||||
end if
|
|
||||||
DeleteRegistryKey("playlet_lib_urls", "Playlet")
|
|
||||||
end function
|
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
function ReadManifestValue(key as string) as string
|
namespace Manifest
|
||||||
appInfo = CreateObject("roAppInfo")
|
|
||||||
return appInfo.GetValue(key)
|
function ReadValue(key as string) as string
|
||||||
end function
|
appInfo = CreateObject("roAppInfo")
|
||||||
|
return appInfo.GetValue(key)
|
||||||
|
end function
|
||||||
|
|
||||||
|
end namespace
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ namespace Tests
|
|||||||
@params("playlet_lib_remote_url", "https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip")
|
@params("playlet_lib_remote_url", "https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip")
|
||||||
@params("playlet_lib_embedded_url", "pkg:/lib/playlet-lib.zip")
|
@params("playlet_lib_embedded_url", "pkg:/lib/playlet-lib.zip")
|
||||||
function _(key as string, expectedValue as string)
|
function _(key as string, expectedValue as string)
|
||||||
m.assertEqual(ReadManifestValue(key), expectedValue)
|
m.assertEqual(Manifest.ReadValue(key), expectedValue)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
end class
|
end class
|
||||||
|
|||||||
@@ -1,22 +1,34 @@
|
|||||||
function ReadRegistryKey(key as string, section as string) as dynamic
|
namespace Registry
|
||||||
sec = CreateObject("roRegistrySection", section)
|
|
||||||
if not sec.Exists(key)
|
|
||||||
return invalid
|
|
||||||
end if
|
|
||||||
return sec.Read(key)
|
|
||||||
end function
|
|
||||||
|
|
||||||
function DeleteRegistryKey(key as string, section as string)
|
function ReadKey(key as string, section as string) as dynamic
|
||||||
sec = CreateObject("roRegistrySection", section)
|
sec = CreateObject("roRegistrySection", section)
|
||||||
sec.Delete(key)
|
if not sec.Exists(key)
|
||||||
sec.Flush()
|
return invalid
|
||||||
end function
|
end if
|
||||||
|
return sec.Read(key)
|
||||||
|
end function
|
||||||
|
|
||||||
function GetPlayletLibUrlsFromRegistry() as object
|
function DeleteKey(key as string, section as string)
|
||||||
urlsJson = ReadRegistryKey("playlet_lib_urls", "Playlet")
|
sec = CreateObject("roRegistrySection", section)
|
||||||
if urlsJson = invalid
|
sec.Delete(key)
|
||||||
return invalid
|
sec.Flush()
|
||||||
end if
|
end function
|
||||||
urls = ParseJson(urlsJson)
|
|
||||||
return urls
|
function GetPlayletLibUrlsFromRegistry() as object
|
||||||
end function
|
urlsJson = ReadKey("playlet_lib_urls", "Playlet")
|
||||||
|
if urlsJson = invalid
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
urls = ParseJson(urlsJson)
|
||||||
|
return urls
|
||||||
|
end function
|
||||||
|
|
||||||
|
function ClearPlayletLibUrlsIfNeeded(launchArgs as object) as void
|
||||||
|
if launchArgs = invalid or launchArgs.clearPlayletLibUrls = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
DeleteKey("playlet_lib_urls", "Playlet")
|
||||||
|
Logger.Log("Cleared key playlet_lib_urls from registry")
|
||||||
|
end function
|
||||||
|
|
||||||
|
end namespace
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../config/bsconfig.base.json",
|
"extends": "../config/bsconfig.base.jsonc",
|
||||||
"rootDir": "src/",
|
"rootDir": "src/",
|
||||||
"stagingDir": "../build/playlet-lib",
|
"stagingDir": "../build/playlet-lib",
|
||||||
"outFile": "../dist/playlet-lib.zip"
|
"outFile": "../dist/playlet-lib.zip"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../config/bsconfig.tests.base.json",
|
"extends": "../config/bsconfig.tests.base.jsonc",
|
||||||
"rootDir": "src/",
|
"rootDir": "src/",
|
||||||
"stagingDir": "../build/playlet-lib-tests",
|
"stagingDir": "../build/playlet-lib-tests",
|
||||||
"outFile": "../build/playlet-lib-tests.zip"
|
"outFile": "../build/playlet-lib-tests.zip"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.15.0",
|
"version": "0.19.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.15.0"
|
"version": "0.19.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.15.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",
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
|
import "pkg:/components/Navigation/LongPress.bs"
|
||||||
|
import "pkg:/components/PlayQueue/PlayQueueViewUtils.bs"
|
||||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
@@ -10,6 +12,7 @@ function Init()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
|
InitializeLongPress(["options"])
|
||||||
NodeSetFocus(m.top.root, true)
|
NodeSetFocus(m.top.root, true)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -18,7 +21,7 @@ function PushScreen(node as object)
|
|||||||
FocusTopScreen(invalid)
|
FocusTopScreen(invalid)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function PopScreen(unused as dynamic)
|
function PopScreen(_unused as dynamic)
|
||||||
childCount = m.stack.getChildCount()
|
childCount = m.stack.getChildCount()
|
||||||
if childCount > 1
|
if childCount > 1
|
||||||
m.stack.removeChildIndex(childCount - 1)
|
m.stack.removeChildIndex(childCount - 1)
|
||||||
@@ -26,7 +29,7 @@ function PopScreen(unused as dynamic)
|
|||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function FocusTopScreen(unused as dynamic)
|
function FocusTopScreen(_unused as dynamic)
|
||||||
childCount = m.stack.getChildCount()
|
childCount = m.stack.getChildCount()
|
||||||
topScreen = m.stack.getChild(childCount - 1)
|
topScreen = m.stack.getChild(childCount - 1)
|
||||||
NodeSetFocus(topScreen, true)
|
NodeSetFocus(topScreen, true)
|
||||||
@@ -57,7 +60,7 @@ function ShowRootScreen(screenName as string) as void
|
|||||||
' insert child at 0 to make sure it is behind the navbar
|
' insert child at 0 to make sure it is behind the navbar
|
||||||
m.root.insertChild(screen, 0)
|
m.root.insertChild(screen, 0)
|
||||||
if screen.hasField("binding_done")
|
if screen.hasField("binding_done")
|
||||||
screen@.BindNode(invalid)
|
screen@.BindNode()
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
screen = m.screens[screenName]
|
screen = m.screens[screenName]
|
||||||
@@ -78,15 +81,26 @@ function GetRootScreen(screenName as string) as object
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function onKeyEvent(key as string, press as boolean) as boolean
|
function onKeyEvent(key as string, press as boolean) as boolean
|
||||||
if not press
|
if LongPressHandler(key, press)
|
||||||
return false
|
return true
|
||||||
end if
|
end if
|
||||||
if key = "options"
|
|
||||||
|
if key = OPTIONS_LONG_PRESS_KEY and press
|
||||||
|
LogInfo("Opening PlayQueueView")
|
||||||
|
PlayQueueViewUtils.Open(m.top.playQueue, m.top)
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = "options" and not press
|
||||||
if VideoUtils.ToggleVideoPictureInPicture()
|
if VideoUtils.ToggleVideoPictureInPicture()
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if not press
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
if key = "play"
|
if key = "play"
|
||||||
if VideoUtils.TogglePause()
|
if VideoUtils.TogglePause()
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<interface>
|
<interface>
|
||||||
<field id="root" type="node" />
|
<field id="root" type="node" />
|
||||||
<field id="stack" type="node" />
|
<field id="stack" type="node" />
|
||||||
|
<field id="playQueue" type="node" />
|
||||||
<function name="PushScreen" />
|
<function name="PushScreen" />
|
||||||
<function name="PopScreen" />
|
<function name="PopScreen" />
|
||||||
<function name="FocusTopScreen" />
|
<function name="FocusTopScreen" />
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace ChannelUtils
|
|||||||
appController = m.appController
|
appController = m.appController
|
||||||
end if
|
end if
|
||||||
appController@.PushScreen(channelView)
|
appController@.PushScreen(channelView)
|
||||||
channelView@.BindNode(invalid)
|
channelView@.BindNode()
|
||||||
channelView.content = contentNode
|
channelView.content = contentNode
|
||||||
end function
|
end function
|
||||||
end namespace
|
end namespace
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import "pkg:/components/Navigation/Navigation.bs"
|
import "pkg:/components/Navigation/Navigation.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
import "pkg:/source/utils/DisposableObserve.bs"
|
import "pkg:/source/utils/DisposableObserve.bs"
|
||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
import "SubscribeTask.bs"
|
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.container = m.top.findNode("container")
|
m.container = m.top.findNode("container")
|
||||||
@@ -21,7 +21,7 @@ function Init()
|
|||||||
m.rowList.focusable = true
|
m.rowList.focusable = true
|
||||||
m.rowList.screen = m.top
|
m.rowList.screen = m.top
|
||||||
|
|
||||||
DisposableObserveField(m.banner, "loadStatus", FuncName(OnBannerLoadStatus))
|
DisposableObserveFieldScoped(m.banner, "loadStatus", FuncName(OnBannerLoadStatus))
|
||||||
m.author = ""
|
m.author = ""
|
||||||
m.authorId = ""
|
m.authorId = ""
|
||||||
|
|
||||||
@@ -29,13 +29,13 @@ function Init()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeready()
|
function OnNodeready()
|
||||||
m.rowList@.BindNode(invalid)
|
m.rowList@.BindNode()
|
||||||
|
|
||||||
SetNavigation(m.rowList, "up", m.subscribeButton)
|
SetNavigation(m.rowList, "up", m.subscribeButton)
|
||||||
SetNavigation(m.subscribeButton, "down", m.rowList)
|
SetNavigation(m.subscribeButton, "down", m.rowList)
|
||||||
|
|
||||||
m.subscribeButton.text = "Subscribe"
|
m.subscribeButton.text = "Subscribe"
|
||||||
DisposableObserveField(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
|
DisposableObserveFieldScoped(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
|
||||||
|
|
||||||
SetSubscribeButtonVisibility()
|
SetSubscribeButtonVisibility()
|
||||||
DisposableObserveFieldScoped(m.invidious, "authToken", FuncName(SetSubscribeButtonVisibility))
|
DisposableObserveFieldScoped(m.invidious, "authToken", FuncName(SetSubscribeButtonVisibility))
|
||||||
@@ -115,13 +115,17 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function Close()
|
function Close()
|
||||||
m.appController@.PopScreen(invalid)
|
m.appController@.PopScreen()
|
||||||
m.top.dispose = true
|
m.top.dispose = true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnDispose()
|
function OnDispose()
|
||||||
m.rowList.dispose = true
|
m.rowList.dispose = true
|
||||||
DisposeObservers()
|
DisposeObservers()
|
||||||
|
if m.subscribeTask <> invalid
|
||||||
|
m.subscribeTask.cancel = true
|
||||||
|
m.subscribeTask = invalid
|
||||||
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnSubscribeButtonSelected()
|
function OnSubscribeButtonSelected()
|
||||||
@@ -130,9 +134,9 @@ function OnSubscribeButtonSelected()
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
isSubbed = IsSubscribed()
|
isSubbed = IsSubscribed()
|
||||||
m.subscribeTask = StartAsyncTask(SubscribeTask, {
|
m.subscribeTask = AsyncTask.Start(Tasks.SubscribeTask, {
|
||||||
invidious: m.invidious,
|
invidious: m.invidious
|
||||||
ucid: m.authorId,
|
ucid: m.authorId
|
||||||
subscribe: not isSubbed
|
subscribe: not isSubbed
|
||||||
})
|
})
|
||||||
end function
|
end function
|
||||||
@@ -168,33 +172,30 @@ function InitializeTabs()
|
|||||||
m.tabs = {
|
m.tabs = {
|
||||||
videos: function(authorId as string, author as string) as object
|
videos: function(authorId as string, author as string) as object
|
||||||
return CreateChannelFeed("Latest videos", "channel_videos", authorId, author)
|
return CreateChannelFeed("Latest videos", "channel_videos", authorId, author)
|
||||||
end function,
|
end function
|
||||||
shorts: function(authorId as string, author as string) as object
|
shorts: function(authorId as string, author as string) as object
|
||||||
return CreateChannelFeed("Shorts", "channel_shorts", authorId, author)
|
return CreateChannelFeed("Shorts", "channel_shorts", authorId, author)
|
||||||
end function,
|
end function
|
||||||
streams: function(authorId as string, author as string) as object
|
streams: function(authorId as string, author as string) as object
|
||||||
return CreateChannelFeed("Live", "channel_streams", authorId, author)
|
return CreateChannelFeed("Live", "channel_streams", authorId, author)
|
||||||
end function,
|
end function
|
||||||
podcasts: function(authorId as string, author as string) as object
|
podcasts: function(authorId as string, author as string) as object
|
||||||
return CreateChannelFeed("Podcasts", "channel_podcasts", authorId, author)
|
return CreateChannelFeed("Podcasts", "channel_podcasts", authorId, author)
|
||||||
end function,
|
end function
|
||||||
playlists: function(authorId as string, author as string) as object
|
playlists: function(authorId as string, author as string) as object
|
||||||
return CreateChannelFeed("Playlists", "channel_playlists", authorId, author)
|
return CreateChannelFeed("Playlists", "channel_playlists", authorId, author)
|
||||||
end function,
|
|
||||||
channels: function(authorId as string, author as string) as object
|
|
||||||
return CreateChannelFeed("Channels", "channel_channels", authorId, author)
|
|
||||||
end function
|
end function
|
||||||
}
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function CreateChannelFeed(title as string, endpoint as string, ucid as string, author as string) as object
|
function CreateChannelFeed(title as string, endpoint as string, ucid as string, author as string) as object
|
||||||
return {
|
return {
|
||||||
title: title,
|
title: title
|
||||||
feedSources: [{
|
feedSources: [{
|
||||||
"id": `inv_${endpoint}_${ucid}`,
|
"id": `inv_${endpoint}_${ucid}`
|
||||||
"title": `${author} - ${title}`,
|
"title": `${author} - ${title}`
|
||||||
"apiType": "Invidious",
|
"apiType": "Invidious"
|
||||||
"endpoint": endpoint,
|
"endpoint": endpoint
|
||||||
"pathParams": {
|
"pathParams": {
|
||||||
"ucid": ucid
|
"ucid": ucid
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function SubscribeTask(input as object) as object
|
|||||||
error = response.ErrorMessage()
|
error = response.ErrorMessage()
|
||||||
LogError("Failed to subscribe/unsubscribe to channel:", error)
|
LogError("Failed to subscribe/unsubscribe to channel:", error)
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false
|
||||||
error: error
|
error: error
|
||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -7,17 +7,27 @@ function UpdateMaskSize()
|
|||||||
width = m.top.width
|
width = m.top.width
|
||||||
height = m.top.height
|
height = m.top.height
|
||||||
|
|
||||||
m.top.maskSize = [width * GetScaleFactor(), height * GetScaleFactor()]
|
m.top.maskSize = [width * GetUIScaleFactor(), height * GetUIScaleFactor()]
|
||||||
end function
|
end function
|
||||||
|
|
||||||
' MaskGroup component do not scale with with UI resolution
|
' MaskGroup component do not scale with with UI resolution
|
||||||
function GetScaleFactor() as float
|
function GetUIScaleFactor() as float
|
||||||
if m.scaleFactor <> invalid
|
if m.uiScaleFactor <> invalid
|
||||||
return m.scaleFactor
|
return m.uiScaleFactor
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if m.global.uiScaleFactor <> invalid
|
||||||
|
return m.global.uiScaleFactor
|
||||||
|
end if
|
||||||
|
|
||||||
deviceInfo = CreateObject("roDeviceInfo")
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
uiResolutionWidth = deviceInfo.GetUIResolution().width
|
uiResolutionWidth = deviceInfo.GetUIResolution().width
|
||||||
' divide by 1280 because we have ui_resolutions=hd in manifest
|
' divide by 1280 because we have ui_resolutions=hd in manifest
|
||||||
m.scaleFactor = uiResolutionWidth / 1280
|
m.uiScaleFactor = uiResolutionWidth / 1280
|
||||||
return m.scaleFactor
|
|
||||||
|
if not m.global.hasField("uiScaleFactor")
|
||||||
|
m.global.addField("uiScaleFactor", "float", false)
|
||||||
|
end if
|
||||||
|
m.global.uiScaleFactor = m.uiScaleFactor
|
||||||
|
return m.uiScaleFactor
|
||||||
end function
|
end function
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
import "pkg:/components/ContentNode/ChannelContentTask.bs"
|
|
||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
||||||
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
import "pkg:/source/utils/ErrorUtils.bs"
|
import "pkg:/source/utils/ErrorUtils.bs"
|
||||||
|
import "pkg:/source/utils/Logging.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
end function
|
end function
|
||||||
@@ -17,8 +19,8 @@ function LoadChannel(invidiousNode as object) as void
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
m.top.loadState = FeedLoadState.Loading
|
m.top.loadState = FeedLoadState.Loading
|
||||||
m.contentTask = StartAsyncTask(ChannelContentTask, {
|
m.contentTask = AsyncTask.Start(Tasks.ChannelContentTask, {
|
||||||
content: m.top,
|
content: m.top
|
||||||
invidious: invidiousNode
|
invidious: invidiousNode
|
||||||
}, OnChannelContentTaskResult)
|
}, OnChannelContentTaskResult)
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
<component name="ChannelContentNode" extends="ContentNode">
|
<component name="ChannelContentNode" extends="ContentNode">
|
||||||
<interface>
|
<interface>
|
||||||
|
<function name="LoadChannel" />
|
||||||
|
|
||||||
<field id="type" type="string" value="channel" />
|
<field id="type" type="string" value="channel" />
|
||||||
<field id="loadState" type="string" />
|
<field id="loadState" type="string" />
|
||||||
<function name="LoadChannel" />
|
|
||||||
<!-- index in a feed -->
|
<!-- index in a feed -->
|
||||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||||
|
<field id="HDItemWidth" type="float" value="196" />
|
||||||
<!-- NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation -->
|
<!-- NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation -->
|
||||||
<field id="_author" type="string" />
|
<field id="_author" type="string" />
|
||||||
<field id="authorId" type="string" />
|
<field id="authorId" type="string" />
|
||||||
|
<field id="banner" type="string" />
|
||||||
<field id="channelHandle" type="string" />
|
<field id="channelHandle" type="string" />
|
||||||
<field id="description" type="string" />
|
<field id="description" type="string" />
|
||||||
<field id="subCount" type="integer" />
|
<field id="subCount" type="integer" />
|
||||||
<field id="subCountText" type="string" />
|
<field id="subCountText" type="string" />
|
||||||
|
<field id="tabs" type="array" />
|
||||||
|
<field id="thumbnail" type="string" />
|
||||||
<field id="videoCount" type="integer" />
|
<field id="videoCount" type="integer" />
|
||||||
<field id="videoCountText" type="string" />
|
<field id="videoCountText" type="string" />
|
||||||
<field id="thumbnail" type="string" />
|
|
||||||
<field id="banner" type="string" />
|
|
||||||
<field id="tabs" type="array" />
|
|
||||||
|
|
||||||
<field id="HDItemWidth" type="float" value="196" />
|
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
@@ -24,7 +24,7 @@ function ChannelContentTask(input as object) as object
|
|||||||
if not response.IsSuccess() or metadata = invalid
|
if not response.IsSuccess() or metadata = invalid
|
||||||
contentNode.loadState = FeedLoadState.Error
|
contentNode.loadState = FeedLoadState.Error
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false
|
||||||
error: response.ErrorMessage()
|
error: response.ErrorMessage()
|
||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
<field id="loadState" type="string" />
|
<field id="loadState" type="string" />
|
||||||
<!-- index in a feed -->
|
<!-- index in a feed -->
|
||||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||||
<!--
|
<!--
|
||||||
TODO:P0 see if the existance of the field "title" has anything to do with it
|
|
||||||
|
|
||||||
For some strange reason, the "author" field can only be set once.
|
For some strange reason, the "author" field can only be set once.
|
||||||
If you try to set it again, it will not be updated, with type mismatch warning:
|
If you try to set it again, it will not be updated, with type mismatch warning:
|
||||||
|
|
||||||
@@ -24,17 +22,19 @@
|
|||||||
Although we use the field "author" in other components, this is the only place where we modify it after
|
Although we use the field "author" in other components, this is the only place where we modify it after
|
||||||
we set it for the first time (because a saved Playlist belongs to the Invidious user at first, but then
|
we set it for the first time (because a saved Playlist belongs to the Invidious user at first, but then
|
||||||
we can query it's original owner)
|
we can query it's original owner)
|
||||||
|
|
||||||
|
The issue happens on PlaylistContentNode and ChannelContentNode, but not VideoContentNode.
|
||||||
-->
|
-->
|
||||||
<field id="_author" type="string" />
|
<field id="_author" type="string" />
|
||||||
<field id="authorId" type="string" />
|
<field id="authorId" type="string" />
|
||||||
<field id="playlistId" type="string" />
|
<field id="playlistId" type="string" />
|
||||||
<field id="thumbnail" type="uri" />
|
<field id="thumbnail" type="uri" />
|
||||||
<field id="thumbnailBackground" type="uri" />
|
<field id="thumbnailBackground" type="uri" />
|
||||||
|
<field id="updated" type="integer" />
|
||||||
|
<field id="updatedText" type="string" />
|
||||||
<field id="videoCount" type="integer" value="-1" />
|
<field id="videoCount" type="integer" value="-1" />
|
||||||
<field id="videoCountText" type="string" />
|
<field id="videoCountText" type="string" />
|
||||||
<field id="viewCount" type="integer" />
|
<field id="viewCount" type="integer" />
|
||||||
<field id="viewCountText" type="string" />
|
<field id="viewCountText" type="string" />
|
||||||
<field id="updated" type="integer" />
|
|
||||||
<field id="updatedText" type="string" />
|
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
<component name="VideoContentNode" extends="ContentNode">
|
<component name="VideoContentNode" extends="ContentNode">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="type" type="string" value="video" />
|
<field id="type" type="string" value="video" />
|
||||||
|
|
||||||
<field id="author" type="string" />
|
|
||||||
<field id="authorId" type="string" />
|
|
||||||
<field id="hlsUrl" type="uri" />
|
|
||||||
<!-- index in a playlist -->
|
<!-- index in a playlist -->
|
||||||
<field id="index" type="integer" value="-1" />
|
<field id="index" type="integer" value="-1" />
|
||||||
<!-- index in a feed -->
|
<!-- index in a feed -->
|
||||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||||
|
|
||||||
|
<field id="author" type="string" />
|
||||||
|
<field id="authorId" type="string" />
|
||||||
<field id="isUpcoming" type="boolean" />
|
<field id="isUpcoming" type="boolean" />
|
||||||
<field id="lengthSeconds" type="integer" />
|
<field id="lengthSeconds" type="integer" />
|
||||||
<field id="lengthText" type="string" />
|
<field id="lengthText" type="string" />
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import "pkg:/source/utils/Logging.bs"
|
|||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
' TODO:P0 Web app support
|
' TODO:P1 Web app support
|
||||||
' TODO:P0 Web apis and open api spec updates
|
' TODO:P1 Web apis and open api spec updates
|
||||||
'
|
'
|
||||||
' From the main screen:
|
' From the main screen:
|
||||||
' When a video is selected:
|
' When a video is selected:
|
||||||
@@ -167,5 +167,5 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function Close()
|
function Close()
|
||||||
m.top.appController@.PopScreen(invalid)
|
m.top.appController@.PopScreen()
|
||||||
end function
|
end function
|
||||||
@@ -11,19 +11,19 @@ function OnItemHasFocus()
|
|||||||
hasFocus = m.top.itemHasFocus
|
hasFocus = m.top.itemHasFocus
|
||||||
if hasFocus
|
if hasFocus
|
||||||
m.top.font = "font:SmallestBoldSystemFont"
|
m.top.font = "font:SmallestBoldSystemFont"
|
||||||
m.top.color = "0x262626ff"
|
m.top.color = "#262626ff"
|
||||||
else
|
else
|
||||||
m.top.font = "font:SmallestSystemFont"
|
m.top.font = "font:SmallestSystemFont"
|
||||||
m.top.color = "0xddddddff"
|
m.top.color = "#DBDBDBFF"
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnFocusPercent()
|
function OnFocusPercent()
|
||||||
if m.top.focusPercent > 0.5
|
if m.top.focusPercent > 0.5
|
||||||
m.top.font = "font:SmallestBoldSystemFont"
|
m.top.font = "font:SmallestBoldSystemFont"
|
||||||
m.top.color = "0x262626ff"
|
m.top.color = "#262626FF"
|
||||||
else
|
else
|
||||||
m.top.font = "font:SmallestSystemFont"
|
m.top.font = "font:SmallestSystemFont"
|
||||||
m.top.color = "0xddddddff"
|
m.top.color = "#DBDBDBFF"
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
@@ -19,7 +19,7 @@ namespace ContextMenuUtils
|
|||||||
ContextMenuUtils.SetItem(contextMenu, item)
|
ContextMenuUtils.SetItem(contextMenu, item)
|
||||||
contextMenu.options = options
|
contextMenu.options = options
|
||||||
|
|
||||||
contextMenu@.Show(invalid)
|
contextMenu@.Show()
|
||||||
return contextMenu
|
return contextMenu
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
function SetPalette(dialog as object)
|
||||||
|
palette = createObject("roSGNode", "RSGPalette")
|
||||||
|
palette.colors = {
|
||||||
|
DialogBackgroundColor: "#242424FF"
|
||||||
|
DialogFocusColor: "#CECECEFF"
|
||||||
|
DialogFocusItemColor: "#202020FF"
|
||||||
|
DialogSecondaryTextColor: "#DBDBDBFF"
|
||||||
|
DialogSecondaryItemColor: "#FF1C30FF"
|
||||||
|
DialogTextColor: "#DBDBDBFF"
|
||||||
|
}
|
||||||
|
dialog.palette = palette
|
||||||
|
end function
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
import "pkg:/components/Screens/WebAppScreen/GenerateQrCodeTask.bs"
|
import "DialogPalette.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
|
SetPalette(m.top)
|
||||||
m.urlLabel = m.top.findNode("urlLabel")
|
m.urlLabel = m.top.findNode("urlLabel")
|
||||||
m.qrCode = m.top.findNode("QrCodePoster")
|
m.qrCode = m.top.findNode("QrCodePoster")
|
||||||
|
|
||||||
@@ -12,9 +14,9 @@ function Init()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
address = m.webserver@.GetServerAddress(invalid)
|
address = m.webserver@.GetServerAddress()
|
||||||
isValidIp = not StringUtils.IsNullOrEmpty(address)
|
isValidAddress = not StringUtils.IsNullOrEmpty(address)
|
||||||
if isValidIp
|
if isValidAddress
|
||||||
m.top.url = `${address}/invidious/login`
|
m.top.url = `${address}/invidious/login`
|
||||||
else
|
else
|
||||||
m.urlLabel.text = "No IP address found"
|
m.urlLabel.text = "No IP address found"
|
||||||
@@ -31,10 +33,10 @@ function OnUrlSet()
|
|||||||
url = m.top.url
|
url = m.top.url
|
||||||
|
|
||||||
m.urlLabel.text = url
|
m.urlLabel.text = url
|
||||||
StartAsyncTask(GenerateQrCodeTask, {
|
AsyncTask.Start(Tasks.GenerateQrCodeTask, {
|
||||||
poster: m.qrCode,
|
poster: m.qrCode
|
||||||
text: url,
|
text: url
|
||||||
size: m.qrCode.loadWidth,
|
size: m.qrCode.loadWidth
|
||||||
padding: 10
|
padding: 10
|
||||||
})
|
})
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
horizAlign="right"
|
horizAlign="right"
|
||||||
width="400"
|
width="400"
|
||||||
extendToDialogEdge="false"
|
extendToDialogEdge="false"
|
||||||
showDivider="true">
|
showDivider="false">
|
||||||
<Label
|
<Label
|
||||||
text="Scan the QR Code"
|
text="Scan the QR Code"
|
||||||
horizAlign="center"
|
horizAlign="center"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import "DialogPalette.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
|
SetPalette(m.top)
|
||||||
m.top.observeField("buttonSelected", FuncName(CloseDialog))
|
m.top.observeField("buttonSelected", FuncName(CloseDialog))
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.top.functionName = "LoggerLoop"
|
m.top.functionName = "LoggerLoop"
|
||||||
@@ -32,13 +32,23 @@ function LoggerLoop()
|
|||||||
port = m.port
|
port = m.port
|
||||||
|
|
||||||
buffer = CreateObject("roByteArray")
|
buffer = CreateObject("roByteArray")
|
||||||
previousLogsFile = m.top.folder + "/" + m.top.filenamePrevious
|
|
||||||
logsFile = m.top.folder + "/" + m.top.filename
|
logsFile = m.top.folder + "/" + m.top.filename
|
||||||
|
previousLogsFile = m.top.folder + "/" + m.top.filenamePrevious
|
||||||
|
filenameStartup = m.top.filenameStartup
|
||||||
|
|
||||||
CreateDirectory(m.top.folder)
|
CreateDirectory(m.top.folder)
|
||||||
DeleteFile(previousLogsFile)
|
DeleteFile(previousLogsFile)
|
||||||
MoveFile(logsFile, previousLogsFile)
|
MoveFile(logsFile, previousLogsFile)
|
||||||
|
|
||||||
|
startUpLogs = ReadAsciiFile(filenameStartup)
|
||||||
|
if not StringUtils.IsNullOrEmpty(startUpLogs)
|
||||||
|
line = `************* Startup Logs *************\n${startUpLogs}*********** End Startup Logs ***********\n`
|
||||||
|
' bs:disable-next-line LINT3012
|
||||||
|
print line
|
||||||
|
buffer.FromAsciiString(line)
|
||||||
|
buffer.AppendFile(logsFile)
|
||||||
|
end if
|
||||||
|
|
||||||
while true
|
while true
|
||||||
msg = wait(0, port)
|
msg = wait(0, port)
|
||||||
msgType = type(msg)
|
msgType = type(msg)
|
||||||
|
|||||||
@@ -5,5 +5,6 @@
|
|||||||
<field id="folder" type="string" value="cachefs:/logs" />
|
<field id="folder" type="string" value="cachefs:/logs" />
|
||||||
<field id="filename" type="string" value="app_logs.txt" />
|
<field id="filename" type="string" value="app_logs.txt" />
|
||||||
<field id="filenamePrevious" type="string" value="app_logs_previous.txt" />
|
<field id="filenamePrevious" type="string" value="app_logs_previous.txt" />
|
||||||
|
<field id="filenameStartup" type="string" value="cachefs:/playlet_startup_logs.txt" />
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import "pkg:/components/EcpArgs.bs"
|
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:/source/utils/LoadingScreen.bs"
|
import "pkg:/source/utils/LoadingScreen.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
@@ -16,9 +17,10 @@ function MainSceneContainerChanged()
|
|||||||
HideLoadingScreen()
|
HideLoadingScreen()
|
||||||
InitEcpArgs()
|
InitEcpArgs()
|
||||||
m.scene.signalBeacon("AppLaunchComplete")
|
m.scene.signalBeacon("AppLaunchComplete")
|
||||||
|
CopyLoadingMessagesToCache()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function StartWebServer()
|
function StartWebServer()
|
||||||
m.webServer = m.top.findNode("WebServer")
|
m.webServer = m.top.findNode("WebServer")
|
||||||
m.webServer@.StartServer(invalid)
|
m.webServer@.StartServer()
|
||||||
end function
|
end function
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
'import "pkg:/components/EcpArgs.bs"
|
'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:/source/utils/LoadingScreen.bs"
|
'import "pkg:/source/utils/LoadingScreen.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
@@ -17,6 +18,7 @@ function MainSceneContainerChanged()
|
|||||||
HideLoadingScreen()
|
HideLoadingScreen()
|
||||||
InitEcpArgs()
|
InitEcpArgs()
|
||||||
m.scene.signalBeacon("AppLaunchComplete")
|
m.scene.signalBeacon("AppLaunchComplete")
|
||||||
|
CopyLoadingMessagesToCache()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function StartWebServer()
|
function StartWebServer()
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<script type="text/brightscript" uri="pkg:/components/MainScene_bindings.brs" />
|
<script type="text/brightscript" uri="pkg:/components/MainScene_bindings.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/components/MainScene.brs" />
|
<script type="text/brightscript" uri="pkg:/components/MainScene.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/source/utils/LoadingScreen.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/LoadingScreen.brs" />
|
||||||
|
<script type="text/brightscript" uri="pkg:/components/parts/AutoBind/OnNodeReadyNoOp.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/components/EcpArgs.brs" />
|
<script type="text/brightscript" uri="pkg:/components/EcpArgs.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/source/utils/Types.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/Types.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/source/utils/StringUtils.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/StringUtils.brs" />
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
<ApplicationInfo id="ApplicationInfo" />
|
<ApplicationInfo id="ApplicationInfo" />
|
||||||
<Preferences id="Preferences" />
|
<Preferences id="Preferences" />
|
||||||
<Bookmarks id="Bookmarks" />
|
<Bookmarks id="Bookmarks" />
|
||||||
|
<SearchHistory id="SearchHistory" />
|
||||||
<Invidious id="Invidious" />
|
<Invidious id="Invidious" />
|
||||||
<PlayletWebServer id="WebServer" port="8888" />
|
<PlayletWebServer id="WebServer" port="8888" />
|
||||||
</AppController>
|
</AppController>
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
<children>
|
<children>
|
||||||
<!-- Logger should remain the first child, to make sure it is initialized first in the scene -->
|
<!-- Logger should remain the first child, to make sure it is initialized first in the scene -->
|
||||||
<Logger id="Logger" />
|
<Logger id="Logger" />
|
||||||
<AppController id="AppController" root="bind:./AppRoot" stack="bind:./Stack">
|
<AppController id="AppController"
|
||||||
|
root="bind:./AppRoot"
|
||||||
|
stack="bind:./Stack"
|
||||||
|
playQueue="bind:./PlayQueue">
|
||||||
<Group id="Stack">
|
<Group id="Stack">
|
||||||
<AppRoot id="AppRoot">
|
<AppRoot id="AppRoot">
|
||||||
<NavBar id="NavBar" focusIndex="1" appController="bind:/AppController">
|
<NavBar id="NavBar" focusIndex="1" appController="bind:/AppController">
|
||||||
@@ -53,6 +56,8 @@
|
|||||||
<ApplicationInfo id="ApplicationInfo" />
|
<ApplicationInfo id="ApplicationInfo" />
|
||||||
<Preferences id="Preferences" />
|
<Preferences id="Preferences" />
|
||||||
<Bookmarks id="Bookmarks" />
|
<Bookmarks id="Bookmarks" />
|
||||||
|
<SearchHistory id="SearchHistory"
|
||||||
|
preferences="bind:../Preferences" />
|
||||||
|
|
||||||
<Invidious id="Invidious"
|
<Invidious id="Invidious"
|
||||||
webServer="bind:../WebServer"
|
webServer="bind:../WebServer"
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ function InitializeBindings()
|
|||||||
childProps: {
|
childProps: {
|
||||||
"AppController": {
|
"AppController": {
|
||||||
"root": "./AppRoot",
|
"root": "./AppRoot",
|
||||||
"stack": "./Stack"
|
"stack": "./Stack",
|
||||||
|
"playQueue": "./PlayQueue"
|
||||||
},
|
},
|
||||||
"NavBar": {
|
"NavBar": {
|
||||||
"appController": "/AppController"
|
"appController": "/AppController"
|
||||||
@@ -17,6 +18,9 @@ function InitializeBindings()
|
|||||||
"notifications": "../Notifications",
|
"notifications": "../Notifications",
|
||||||
"preferences": "../Preferences"
|
"preferences": "../Preferences"
|
||||||
},
|
},
|
||||||
|
"SearchHistory": {
|
||||||
|
"preferences": "../Preferences"
|
||||||
|
},
|
||||||
"Invidious": {
|
"Invidious": {
|
||||||
"webServer": "../WebServer",
|
"webServer": "../WebServer",
|
||||||
"applicationInfo": "../ApplicationInfo",
|
"applicationInfo": "../ApplicationInfo",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import "pkg:/source/utils/ColorUtils.bs"
|
|
||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
@@ -31,8 +30,8 @@ function PopulateButtons() as void
|
|||||||
buttons = []
|
buttons = []
|
||||||
for each item in navBarItems
|
for each item in navBarItems
|
||||||
button = CreateObject("roSGNode", "IconButton")
|
button = CreateObject("roSGNode", "IconButton")
|
||||||
button.background = ColorUtils.HexToInt("242424")
|
button.background = "#242424FF"
|
||||||
button.focusBackground = ColorUtils.HexToInt("ff1c30")
|
button.focusBackground = "#FF1C30FF"
|
||||||
button.padding = 20
|
button.padding = 20
|
||||||
button.height = 50
|
button.height = 50
|
||||||
button.width = 90
|
button.width = 90
|
||||||
@@ -47,6 +46,18 @@ function PopulateButtons() as void
|
|||||||
m.top.focusable = buttons.Count() > 0
|
m.top.focusable = buttons.Count() > 0
|
||||||
|
|
||||||
m.top.focusIndex = m.top.focusIndex
|
m.top.focusIndex = m.top.focusIndex
|
||||||
|
|
||||||
|
CenterButtons()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function CenterButtons()
|
||||||
|
parent = m.buttonGroup.getParent()
|
||||||
|
parentWidth = parent.width
|
||||||
|
parentHeight = parent.height
|
||||||
|
|
||||||
|
rect = m.buttonGroup.boundingRect()
|
||||||
|
|
||||||
|
m.buttonGroup.translation = [parentWidth / 2 - rect.width / 2, parentHeight / 2 - rect.height / 2]
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function onKeyEvent(key as string, press as boolean) as boolean
|
function onKeyEvent(key as string, press as boolean) as boolean
|
||||||
|
|||||||
@@ -1,41 +1,79 @@
|
|||||||
const LONG_PRESS_KEY = "OK_LONG_PRESS"
|
const OK_LONG_PRESS_KEY = "OK_LONG_PRESS"
|
||||||
|
const OPTIONS_LONG_PRESS_KEY = "OPTIONS_LONG_PRESS"
|
||||||
|
|
||||||
|
function InitializeLongPress(keys as object, duration = 1.0 as float)
|
||||||
|
longPressKeyMap = {
|
||||||
|
"OK": OK_LONG_PRESS_KEY
|
||||||
|
"options": OPTIONS_LONG_PRESS_KEY
|
||||||
|
}
|
||||||
|
m._longPressKeyMap = {}
|
||||||
|
for each key in keys
|
||||||
|
m._longPressKeyMap[key] = longPressKeyMap[key]
|
||||||
|
end for
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
' This is for testing long press using the VSCode extension.
|
||||||
|
' Using the keyboard:
|
||||||
|
' - press K to simulate an "OK" long press on the remote.
|
||||||
|
' - press O to simulate an "options" long press on the remote.
|
||||||
|
simulatedLongPressKeyMap = {
|
||||||
|
"OK": "Lit_k"
|
||||||
|
"options": "Lit_o"
|
||||||
|
}
|
||||||
|
|
||||||
|
m._simulatedLongPressKeyMap = {}
|
||||||
|
for each key in keys
|
||||||
|
m._simulatedLongPressKeyMap[simulatedLongPressKeyMap[key]] = key
|
||||||
|
end for
|
||||||
|
#end if
|
||||||
|
|
||||||
function InitializeLongPressTimer(duration = 1.0 as float)
|
|
||||||
m._longPressTimer = CreateObject("roSGNode", "Timer")
|
m._longPressTimer = CreateObject("roSGNode", "Timer")
|
||||||
m._longPressTimer.duration = duration
|
m._longPressTimer.duration = duration
|
||||||
m._longPressFired = false
|
m._longPressFired = false
|
||||||
|
m._pressState = {}
|
||||||
|
|
||||||
m._longPressTimer.ObserveField("fire", FuncName(LongPressTimerFired))
|
m._longPressTimer.ObserveField("fire", FuncName(LongPressTimerFired))
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function LongPressHandler(key as string, press as boolean) as boolean
|
function LongPressHandler(key as string, press as boolean) as boolean
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if key = "Lit_l"
|
if m._simulatedLongPressKeyMap.DoesExist(key)
|
||||||
LogInfo("Simulating long press using key:", key, "press:", press)
|
subtype = m.top.subtype()
|
||||||
|
simulatedKey = m._simulatedLongPressKeyMap[key]
|
||||||
|
LogInfo(`[${subtype}] Simulating`, simulatedKey, "long press using key:", key, "press:", press)
|
||||||
|
longPressKey = m._longPressKeyMap[simulatedKey]
|
||||||
m._longPressFired = true
|
m._longPressFired = true
|
||||||
return OnkeyEvent(LONG_PRESS_KEY, press)
|
return OnkeyEvent(longPressKey, press)
|
||||||
end if
|
end if
|
||||||
#end if
|
#end if
|
||||||
if key = "OK" and press
|
|
||||||
|
isLongPressKey = m._longPressKeyMap.DoesExist(key)
|
||||||
|
if not isLongPressKey
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
if press
|
||||||
m._longPressTimer.control = "stop"
|
m._longPressTimer.control = "stop"
|
||||||
m._longPressTimer.control = "start"
|
m._longPressTimer.control = "start"
|
||||||
m._longPressFired = false
|
m._longPressFired = false
|
||||||
m._okPressed = true
|
m._longPressKey = key
|
||||||
|
m._pressState[key] = true
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "OK" and not press
|
if not press
|
||||||
m._longPressTimer.control = "stop"
|
m._longPressTimer.control = "stop"
|
||||||
if m._longPressFired = true
|
if m._longPressFired = true
|
||||||
m._longPressFired = false
|
m._longPressFired = false
|
||||||
m._okPressed = false
|
m._pressState[key] = false
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
' This case is for handling a dialog: The dialog will be dismissed with the OK down event,
|
' This case is for handling a dialog: The dialog will be dismissed with the OK down event,
|
||||||
' and we would trigger the action with the OK up event. The action should only happen if
|
' and we would trigger the action with the OK up event. The action should only happen if
|
||||||
' we detected both down and up events.
|
' we detected both down and up events.
|
||||||
wasOkPressed = m._okPressed
|
wasPressed = m._pressState[key]
|
||||||
m._okPressed = false
|
m._pressState[key] = false
|
||||||
if wasOkPressed <> true
|
if wasPressed <> true
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
@@ -43,7 +81,11 @@ function LongPressHandler(key as string, press as boolean) as boolean
|
|||||||
return false
|
return false
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function LongPressTimerFired()
|
function LongPressTimerFired() as void
|
||||||
m._longPressFired = true
|
m._longPressFired = true
|
||||||
OnkeyEvent(LONG_PRESS_KEY, true)
|
if StringUtils.IsNullOrEmpty(m._longPressKey) or not m._longPressKeyMap.DoesExist(m._longPressKey)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
OnkeyEvent(m._longPressKeyMap[m._longPressKey], true)
|
||||||
end function
|
end function
|
||||||
@@ -10,8 +10,8 @@ function SetNavigation(fromNode as object, direction as string, toNode as object
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
m._navigation[direction].push({
|
m._navigation[direction].push({
|
||||||
fromNode: fromNode,
|
fromNode: fromNode
|
||||||
toNode: toNode,
|
toNode: toNode
|
||||||
callback: callback
|
callback: callback
|
||||||
})
|
})
|
||||||
end function
|
end function
|
||||||
@@ -19,7 +19,7 @@ end function
|
|||||||
function NavigationKeyHandler(key as string, press as boolean) as object
|
function NavigationKeyHandler(key as string, press as boolean) as object
|
||||||
if not press
|
if not press
|
||||||
return {
|
return {
|
||||||
handled: false,
|
handled: false
|
||||||
node: invalid
|
node: invalid
|
||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
@@ -27,7 +27,7 @@ function NavigationKeyHandler(key as string, press as boolean) as object
|
|||||||
navigations = m._navigation[key]
|
navigations = m._navigation[key]
|
||||||
if navigations = invalid
|
if navigations = invalid
|
||||||
return {
|
return {
|
||||||
handled: false,
|
handled: false
|
||||||
node: invalid
|
node: invalid
|
||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
@@ -41,13 +41,13 @@ function NavigationKeyHandler(key as string, press as boolean) as object
|
|||||||
item.callback()
|
item.callback()
|
||||||
end if
|
end if
|
||||||
return {
|
return {
|
||||||
handled: true,
|
handled: true
|
||||||
node: item.toNode
|
node: item.toNode
|
||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
return {
|
return {
|
||||||
handled: false,
|
handled: false
|
||||||
node: invalid
|
node: invalid
|
||||||
}
|
}
|
||||||
end function
|
end function
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="ContentNodeReference" extends="ContentNode">
|
||||||
|
<interface>
|
||||||
|
<field id="refNode" type="node" />
|
||||||
|
</interface>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
' NodeByRef: these functions provides the ability to "wrap" a node in
|
||||||
|
' another node, so it can be passed by reference. This is useful for
|
||||||
|
' when a node is required to be a child of multiple nodes at once,
|
||||||
|
' which is not possible.
|
||||||
|
' Instead, the node is wrapped, passed around, and unwrapped when needed.
|
||||||
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
|
|
||||||
|
namespace NodeByRef
|
||||||
|
|
||||||
|
function Wrap(node as object) as object
|
||||||
|
if node = invalid
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
if node.refNode <> invalid
|
||||||
|
return node
|
||||||
|
end if
|
||||||
|
|
||||||
|
ref = CreateObject("roSGNode", "ContentNodeReference")
|
||||||
|
ref.refNode = node
|
||||||
|
if not StringUtils.IsNullOrEmpty(node.id)
|
||||||
|
ref.id = node.id + "-ref"
|
||||||
|
end if
|
||||||
|
return ref
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Unwrap(node as object) as object
|
||||||
|
if node = invalid
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
loopGuard = 0
|
||||||
|
while node.refNode <> invalid and loopGuard < 10
|
||||||
|
node = node.refNode
|
||||||
|
loopGuard += 1
|
||||||
|
end while
|
||||||
|
|
||||||
|
return node
|
||||||
|
end function
|
||||||
|
|
||||||
|
end namespace
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import "pkg:/components/NodeByRef/NodeByRef.bs"
|
||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ end function
|
|||||||
|
|
||||||
function OnContentSet() as void
|
function OnContentSet() as void
|
||||||
content = m.top.content
|
content = m.top.content
|
||||||
|
content = NodeByRef.Unwrap(content)
|
||||||
if content = invalid
|
if content = invalid
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<children>
|
<children>
|
||||||
<Poster
|
<Poster
|
||||||
width="500"
|
width="500"
|
||||||
height="126"
|
height="144"
|
||||||
opacity="0.9"
|
opacity="0.9"
|
||||||
uri="pkg:/images/white.9.png">
|
uri="pkg:/images/white.9.png">
|
||||||
|
|
||||||
@@ -40,6 +40,12 @@
|
|||||||
color="0x262626ff"
|
color="0x262626ff"
|
||||||
wrap="true" />
|
wrap="true" />
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
|
<Label
|
||||||
|
width="480"
|
||||||
|
font="font:SmallestSystemFont"
|
||||||
|
color="0x262626ff"
|
||||||
|
text="Press and hold Options (*) to open the queue"
|
||||||
|
translation="[10,120]" />
|
||||||
</Poster>
|
</Poster>
|
||||||
<Animation
|
<Animation
|
||||||
id="translationAnimation"
|
id="translationAnimation"
|
||||||
|
|||||||
@@ -1,88 +1,116 @@
|
|||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
import "pkg:/components/PlaylistView/PlaylistContentTask.bs"
|
import "pkg:/components/NodeByRef/NodeByRef.bs"
|
||||||
import "pkg:/components/PlayQueue/Notifications/PlayQueueNotificationUtils.bs"
|
import "pkg:/components/PlayQueue/Notifications/PlayQueueNotificationUtils.bs"
|
||||||
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
||||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
import "pkg:/source/utils/ArrayUtils.bs"
|
import "pkg:/source/utils/ArrayUtils.bs"
|
||||||
import "pkg:/source/utils/ErrorUtils.bs"
|
import "pkg:/source/utils/ErrorUtils.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
|
import "pkg:/source/utils/RingBuffer.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
' TODO:P1 prevent adding duplicates of the same video/playlist
|
||||||
function Init()
|
function Init()
|
||||||
m.pendingLoadTasks = {}
|
m.pendingLoadTasks = {}
|
||||||
' TODO:P1 prevent adding duplicates of the same video/playlist
|
m.content = m.top.findNode("Content")
|
||||||
m.queue = CreateObject("roArray", 0, true)
|
m.top.content = m.content
|
||||||
|
m.content.addField("index", "integer", false)
|
||||||
|
m.content.index = m.top.index
|
||||||
|
' TODO:P2 use actual queue nodes instead of internal buffer
|
||||||
|
m.watchedVideos = new RingBuffer(100)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function Play(node as object, playlistIndex as integer)
|
function Play(node as object, playlistIndex as integer)
|
||||||
m.top.index += 1
|
m.top.index += 1
|
||||||
m.top.playlistIndex = playlistIndex
|
m.top.playlistIndex = playlistIndex
|
||||||
|
|
||||||
if m.top.index >= m.queue.Count()
|
node = WrapWithIndexField(node)
|
||||||
m.queue.push(node)
|
if m.top.index >= m.content.getChildCount()
|
||||||
m.top.index = m.queue.Count() - 1
|
m.content.appendChild(node)
|
||||||
|
m.top.index = m.content.getChildCount() - 1
|
||||||
else
|
else
|
||||||
ArrayUtils.Insert(m.queue, node, m.top.index)
|
m.content.insertChild(node, m.top.index)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
PlayItemAtCurrentIndex()
|
PlayItemAtCurrentIndex()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function AddToQueue(node as object)
|
function AddToQueue(node as object)
|
||||||
m.queue.push(node)
|
node = WrapWithIndexField(node)
|
||||||
|
m.content.appendChild(node)
|
||||||
queueNotifications = m.top.preferences["misc.queue_notifications"]
|
queueNotifications = m.top.preferences["misc.queue_notifications"]
|
||||||
if queueNotifications
|
if queueNotifications
|
||||||
PlayQueue.ShowNotifcation(m.top.notifications, node)
|
PlayQueue.ShowNotifcation(m.top.notifications, node)
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
' TODO:P1 better model of the queue (Now playing, etc)
|
function WrapWithIndexField(node as object) as object
|
||||||
function GetQueue(unused as dynamic) as object
|
node = NodeByRef.Wrap(node)
|
||||||
|
if not node.hasField("index")
|
||||||
|
node.addField("index", "integer", false)
|
||||||
|
end if
|
||||||
|
node.index = m.top.index
|
||||||
|
return node
|
||||||
|
end function
|
||||||
|
|
||||||
|
' TODO:P0 better model of the queue (Now playing, etc)
|
||||||
|
function GetQueue(_unused as dynamic) as object
|
||||||
|
queueNodes = m.content.getChildren(-1, 0)
|
||||||
items = []
|
items = []
|
||||||
for each item in m.queue
|
for each node in queueNodes
|
||||||
if item.type = "video"
|
node = NodeByRef.Unwrap(node)
|
||||||
|
if node = invalid
|
||||||
|
continue for
|
||||||
|
end if
|
||||||
|
|
||||||
|
nodeType = node.type
|
||||||
|
if nodeType = "video"
|
||||||
items.push({
|
items.push({
|
||||||
type: item.type,
|
type: nodeType
|
||||||
videoId: item.videoId,
|
videoId: node.videoId
|
||||||
title: item.title,
|
title: node.title
|
||||||
author: item.author,
|
author: node.author
|
||||||
thumbnail: item.thumbnail
|
thumbnail: node.thumbnail
|
||||||
})
|
})
|
||||||
else if item.type = "playlist"
|
else if node.type = "playlist"
|
||||||
items.push({
|
items.push({
|
||||||
type: item.type,
|
type: nodeType
|
||||||
playlistId: item.playlistId,
|
playlistId: node.playlistId
|
||||||
title: item.title,
|
title: node.title
|
||||||
thumbnail: item.thumbnail,
|
thumbnail: node.thumbnail
|
||||||
videoCountText: item.videoCountText
|
videoCountText: node.videoCountText
|
||||||
})
|
})
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
|
|
||||||
return {
|
return {
|
||||||
index: m.top.index,
|
index: m.top.index
|
||||||
playlistIndex: m.top.playlistIndex,
|
playlistIndex: m.top.playlistIndex
|
||||||
items: items
|
items: items
|
||||||
}
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function Clear(unused as dynamic)
|
function Clear(_unused as dynamic)
|
||||||
m.queue.Clear()
|
m.content.removeChildrenIndex(m.content.getChildCount(), 0)
|
||||||
m.top.index = -1
|
m.top.index = -1
|
||||||
m.top.playlistIndex = -1
|
m.top.playlistIndex = -1
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function PlayNextItem(unused as dynamic) as boolean
|
function PlayNextItem(_unused as dynamic) as boolean
|
||||||
if m.queue.Count() = 0
|
childCount = m.content.getChildCount()
|
||||||
|
if childCount = 0
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if m.top.index <> -1
|
index = m.top.index
|
||||||
if m.top.index >= m.queue.Count()
|
if index <> -1
|
||||||
|
if index >= childCount
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
node = m.queue[m.top.index]
|
node = m.content.getChild(index)
|
||||||
|
node = NodeByRef.Unwrap(node)
|
||||||
if node.type = "playlist"
|
if node.type = "playlist"
|
||||||
m.top.playlistIndex += 1
|
m.top.playlistIndex += 1
|
||||||
if PlayPlaylistAtCurrentIndex(node)
|
if PlayPlaylistAtCurrentIndex(node)
|
||||||
@@ -93,20 +121,27 @@ function PlayNextItem(unused as dynamic) as boolean
|
|||||||
|
|
||||||
m.top.index += 1
|
m.top.index += 1
|
||||||
m.top.playlistIndex = -1
|
m.top.playlistIndex = -1
|
||||||
if m.top.index >= m.queue.Count()
|
if m.top.index >= childCount
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return PlayItemAtCurrentIndex()
|
return PlayItemAtCurrentIndex()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function PlayItemAtIndex(index as integer) as boolean
|
||||||
|
m.top.index = index
|
||||||
|
m.top.playlistIndex = -1
|
||||||
|
return PlayItemAtCurrentIndex()
|
||||||
|
end function
|
||||||
|
|
||||||
function PlayItemAtCurrentIndex() as boolean
|
function PlayItemAtCurrentIndex() as boolean
|
||||||
node = m.queue[m.top.index]
|
node = m.content.getChild(m.top.index)
|
||||||
|
node = NodeByRef.Unwrap(node)
|
||||||
if node = invalid
|
if node = invalid
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
if node.type = "video"
|
if node.type = "video"
|
||||||
VideoUtils.PlayVideo(node)
|
PlayVideo(node)
|
||||||
return true
|
return true
|
||||||
else if node.type = "playlist"
|
else if node.type = "playlist"
|
||||||
if m.top.playlistIndex = -1
|
if m.top.playlistIndex = -1
|
||||||
@@ -118,18 +153,19 @@ function PlayItemAtCurrentIndex() as boolean
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function PlayPlaylistAtCurrentIndex(playlist as object) as boolean
|
function PlayPlaylistAtCurrentIndex(playlist as object) as boolean
|
||||||
|
playlist = NodeByRef.Unwrap(playlist)
|
||||||
if playlist.videoCount < 0
|
if playlist.videoCount < 0
|
||||||
LoadPlaylist(playlist)
|
LoadPlaylist(playlist)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
index = m.top.playlistIndex
|
playlistIndex = m.top.playlistIndex
|
||||||
if index < 0 or index >= playlist.videoCount
|
if playlistIndex < 0 or playlistIndex >= playlist.videoCount
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if index < playlist.getChildCount()
|
if playlistIndex < playlist.getChildCount()
|
||||||
child = playlist.getChild(index)
|
child = playlist.getChild(playlistIndex)
|
||||||
VideoUtils.PlayVideo(child)
|
PlayVideo(child)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -137,6 +173,14 @@ function PlayPlaylistAtCurrentIndex(playlist as object) as boolean
|
|||||||
return true
|
return true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function PlayVideo(node as object)
|
||||||
|
videoId = node.videoId
|
||||||
|
if not m.watchedVideos.Contains(videoId)
|
||||||
|
m.watchedVideos.Push(videoId)
|
||||||
|
end if
|
||||||
|
VideoUtils.PlayVideo(node)
|
||||||
|
end function
|
||||||
|
|
||||||
function LoadPlaylist(playlist as object) as void
|
function LoadPlaylist(playlist as object) as void
|
||||||
if playlist.loadState = FeedLoadState.Loading
|
if playlist.loadState = FeedLoadState.Loading
|
||||||
return
|
return
|
||||||
@@ -144,8 +188,8 @@ function LoadPlaylist(playlist as object) as void
|
|||||||
|
|
||||||
playlist.loadState = FeedLoadState.Loading
|
playlist.loadState = FeedLoadState.Loading
|
||||||
|
|
||||||
task = StartAsyncTask(PlaylistContentTask, {
|
task = AsyncTask.Start(Tasks.PlaylistContentTask, {
|
||||||
content: playlist,
|
content: playlist
|
||||||
invidious: m.top.invidious
|
invidious: m.top.invidious
|
||||||
}, OnPlaylistContentTaskResult)
|
}, OnPlaylistContentTaskResult)
|
||||||
m.pendingLoadTasks[task.id] = task
|
m.pendingLoadTasks[task.id] = task
|
||||||
@@ -177,3 +221,20 @@ function OnPlaylistContentTaskResult(output as object) as void
|
|||||||
|
|
||||||
PlayPlaylistAtCurrentIndex(playlist)
|
PlayPlaylistAtCurrentIndex(playlist)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function OnIndexChange()
|
||||||
|
index = m.top.index
|
||||||
|
m.content.index = index
|
||||||
|
children = m.top.content.getChildren(-1, 0)
|
||||||
|
for each child in children
|
||||||
|
child.index = index
|
||||||
|
end for
|
||||||
|
end function
|
||||||
|
|
||||||
|
function watchedVideosContain(videoId as string) as boolean
|
||||||
|
return m.watchedVideos.Contains(videoId)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function watchedVideosClear(_unused as dynamic)
|
||||||
|
m.watchedVideos = new RingBuffer(100)
|
||||||
|
end function
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<component name="PlayQueue" extends="Node">
|
<component name="PlayQueue" extends="Node">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="queue" type="array" />
|
<field id="content" type="node" />
|
||||||
<field id="index" type="integer" value="-1" />
|
<field id="index" type="integer" value="-1" onChange="OnIndexChange" />
|
||||||
<field id="playlistIndex" type="integer" value="-1" />
|
<field id="playlistIndex" type="integer" value="-1" />
|
||||||
<field id="invidious" type="node" />
|
<field id="invidious" type="node" />
|
||||||
<field id="notifications" type="node" />
|
<field id="notifications" type="node" />
|
||||||
@@ -11,5 +11,11 @@
|
|||||||
<function name="GetQueue" />
|
<function name="GetQueue" />
|
||||||
<function name="Clear" />
|
<function name="Clear" />
|
||||||
<function name="PlayNextItem" />
|
<function name="PlayNextItem" />
|
||||||
|
<function name="PlayItemAtIndex" />
|
||||||
|
<function name="watchedVideosContain" />
|
||||||
|
<function name="watchedVideosClear" />
|
||||||
</interface>
|
</interface>
|
||||||
|
<children>
|
||||||
|
<ContentNode id="Content" />
|
||||||
|
</children>
|
||||||
</component>
|
</component>
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
import "pkg:/components/Navigation/Navigation.bs"
|
||||||
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.queueList = m.top.findNode("queueList")
|
||||||
|
m.queueLabel = m.top.findNode("queueLabel")
|
||||||
|
m.clearButton = m.top.findNode("clearButton")
|
||||||
|
m.showAnimation = m.top.findNode("showAnimation")
|
||||||
|
|
||||||
|
m.clearButton.ObserveField("buttonSelected", FuncName(OnClearButtonSelected))
|
||||||
|
m.queueList.ObserveField("itemSelected", FuncName(OnItemSelected))
|
||||||
|
|
||||||
|
SetNavigation(m.queueList, "up", m.clearButton)
|
||||||
|
SetNavigation(m.clearButton, "down", m.queueList)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Show(unsued as dynamic)
|
||||||
|
m.showAnimation.control = "start"
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFocusChange() as void
|
||||||
|
if not m.top.focus
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
NodeSetFocus(m.queueList, true)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnContentSet() as void
|
||||||
|
content = m.top.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
if not content.isSameNode(m.queueList.content)
|
||||||
|
m.queueList.content = content
|
||||||
|
end if
|
||||||
|
|
||||||
|
index = content.index
|
||||||
|
if IsInt(index) and index <> -1
|
||||||
|
m.queueLabel.text = `Queue (${index + 1}/${content.getChildCount()})`
|
||||||
|
else
|
||||||
|
m.queueLabel.text = `Queue (${content.getChildCount()})`
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||||
|
if NavigationKeyHandler(key, press).handled
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
if press = false
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = "back"
|
||||||
|
Close()
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
return false
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Close()
|
||||||
|
m.top.appController@.PopScreen()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnClearButtonSelected()
|
||||||
|
m.top.playQueue@.Clear()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnItemSelected() as void
|
||||||
|
content = m.queueList.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
index = m.queueList.itemSelected
|
||||||
|
if index < 0 or index >= content.getChildCount()
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.top.playQueue@.PlayItemAtIndex(index)
|
||||||
|
end function
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<component name="PlayQueueView" extends="Group" includes="Focus">
|
||||||
|
<interface>
|
||||||
|
<field id="content" type="node" onChange="OnContentSet" />
|
||||||
|
<field id="jumpToItem" type="integer" alias="queueList.jumpToItem" />
|
||||||
|
<field id="playQueue" type="node" />
|
||||||
|
<field id="appController" type="node" />
|
||||||
|
<function name="Show" />
|
||||||
|
</interface>
|
||||||
|
|
||||||
|
<children>
|
||||||
|
<Rectangle
|
||||||
|
id="background"
|
||||||
|
width="1280"
|
||||||
|
height="720"
|
||||||
|
color="#000000"
|
||||||
|
opacity="0" />
|
||||||
|
<Rectangle
|
||||||
|
id="container"
|
||||||
|
width="470"
|
||||||
|
height="720"
|
||||||
|
translation="[-470,0]"
|
||||||
|
color="0x242424">
|
||||||
|
<Label
|
||||||
|
id="queueLabel"
|
||||||
|
width="270"
|
||||||
|
height="52"
|
||||||
|
text="Queue"
|
||||||
|
vertAlign="center"
|
||||||
|
font="font:MediumBoldSystemFont"
|
||||||
|
translation="[20,20]" />
|
||||||
|
<Button
|
||||||
|
id="clearButton"
|
||||||
|
minWidth="150"
|
||||||
|
height="52"
|
||||||
|
text="Clear"
|
||||||
|
showFocusFootprint="true"
|
||||||
|
translation="[295,15]" />
|
||||||
|
<MarkupGrid
|
||||||
|
id="queueList"
|
||||||
|
itemComponentName="PlayQueueViewCell"
|
||||||
|
itemSize="[432,90]"
|
||||||
|
itemSpacing="[0,15]"
|
||||||
|
numColumns="1"
|
||||||
|
numRows="6"
|
||||||
|
vertFocusAnimationStyle="floatingFocus"
|
||||||
|
translation="[20,90]" />
|
||||||
|
</Rectangle>
|
||||||
|
|
||||||
|
<Animation id="showAnimation"
|
||||||
|
duration="0.3"
|
||||||
|
optional="true">
|
||||||
|
<FloatFieldInterpolator
|
||||||
|
id="fadeInterpolator"
|
||||||
|
key="[0.0, 0.5, 1.0]"
|
||||||
|
keyValue="[0.0, 0.4, 0.8]"
|
||||||
|
fieldToInterp="background.opacity" />
|
||||||
|
<Vector2DFieldInterpolator
|
||||||
|
id="translationInterpolator"
|
||||||
|
key="[0.0, 0.5, 1.0]"
|
||||||
|
keyValue="[[-470,0], [-235,0], [0,0]]"
|
||||||
|
fieldToInterp="container.translation" />
|
||||||
|
</Animation>
|
||||||
|
</children>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
import "pkg:/components/NodeByRef/NodeByRef.bs"
|
||||||
|
import "pkg:/source/utils/Logging.bs"
|
||||||
|
import "pkg:/source/utils/TimeUtils.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.durationRect = m.top.FindNode("durationRect")
|
||||||
|
m.durationLabel = m.top.FindNode("durationLabel")
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnContentSet() as void
|
||||||
|
content = m.top.itemContent
|
||||||
|
content = NodeByRef.Unwrap(content)
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.top.title = content.title
|
||||||
|
m.top.thumbnailUri = content.thumbnail
|
||||||
|
|
||||||
|
contentType = ValidString(content.type)
|
||||||
|
if contentType = "video" and ValidInt(content.lengthSeconds) <> 0
|
||||||
|
SetDurationText(content.lengthText)
|
||||||
|
m.top.durationRectVisible = true
|
||||||
|
else if contentType = "playlist" and not StringUtils.IsNullOrEmpty(content.videoCountText)
|
||||||
|
SetDurationText(content.videoCountText)
|
||||||
|
m.top.durationRectVisible = true
|
||||||
|
else
|
||||||
|
m.top.durationRectVisible = false
|
||||||
|
end if
|
||||||
|
|
||||||
|
SetHighlight()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function SetDurationText(text as string) as void
|
||||||
|
m.top.duration = text
|
||||||
|
|
||||||
|
label = m.durationLabel
|
||||||
|
rect = m.durationRect
|
||||||
|
|
||||||
|
if label = invalid or rect = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
rectParent = rect.getParent()
|
||||||
|
size = label.localBoundingRect()
|
||||||
|
|
||||||
|
rect.width = size.width + 16
|
||||||
|
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||||
|
end function
|
||||||
|
|
||||||
|
function SetHighlight() as void
|
||||||
|
content = m.top.itemContent
|
||||||
|
|
||||||
|
playQueueContent = content.getParent()
|
||||||
|
if playQueueContent = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
playQueue = playQueueContent.getParent()
|
||||||
|
if playQueue = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
playQueueIndex = playQueue.index
|
||||||
|
index = m.top.index
|
||||||
|
|
||||||
|
if playQueueIndex = index
|
||||||
|
' bs:disable-next-line LINT3023
|
||||||
|
m.top.thumbnailBlendColor = "#FFFFFFFF"
|
||||||
|
m.top.highlightUri = "pkg:/images/focus_grid.9.png"
|
||||||
|
else
|
||||||
|
m.top.thumbnailBlendColor = "#606060FF"
|
||||||
|
m.top.highlightUri = ""
|
||||||
|
end if
|
||||||
|
end function
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<component name="PlayQueueViewCell" extends="Group">
|
||||||
|
<interface>
|
||||||
|
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||||
|
<field id="index" type="integer" />
|
||||||
|
<field id="title" type="string" alias="titleLabel.text" />
|
||||||
|
<field id="thumbnailUri" type="uri" alias="thumbnailPoster.uri" />
|
||||||
|
<field id="thumbnailBlendColor" type="color" alias="thumbnailPoster.blendColor" />
|
||||||
|
<field id="highlightUri" type="uri" alias="highlightPoster.uri" />
|
||||||
|
<field id="duration" type="string" alias="durationLabel.text" />
|
||||||
|
<field id="durationRectVisible" type="boolean" alias="durationRect.visible" />
|
||||||
|
</interface>
|
||||||
|
<children>
|
||||||
|
<Poster
|
||||||
|
id="thumbnailPoster"
|
||||||
|
loadDisplayMode="scaleToZoom"
|
||||||
|
width="160"
|
||||||
|
height="90"
|
||||||
|
failedBitmapUri="pkg:/images/thumbnail-missing.jpg"
|
||||||
|
translation="[2,2]">
|
||||||
|
<Rectangle
|
||||||
|
id="durationRect"
|
||||||
|
width="60"
|
||||||
|
height="26"
|
||||||
|
color="0x000000"
|
||||||
|
opacity="0.8"
|
||||||
|
translation="[100, 58]">
|
||||||
|
<Label
|
||||||
|
height="26"
|
||||||
|
id="durationLabel"
|
||||||
|
horizAlign="center"
|
||||||
|
vertAlign="center"
|
||||||
|
font="font:SmallestSystemFont"
|
||||||
|
translation="[8, 0]" />
|
||||||
|
</Rectangle>
|
||||||
|
</Poster>
|
||||||
|
<Poster
|
||||||
|
id="highlightPoster"
|
||||||
|
blendColor="0xFF1C30"
|
||||||
|
width="164"
|
||||||
|
height="94" />
|
||||||
|
|
||||||
|
<Label
|
||||||
|
id="titleLabel"
|
||||||
|
width="260"
|
||||||
|
font="font:SmallestBoldSystemFont"
|
||||||
|
maxLines="3"
|
||||||
|
wrap="true"
|
||||||
|
translation="[172,2]" />
|
||||||
|
</children>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||||
|
|
||||||
|
namespace PlayQueueViewUtils
|
||||||
|
|
||||||
|
function Open(playQueue as object, appController as object) as object
|
||||||
|
playQueueView = CreateObject("roSGNode", "PlayQueueView")
|
||||||
|
playQueueView.appController = appController
|
||||||
|
playQueueView.playQueue = playQueue
|
||||||
|
appController@.PushScreen(playQueueView)
|
||||||
|
|
||||||
|
content = playQueue.content
|
||||||
|
index = playQueue.index
|
||||||
|
|
||||||
|
playQueueView.content = content
|
||||||
|
if index > -1 and index < content.GetChildCount()
|
||||||
|
playQueueView.jumpToItem = index
|
||||||
|
end if
|
||||||
|
|
||||||
|
playQueueView@.Show()
|
||||||
|
return playQueueView
|
||||||
|
end function
|
||||||
|
|
||||||
|
end namespace
|
||||||
@@ -27,7 +27,7 @@ function PlaylistContentTask(input as object) as object
|
|||||||
if not response.IsSuccess() or metadata = invalid
|
if not response.IsSuccess() or metadata = invalid
|
||||||
contentNode.loadState = FeedLoadState.Error
|
contentNode.loadState = FeedLoadState.Error
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false
|
||||||
error: response.ErrorMessage()
|
error: response.ErrorMessage()
|
||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace PlaylistUtils
|
|||||||
appController = m.appController
|
appController = m.appController
|
||||||
end if
|
end if
|
||||||
appController@.PushScreen(playlistView)
|
appController@.PushScreen(playlistView)
|
||||||
playlistView@.BindNode(invalid)
|
playlistView@.BindNode()
|
||||||
playlistView.content = contentNode
|
playlistView.content = contentNode
|
||||||
end function
|
end function
|
||||||
end namespace
|
end namespace
|
||||||
@@ -2,10 +2,11 @@ import "pkg:/components/ChannelView/ChannelUtils.bs"
|
|||||||
import "pkg:/components/ContextMenu/ContextMenuUtils.bs"
|
import "pkg:/components/ContextMenu/ContextMenuUtils.bs"
|
||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
import "pkg:/components/Navigation/LongPress.bs"
|
import "pkg:/components/Navigation/LongPress.bs"
|
||||||
import "pkg:/components/PlaylistView/PlaylistContentTask.bs"
|
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||||
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
||||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
import "pkg:/source/utils/ErrorUtils.bs"
|
import "pkg:/source/utils/ErrorUtils.bs"
|
||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
@@ -24,7 +25,7 @@ end function
|
|||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
m.list.ObserveField("itemFocused", FuncName(OnItemFocused))
|
m.list.ObserveField("itemFocused", FuncName(OnItemFocused))
|
||||||
InitializeLongPressTimer()
|
InitializeLongPress(["OK"])
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnFocusChange() as void
|
function OnFocusChange() as void
|
||||||
@@ -53,7 +54,9 @@ function OnContentSet() as void
|
|||||||
m.background.uri = content.thumbnailBackground
|
m.background.uri = content.thumbnailBackground
|
||||||
|
|
||||||
itemFocused = m.list.itemFocused
|
itemFocused = m.list.itemFocused
|
||||||
m.list.content = content
|
if not content.isSameNode(m.list.content)
|
||||||
|
m.list.content = content
|
||||||
|
end if
|
||||||
if itemFocused > -1 and content.getChildCount() > itemFocused
|
if itemFocused > -1 and content.getChildCount() > itemFocused
|
||||||
m.list.jumpToItem = itemFocused
|
m.list.jumpToItem = itemFocused
|
||||||
end if
|
end if
|
||||||
@@ -65,7 +68,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = LONG_PRESS_KEY and press
|
if key = OK_LONG_PRESS_KEY and press
|
||||||
OnItemLongPressed(m.list.itemFocused)
|
OnItemLongPressed(m.list.itemFocused)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
@@ -89,9 +92,10 @@ end function
|
|||||||
function Close()
|
function Close()
|
||||||
if m.playlistLoadTask <> invalid
|
if m.playlistLoadTask <> invalid
|
||||||
m.playlistLoadTask.cancel = true
|
m.playlistLoadTask.cancel = true
|
||||||
|
m.playlistLoadTask = invalid
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.appController@.PopScreen(invalid)
|
m.appController@.PopScreen()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnItemFocused()
|
function OnItemFocused()
|
||||||
@@ -219,8 +223,8 @@ function LoadPlaylist() as void
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
m.top.content.loadState = FeedLoadState.Loading
|
m.top.content.loadState = FeedLoadState.Loading
|
||||||
m.playlistLoadTask = StartAsyncTask(PlaylistContentTask, {
|
m.playlistLoadTask = AsyncTask.Start(Tasks.PlaylistContentTask, {
|
||||||
content: m.top.content,
|
content: m.top.content
|
||||||
invidious: m.top.invidious
|
invidious: m.top.invidious
|
||||||
}, OnPlaylistContentTaskResult)
|
}, OnPlaylistContentTaskResult)
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -39,5 +39,5 @@ function SetDurationText(text as string) as void
|
|||||||
size = label.localBoundingRect()
|
size = label.localBoundingRect()
|
||||||
|
|
||||||
rect.width = size.width + 16
|
rect.width = size.width + 16
|
||||||
rect.translation = [rectParent.width - rect.width, 72]
|
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||||
end function
|
end function
|
||||||
@@ -1,22 +1,38 @@
|
|||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.displayNames = {
|
' TODO:P2 Add tooltip to each field with description of what it means
|
||||||
"version": "Playlet Version",
|
m.displayNames = [{
|
||||||
"lib_version": "Playlet Library Version",
|
key: "app_version"
|
||||||
"lib_version_latest": "Playlet Library Latest Version",
|
displayText: "Playlet App Version"
|
||||||
"lib_url": "Playlet Library URL",
|
}, {
|
||||||
"lib_url_type": "Playlet Library URL Type",
|
key: "lib_version"
|
||||||
"git_commit_hash": "Playlet Git Commit Hash",
|
displayText: "Playlet Library Version"
|
||||||
"lib_git_commit_hash": "Playlet Library Git Commit Hash",
|
}, {
|
||||||
"id": "App ID"
|
key: "lib_version_latest"
|
||||||
}
|
displayText: "Playlet Library Latest Version"
|
||||||
|
}, {
|
||||||
|
key: "lib_url"
|
||||||
|
displayText: "Playlet Library URL"
|
||||||
|
}, {
|
||||||
|
key: "lib_url_type"
|
||||||
|
displayText: "Playlet Library URL Type"
|
||||||
|
}, {
|
||||||
|
key: "app_git_commit_hash"
|
||||||
|
displayText: "Playlet App Git Commit Hash"
|
||||||
|
}, {
|
||||||
|
key: "lib_git_commit_hash"
|
||||||
|
displayText: "Playlet Library Git Commit Hash"
|
||||||
|
}, {
|
||||||
|
key: "id"
|
||||||
|
displayText: "App ID"
|
||||||
|
}]
|
||||||
|
|
||||||
m.keyValueList = m.top.findNode("KeyValueListContent")
|
m.keyValueList = m.top.findNode("KeyValueListContent")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
m.appInfo = m.applicationInfo@.GetAppInfo(invalid)
|
m.appInfo = m.applicationInfo@.GetAppInfo()
|
||||||
|
|
||||||
UpdateKeyValueList()
|
UpdateKeyValueList()
|
||||||
|
|
||||||
@@ -35,8 +51,8 @@ function UpdateKeyValueList()
|
|||||||
m.keyValueList.removeChildIndex(0)
|
m.keyValueList.removeChildIndex(0)
|
||||||
end while
|
end while
|
||||||
|
|
||||||
for each item in m.appInfo
|
for each item in m.displayNames
|
||||||
value = `${m.displayNames[item]}: ${m.appInfo[item]}`
|
value = `${item.displayText}: ${m.appInfo[item.key]}`
|
||||||
contentNode = m.keyValueList.createChild("ContentNode")
|
contentNode = m.keyValueList.createChild("ContentNode")
|
||||||
contentNode.title = value
|
contentNode.title = value
|
||||||
end for
|
end for
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function OnNodeReady()
|
|||||||
SetNavigation(invalid, "back", m.navBar)
|
SetNavigation(invalid, "back", m.navBar)
|
||||||
SetNavigation(invalid, "left", m.navBar)
|
SetNavigation(invalid, "left", m.navBar)
|
||||||
|
|
||||||
m.rowList@.BindNode(invalid)
|
m.rowList@.BindNode()
|
||||||
|
|
||||||
OnBookmarksChange()
|
OnBookmarksChange()
|
||||||
m.bookmarks.ObserveField("contentChange", FuncName(OnBookmarksChange))
|
m.bookmarks.ObserveField("contentChange", FuncName(OnBookmarksChange))
|
||||||
@@ -41,7 +41,7 @@ function OnVisibleChange()
|
|||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function Refresh(unused as dynamic)
|
function Refresh(_unused as dynamic)
|
||||||
m.isDirty = true
|
m.isDirty = true
|
||||||
OnBookmarksChange()
|
OnBookmarksChange()
|
||||||
end function
|
end function
|
||||||
@@ -79,7 +79,7 @@ function SetRowListContent(bookmarksContent as object)
|
|||||||
end for
|
end for
|
||||||
|
|
||||||
feeds.push({
|
feeds.push({
|
||||||
"title": bookmarkGroupNode.title,
|
"title": bookmarkGroupNode.title
|
||||||
"feedSources": feedSources
|
"feedSources": feedSources
|
||||||
})
|
})
|
||||||
end for
|
end for
|
||||||
|
|||||||