Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59d640b14e | ||
|
|
65509298a3 | ||
|
|
d915efd2b1 | ||
|
|
27fc34338d | ||
|
|
84a860cd6c | ||
|
|
a1a3ce686e | ||
|
|
e229a8e929 | ||
|
|
b9b97c67fd | ||
|
|
37b3e88b93 | ||
|
|
38e8856b09 | ||
|
|
ebc5d81180 | ||
|
|
896d0b9bf3 | ||
|
|
9143185a30 | ||
|
|
d357a366e6 | ||
|
|
a14701c90f | ||
|
|
e2c977c6e1 | ||
|
|
52df36055f | ||
|
|
6f4b1d23aa | ||
|
|
8afd01af97 | ||
|
|
3ec74250bf | ||
|
|
8d0aee81b8 | ||
|
|
60a5cc0ef9 | ||
|
|
b5a1fd563d | ||
|
|
2c24c0cb5a | ||
|
|
a50fa3c347 | ||
|
|
d223624f2e | ||
|
|
3cc5d3e00a | ||
|
|
90828da7e2 | ||
|
|
fe463cbf3f | ||
|
|
c2d4d7fc79 | ||
|
|
c1a7765944 | ||
|
|
967d1840d0 | ||
|
|
ee8f7a05dd | ||
|
|
5c215ca974 | ||
|
|
43b62a0ef8 | ||
|
|
e34a9c989f | ||
|
|
ac9ac26b70 | ||
|
|
a503317d23 | ||
|
|
cda6c6a31e | ||
|
|
3fd3db5710 | ||
|
|
3f4e0e9a0f | ||
|
|
6d1a38b6c1 | ||
|
|
47e929b9ad | ||
|
|
7f33e81ed8 | ||
|
|
62bda2433e | ||
|
|
0db0843227 | ||
|
|
a2fec3b40d | ||
|
|
8d6e888208 | ||
|
|
e51ca9f76a | ||
|
|
7b84538060 | ||
|
|
0912354088 | ||
|
|
417426b1e9 | ||
|
|
bf963693d1 | ||
|
|
f89e9f59ca | ||
|
|
bbd2d9c756 | ||
|
|
cb7a043fb1 | ||
|
|
33ee04fed6 | ||
|
|
cb7e6e4987 | ||
|
|
feb58d5209 | ||
|
|
52f88ac611 | ||
|
|
ead183f9dc | ||
|
|
2a3e755953 | ||
|
|
417d4b6954 | ||
|
|
a6d8a12bc7 | ||
|
|
e6d1fa12d5 | ||
|
|
efa4db80de | ||
|
|
4cf4b9e45f | ||
|
|
f9bcf1ff78 | ||
|
|
a8a4915d0e | ||
|
|
d72c987c33 | ||
|
|
a4c4f3d622 | ||
|
|
91a62cd3ac | ||
|
|
057b1fa1ee | ||
|
|
090d96c602 | ||
|
|
1afd295c7c | ||
|
|
0d4c224703 | ||
|
|
ca1399c60c | ||
|
|
1acf1da00d | ||
|
|
55c811adb7 | ||
|
|
0bbb876a84 | ||
|
|
8b15d1113b | ||
|
|
ff35ad61ab | ||
|
|
b8fd099d5c | ||
|
|
795435ff4b | ||
|
|
7ce5105434 | ||
|
|
71f32d1305 | ||
|
|
ff1ef8c9d8 | ||
|
|
aebb79a738 | ||
|
|
7bf54c4357 | ||
|
|
0366e54a80 | ||
|
|
015e84b41e | ||
|
|
b254a1fe93 | ||
|
|
18445fdcc4 | ||
|
|
9af9033462 | ||
|
|
6ef038492c | ||
|
|
1606ea9e2c | ||
|
|
30a75dc229 | ||
|
|
6a13575681 | ||
|
|
1f67b307f1 | ||
|
|
37bce62b14 | ||
|
|
5dbc8611ed | ||
|
|
4151b39456 | ||
|
|
b59a0797c9 | ||
|
|
a5766c41ce | ||
|
|
383522372f | ||
|
|
92d8cc4f55 | ||
|
|
07b4fb7a60 | ||
|
|
e49f1e3023 | ||
|
|
83d0b707b5 | ||
|
|
ad23a85e4f | ||
|
|
da417f4fb2 | ||
|
|
797b536380 | ||
|
|
8016d66a46 | ||
|
|
b08e7c07f3 | ||
|
|
a018264f76 | ||
|
|
416a1b86d4 | ||
|
|
2e826e02cd | ||
|
|
c156865de7 | ||
|
|
faa4b928d9 | ||
|
|
254efb289d | ||
|
|
151d05831c | ||
|
|
e35fad7d9c | ||
|
|
f15202593b | ||
|
|
58b3405cdc | ||
|
|
2b1e0fa154 | ||
|
|
8a9f0e4dfa | ||
|
|
7ebccaa812 | ||
|
|
23336c36e8 | ||
|
|
117fe0ce81 | ||
|
|
005bf0146d | ||
|
|
3697eafc43 | ||
|
|
c741466a85 | ||
|
|
1cbb52fad4 | ||
|
|
b534ea68db | ||
|
|
dc7cded3f5 | ||
|
|
76a57af5a0 | ||
|
|
e73fc9ab72 | ||
|
|
cac9090f4d | ||
|
|
b8ed900769 | ||
|
|
5b452d527e | ||
|
|
900881e649 | ||
|
|
2a2cdd8652 | ||
|
|
15d06c0432 | ||
|
|
ad99fbbf03 | ||
|
|
d6005115a2 | ||
|
|
c36745c6aa | ||
|
|
595bd87970 | ||
|
|
fcf0334667 | ||
|
|
a0b6175858 | ||
|
|
99be2071d1 | ||
|
|
305ddaa737 | ||
|
|
20816d09f7 | ||
|
|
839f49888f | ||
|
|
b67587df2b | ||
|
|
e5062c34d7 | ||
|
|
29f5373492 | ||
|
|
f17e93936c | ||
|
|
c69ab716f5 | ||
|
|
bd389473e5 | ||
|
|
cfa7662f2e | ||
|
|
609c4622fd | ||
|
|
45262c6394 | ||
|
|
7ce3b2636c | ||
|
|
a75ce42373 | ||
|
|
fd8b61ad44 | ||
|
|
3391e3d787 | ||
|
|
862fea74e7 | ||
|
|
de4f64d38f | ||
|
|
aab99b2a2e | ||
|
|
51eb7bdfa2 | ||
|
|
3d52d00bde | ||
|
|
bd26e727c1 | ||
|
|
3b622f65f3 | ||
|
|
615439650e | ||
|
|
25330a6494 | ||
|
|
37e429f648 | ||
|
|
6e6ea94544 | ||
|
|
42dadec020 | ||
|
|
019fde1e67 | ||
|
|
fb0b1b8894 | ||
|
|
66df27cf0b | ||
|
|
feb968a72e | ||
|
|
9061275d6f | ||
|
|
059167ac56 | ||
|
|
7330b321a5 | ||
|
|
9a7db6aab2 | ||
|
|
48993dd9f5 | ||
|
|
7d9817994c | ||
|
|
403ed94e97 | ||
|
|
67252cd5d5 | ||
|
|
e4efc6832f | ||
|
|
13138740fb | ||
|
|
b37b89bffc | ||
|
|
888f7da214 | ||
|
|
750e24f724 | ||
|
|
bfd4f3e298 | ||
|
|
7b7801d7a5 | ||
|
|
ffb84d1c89 | ||
|
|
d29e51c7f2 | ||
|
|
b72a6d4614 | ||
|
|
289b845876 | ||
|
|
910d57795a | ||
|
|
ef733d8d88 | ||
|
|
6ad42f3fcd | ||
|
|
1ba5184d95 | ||
|
|
26ed985ecc | ||
|
|
6b47440cb5 | ||
|
|
ee3312763d | ||
|
|
7bb73e0fb6 | ||
|
|
f71ad7b873 | ||
|
|
0f6329997d | ||
|
|
58918f68fb | ||
|
|
8a63bc848d | ||
|
|
9315fa6cf7 | ||
|
|
15841cf5bf | ||
|
|
9c7de8f41f | ||
|
|
405e1aa703 | ||
|
|
79d9e0f069 | ||
|
|
d8bfd8859e | ||
|
|
1c8d075e87 | ||
|
|
13bb21c1f7 | ||
|
|
394dd23999 | ||
|
|
8e03ca0ea6 | ||
|
|
aebdc579a9 | ||
|
|
87e7d91169 | ||
|
|
c334736325 | ||
|
|
bb0a0725d6 | ||
|
|
f2ffb42876 | ||
|
|
edbfc86e56 | ||
|
|
b25eaafc82 | ||
|
|
ef9c653ad7 | ||
|
|
e9f015bb19 | ||
|
|
544671f246 | ||
|
|
f45ba30979 | ||
|
|
4953e4481f | ||
|
|
c7b0815768 | ||
|
|
4ab7f74a4e | ||
|
|
96916f6c37 | ||
|
|
eafad684b6 | ||
|
|
14d3e38aeb | ||
|
|
afe281c094 |
No files matched your search
@@ -24,10 +24,10 @@ jobs:
|
|||||||
git config --local user.email "githubaction@githubaction.com"
|
git config --local user.email "githubaction@githubaction.com"
|
||||||
git config --local user.name "github-action linter"
|
git config --local user.name "github-action linter"
|
||||||
|
|
||||||
- name: Use Node.js 18.x
|
- name: Use Node.js 20.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 20.x
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
name: Release trigger
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "Release version (X.Y.Z)"
|
||||||
|
required: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-pr:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Use Node.js 20.x
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20.x
|
||||||
|
cache: "npm"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Set package version
|
||||||
|
run: npm version ${{ github.event.inputs.version }} --no-git-tag-version
|
||||||
|
|
||||||
|
# Replace "## [Unreleased]" with "## [X.Y.Z] - YYYY-MM-DD" in CHANGELOG.md
|
||||||
|
- name: Set changelog version
|
||||||
|
run: |
|
||||||
|
sed -i "s/## \[Unreleased\]/## \[${{ github.event.inputs.version }}\] - $(date +%Y-%m-%d)/" CHANGELOG.md
|
||||||
|
|
||||||
|
# Building for release should sync the version in multiple files, and then fail if there are any changes.
|
||||||
|
- name: Build for release
|
||||||
|
run: npm run build:release || exit 0
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v5
|
||||||
|
with:
|
||||||
|
commit-message: "Release v${{ github.event.inputs.version }}"
|
||||||
|
branch: release/${{ github.event.inputs.version }}
|
||||||
|
title: "Release v${{ github.event.inputs.version }}"
|
||||||
|
body: "Release ${{ github.event.inputs.version }}. See CHANGELOG.md and roadmap #6 for details."
|
||||||
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
@@ -17,26 +17,36 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Use Node.js 18.x
|
- name: Use Node.js 20.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 20.x
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build tests
|
- name: Run tests
|
||||||
run: npm run test:build
|
run: npm run test
|
||||||
|
env:
|
||||||
|
ROKU_DEV_TARGET: ${{ secrets.ROKU_DEV_TARGET }}
|
||||||
|
ROKU_DEV_TARGET_PORT: ${{ secrets.ROKU_DEV_TARGET_PORT }}
|
||||||
|
ROKU_DEVPASSWORD: ${{ secrets.ROKU_DEVPASSWORD }}
|
||||||
|
ROKU_DEV_TARGET_TELNET_PORT: ${{ secrets.ROKU_DEV_TARGET_TELNET_PORT }}
|
||||||
|
|
||||||
- name: Build Playlet
|
- name: Build Playlet for release
|
||||||
run: npm run build:release:ci
|
run: npm run build:release
|
||||||
|
env:
|
||||||
|
ROKU_DEV_TARGET: ${{ secrets.ROKU_DEV_TARGET }}
|
||||||
|
ROKU_DEV_TARGET_PORT: ${{ secrets.ROKU_DEV_TARGET_PORT }}
|
||||||
|
ROKU_DEVPASSWORD: ${{ secrets.ROKU_DEVPASSWORD }}
|
||||||
|
ROKU_SIGN_PASSWORD: ${{ secrets.ROKU_SIGN_PASSWORD }}
|
||||||
|
|
||||||
- name: Use Java 17
|
- name: Use Java 21
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
java-version: "17"
|
java-version: "21"
|
||||||
|
|
||||||
- name: Download the Static Channel Analysis CLI
|
- name: Download the Static Channel Analysis CLI
|
||||||
run: |
|
run: |
|
||||||
@@ -70,6 +80,6 @@ jobs:
|
|||||||
run: sleep 10
|
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.squashfs.pkg ./release/playlet-lib.zip ./release/playlet-lib.squashfs.pkg --notes-file docs/canary-changelog.md --prerelease --title Canary
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
@@ -24,10 +24,10 @@ jobs:
|
|||||||
git config --local user.name "github-action wiki updater"
|
git config --local user.name "github-action wiki updater"
|
||||||
working-directory: ./playlet.wiki
|
working-directory: ./playlet.wiki
|
||||||
|
|
||||||
- name: Use Node.js 18.x
|
- name: Use Node.js 20.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 20.x
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Use Node.js 18.x
|
- name: Use Node.js 20.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 20.x
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -24,9 +24,6 @@ jobs:
|
|||||||
- name: Update dependencies
|
- name: Update dependencies
|
||||||
run: npm run update-deps
|
run: npm run update-deps
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm i
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v5
|
uses: peter-evans/create-pull-request@v5
|
||||||
with:
|
with:
|
||||||
@@ -34,3 +31,4 @@ jobs:
|
|||||||
branch: chore/update-deps
|
branch: chore/update-deps
|
||||||
title: "[chore] update dependencies"
|
title: "[chore] update dependencies"
|
||||||
body: "Weekly pull request to update dependencies."
|
body: "Weekly pull request to update dependencies."
|
||||||
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"**/locale/**/*.ts": "xml"
|
||||||
|
},
|
||||||
"brightscript.output.clearConsoleOnChannelStart": false,
|
"brightscript.output.clearConsoleOnChannelStart": false,
|
||||||
"brightscript.bsdk": "node_modules/brighterscript",
|
"brightscript.bsdk": "node_modules/brighterscript",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
|
|||||||
@@ -2,9 +2,220 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
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.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.24.6] - 2024-07-08
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug where a the right video will not play if selected too quickly
|
||||||
|
- A bug where a bookmarked but deleted playlist can't be removed from bookmarks
|
||||||
|
|
||||||
|
## [0.24.5] - 2024-07-03
|
||||||
|
|
||||||
|
- Additional Spanish (Mexico) translations (Thanks to Jean Carton)
|
||||||
|
|
||||||
|
## [0.24.4] - 2024-06-24
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Additional Spanish (Mexico) translations (Thanks to Jean Carton)
|
||||||
|
- Partial Portuguese (Brazil) translations (Thanks to Bruno Fernandes)
|
||||||
|
|
||||||
|
## [0.24.3] - 2024-06-20
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Additional Spanish (Mexico) translations (Thanks to Jean Carton)
|
||||||
|
|
||||||
|
## [0.24.2] - 2024-06-16
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Partial Spanish (Mexico) translations (Thanks to Jean Carton)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- An issue where pause/play would not work with picture-in-picture on certain views
|
||||||
|
|
||||||
|
## [0.24.1] - 2024-06-09
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- A link to [https://github.com/iBicha/playlet/issues/400](https://github.com/iBicha/playlet/issues/400) in error dialog
|
||||||
|
|
||||||
|
## [0.24.0] - 2024-06-08
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Low memory warnings to the app logs for easier memory issue debugging
|
||||||
|
- German translations (Thanks to Lacey Anaya)
|
||||||
|
- Sliding navbar (primarily to support German as it has longer words for the menu screens)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Some UI refactors to support the different languages (English, French, German)
|
||||||
|
|
||||||
|
## [0.23.7] - 2024-05-28
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- A clock to show the time
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Attempt to fix a race condition when closing player
|
||||||
|
|
||||||
|
## [0.23.6] - 2024-05-23
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- A dev setting to clear the cache
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug where bookmarked channels can be duplicated
|
||||||
|
- A bug where video cast from web app would not play if there's an error dialog on screen
|
||||||
|
- failed to create media player error, by waiting for previous video to stop before starting a new one
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Font weight to be less bold
|
||||||
|
|
||||||
|
## [0.23.5] - 2024-05-19
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- a bug where trending and search wouldn't work in certain countries (web app)
|
||||||
|
- A crash when lounge session is lost and fails to recover
|
||||||
|
- A bug where live videos to not start at the "edge" of the stream
|
||||||
|
|
||||||
|
## [0.23.4] - 2024-05-04
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- An invidious instance "fetch with CORS" test
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- a bug where public Invidious instances all showed `N/A` in the health column
|
||||||
|
- a bug where trending and search wouldn't work in certain countries
|
||||||
|
|
||||||
|
## [0.23.3] - 2024-04-28
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Removed announcement - most public instances are now updated
|
||||||
|
|
||||||
|
## [0.23.2] - 2024-04-27
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated announcement
|
||||||
|
|
||||||
|
## [0.23.1] - 2024-04-24
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Announcement dialog to indicate outage
|
||||||
|
|
||||||
|
## [0.23.0] - 2024-04-04
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Loading Playlet lib as squashfs, with fallback to the zip file. This significantly decreases load times.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Bumped minimum OS version to 11, this is required for squashfs-zstd
|
||||||
|
|
||||||
|
## [0.22.3] - 2024-03-31
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Removed announcement
|
||||||
|
|
||||||
|
## [0.22.2] - 2024-03-31
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated announcement
|
||||||
|
|
||||||
|
## [0.22.1] - 2024-03-30
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Announcement dialog to indicate outage
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- [Attempt] A bug where the lounge would randomly lose the session id, making it unable to cast, and spam the same error over and over
|
||||||
|
- Dialog with timer now stops as expected if any button is pressed
|
||||||
|
|
||||||
|
## [0.22.0] - 2024-03-24
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Context menu sort options for channel videos and playlists
|
||||||
|
- Localization support and French translations
|
||||||
|
- Channel releases
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Colors to be more broadcast safe
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug where instance testing is not immediately cancelled when the testing page is closed
|
||||||
|
- A bug in the web app where "upcoming" videos show up as "live"
|
||||||
|
- Search sort filters
|
||||||
|
|
||||||
|
## [0.21.2] - 2024-03-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Deeplinking required for certification
|
||||||
|
|
||||||
|
## [0.21.1] - 2024-03-09
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Subscriber count in the channel page
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug where videos that did not premiere yet would error with a playback error
|
||||||
|
- A bug where a playback error dialog is dismissed too fast before playing the next video
|
||||||
|
|
||||||
|
## [0.21.0] - 2024-03-07
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Support for multiple profiles. You can now use multiple Invidious accounts.
|
||||||
|
- When a video error dialog shows, a timer with 10 seconds starts to play the next video
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug where the loading screen does not disappear if search results are empty.
|
||||||
|
- Empty invidious instance in preferences when default instance is being used
|
||||||
|
|
||||||
|
## [0.20.2] - 2024-02-26
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Small improvement in the context menu of the Playlist view
|
||||||
|
- Videos can be paused and resumed using the `OK` remote button
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- `Device connected` notification only show once every 30 minutes per device to avoid spam
|
||||||
|
- SponsorBlock category "highlight" was not visible in chapter label
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- UI focus images are now with rounded corners, and with a slight glow
|
||||||
|
|
||||||
## [0.20.1] - 2024-02-23
|
## [0.20.1] - 2024-02-23
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@@ -96,7 +307,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- If you like to add these two feeds to your bookmarks:
|
- If you like to add these two feeds to your bookmarks:
|
||||||
- Search for `Funny` (or `News`)
|
- Search for `Funny` (or `News`)
|
||||||
- Set the `Sort by` filter to `Upload date`
|
- Set the `Sort by` filter to `Upload date`
|
||||||
- Press and hold the `Ok` button while a video from the search result is selected
|
- Press and hold the `OK` button while a video from the search result is selected
|
||||||
- Choose the `Add to "Search - Funny"` option
|
- Choose the `Add to "Search - Funny"` option
|
||||||
|
|
||||||
## [0.18.0] - 2023-12-28
|
## [0.18.0] - 2023-12-28
|
||||||
@@ -341,7 +552,7 @@ This version went through a major refactor, which resulted in a different arcite
|
|||||||
- It reads the response data, headers, error codes and etc even if they are not needed
|
- It reads the response data, headers, error codes and etc even if they are not needed
|
||||||
- Excessive logging without a way to toggle it, or redirect it to a file
|
- Excessive logging without a way to toggle it, or redirect it to a file
|
||||||
- Some unused parts of the code (Like basic auth in the server, WebSockets, RegistryRouter, Kanji QR Code)
|
- Some unused parts of the code (Like basic auth in the server, WebSockets, RegistryRouter, Kanji QR Code)
|
||||||
- These were unsued and/or feature flagged features. Things can be restored as needed.
|
- These were unused and/or feature flagged features. Things can be restored as needed.
|
||||||
- The video player loading spinner when the video is minimized: this added too much hacky code with minimum value.
|
- The video player loading spinner when the video is minimized: this added too much hacky code with minimum value.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ could be public instances hosted by volenteers. These instances are available
|
|||||||
[here](https://api.invidious.io/).
|
[here](https://api.invidious.io/).
|
||||||
|
|
||||||
While invidious does no data collection by default, and it is in fact built to
|
While invidious does no data collection by default, and it is in fact built to
|
||||||
be privacy driven, but in theory, from a playlet request it is possible to
|
be privacy driven, but in theory, from a Playlet request it is possible to
|
||||||
know the IP address of a user, the identifiers of watched video, and search
|
know the IP address of a user, the identifiers of watched video, and search
|
||||||
keywords. In case the user has privacy concerns, they can host their own
|
keywords. In case the user has privacy concerns, they can host their own
|
||||||
Invidious instance and use it from Playlet.
|
Invidious instance and use it from Playlet.
|
||||||
@@ -39,7 +39,7 @@ user privacy.
|
|||||||
Additionally, Playlet may send a "skipped" event to SponsorBlock, to indicate
|
Additionally, Playlet may send a "skipped" event to SponsorBlock, to indicate
|
||||||
that a section of a video has been skipped. This event does not have any
|
that a section of a video has been skipped. This event does not have any
|
||||||
tracking information attached to it, and it is anonymous. It is merely to
|
tracking information attached to it, and it is anonymous. It is merely to
|
||||||
indicate to contributers how much their contributions are being used in the wild.
|
indicate to contributors how much their contributions are being used in the wild.
|
||||||
|
|
||||||
## LeanBack
|
## LeanBack
|
||||||
|
|
||||||
@@ -47,6 +47,6 @@ LeanBack, also known as Lounge API, also known as "cast from phone". Is a featur
|
|||||||
When this feature is used, all traffic related to the videos being watched, added to the queue, and the video player state is routed through YouTube servers.
|
When this feature is used, all traffic related to the videos being watched, added to the queue, and the video player state is routed through YouTube servers.
|
||||||
|
|
||||||
Playlet tries to preserve user privacy, to the best of its ability, by implementing several techniques, such as randomizing device id, using a fresh session on each start, and only providing necessary fields for the feature to function.
|
Playlet tries to preserve user privacy, to the best of its ability, by implementing several techniques, such as randomizing device id, using a fresh session on each start, and only providing necessary fields for the feature to function.
|
||||||
Additionally, Playlet does not join a session/lounge, until a device is attempting to connect using DIAL (**DI**scovery **A**nd **L**aunch spec), or when a `Link with TV code` is generated, by visiting the appropriate settings page.
|
Additionally, Playlet does not join a session/lounge, until a device is attempting to connect using DIAL (**DI**scovery **A**nd **L**aunch spec) also know sa "Connect with Wi-Fi", or when a `Link with TV code` is generated, by visiting the appropriate settings page.
|
||||||
|
|
||||||
If you have privacy concerns and do not wish to use this functionality, simply do not connect from a local network using the YouTube app or the browser, and do not visit the `Link with TV code` tab.
|
If you have privacy concerns and do not wish to use this functionality, simply do not connect from a local network using the YouTube app or the browser, and do not visit the `Link with TV code` tab.
|
||||||
@@ -7,7 +7,10 @@
|
|||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/iBicha/playlet/releases">
|
<a href="https://github.com/iBicha/playlet/releases">
|
||||||
<img alt="Current Release" src="https://img.shields.io/github/release/iBicha/playlet.svg"/>
|
<img alt="Current Release" src="https://img.shields.io/github/release/iBicha/playlet.svg"/>
|
||||||
<img alt="Total Downloads" src="https://img.shields.io/github/downloads/iBicha/playlet/latest/playlet-lib.zip.svg"/>
|
<img alt="Total Downloads" src="https://img.shields.io/github/downloads/iBicha/playlet/latest/playlet-lib.squashfs.pkg.svg"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://hosted.weblate.org/engage/playlet/">
|
||||||
|
<img src="https://hosted.weblate.org/widget/playlet/svg-badge.svg" alt="Translation status" />
|
||||||
</a>
|
</a>
|
||||||
<a href="/LICENSE">
|
<a href="/LICENSE">
|
||||||
<img alt="AGPL-3.0 license" src="https://img.shields.io/github/license/iBicha/playlet.svg"/>
|
<img alt="AGPL-3.0 license" src="https://img.shields.io/github/license/iBicha/playlet.svg"/>
|
||||||
@@ -15,6 +18,9 @@
|
|||||||
<a href="https://channelstore.roku.com/en-ca/details/840aec36f51bfe6d96cf6db9055a372a/playlet">
|
<a href="https://channelstore.roku.com/en-ca/details/840aec36f51bfe6d96cf6db9055a372a/playlet">
|
||||||
<img alt="Roku Channel Store" src="https://img.shields.io/badge/Roku%20Store-Install-blueviolet?logo=roku&logoColor=blueviolet&labelColor=white"/>
|
<img alt="Roku Channel Store" src="https://img.shields.io/badge/Roku%20Store-Install-blueviolet?logo=roku&logoColor=blueviolet&labelColor=white"/>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/iBicha/playlet/wiki">
|
||||||
|
<img alt="Channel Stats" src="https://img.shields.io/badge/%F0%9F%93%88-channel_stats-blue"/>
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# Playlet
|
# Playlet
|
||||||
@@ -40,11 +46,12 @@ More under [Screenshots](./docs/screenshots/README.md)
|
|||||||
|
|
||||||
- 🔥 No Ads (Not now, not ever)
|
- 🔥 No Ads (Not now, not ever)
|
||||||
- 🕵️ No Tracking
|
- 🕵️ No Tracking
|
||||||
- 🛡️ Privacy driven (uses Invidious backend)
|
- 🛡️ Privacy driven (uses [Invidious](https://invidious.io/) backend)
|
||||||
- ⚔️ SponsorBlock integration (skips undesirable sections in videos)
|
- ⚔️ [SponsorBlock](https://sponsor.ajay.app/) integration (skips undesirable sections in videos)
|
||||||
- 📱 Browse, search, and cast from phone using the YouTube app or the browser
|
- 📱 Browse, search, and cast from phone using the YouTube app or the browser
|
||||||
- 🔮 Picture-in-picture mode
|
- 🔮 Picture-in-picture mode
|
||||||
- ⚡ Fast! [Check out how we compare with the official YouTube app](https://youtu.be/qmSvA-QQW20)
|
- ⚡ Fast! [Check out how we compare with the official YouTube app](https://youtu.be/qmSvA-QQW20)
|
||||||
|
- 🔤 Translated using [Weblate](https://hosted.weblate.org/projects/playlet/playlet/)
|
||||||
|
|
||||||
### Cast from phone
|
### Cast from phone
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,18 @@
|
|||||||
"regex": "\\b(?!_unused)unused\\b",
|
"regex": "\\b(?!_unused)unused\\b",
|
||||||
"regexFlags": "ig",
|
"regexFlags": "ig",
|
||||||
"message": "unused args should start with _ (e.g. _unused)"
|
"message": "unused args should start with _ (e.g. _unused)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "NO_OPTIONAL_CHAINING",
|
||||||
|
"regex": "\\?[\\.|\\[|\\(|@]",
|
||||||
|
"regexFlags": "ig",
|
||||||
|
"message": "No optional chaning (var1?.property). Do a type check instead."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "NO_TRANSLATE_STRING_LITERAL",
|
||||||
|
"regex": "\\bTr\\s*\\(\\s*\"[^\\\"]*\"\\s*\\)",
|
||||||
|
"regexFlags": "ig",
|
||||||
|
"message": "Tr(\"String\") is not allowed. Use Tr(Locale.Key) instead."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
@@ -50,6 +62,7 @@
|
|||||||
"!**/*.psd",
|
"!**/*.psd",
|
||||||
"!**/*.svg",
|
"!**/*.svg",
|
||||||
"!**/*.svg.meta.json5",
|
"!**/*.svg.meta.json5",
|
||||||
|
"locale/**",
|
||||||
"config/**",
|
"config/**",
|
||||||
"lib/**",
|
"lib/**",
|
||||||
"www/**",
|
"www/**",
|
||||||
@@ -73,7 +86,8 @@
|
|||||||
"../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",
|
"../tools/bs-plugins/type-gen-plugin.ts",
|
||||||
"../tools/bs-plugins/web-server-plugin.ts"
|
"../tools/bs-plugins/web-server-plugin.ts",
|
||||||
|
"../tools/bs-plugins/locale-validation-plugin.ts"
|
||||||
],
|
],
|
||||||
"retainStagingDir": true,
|
"retainStagingDir": true,
|
||||||
"require": [
|
"require": [
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"!**/*.psd",
|
"!**/*.psd",
|
||||||
"!**/*.svg",
|
"!**/*.svg",
|
||||||
"!**/*.svg.meta.json5",
|
"!**/*.svg.meta.json5",
|
||||||
|
"locale/**",
|
||||||
"config/**",
|
"config/**",
|
||||||
"lib/**",
|
"lib/**",
|
||||||
"www/**",
|
"www/**",
|
||||||
@@ -29,7 +30,8 @@
|
|||||||
"../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",
|
"../tools/bs-plugins/type-gen-plugin.ts",
|
||||||
"../tools/bs-plugins/web-server-plugin.ts"
|
"../tools/bs-plugins/web-server-plugin.ts",
|
||||||
|
"../tools/bs-plugins/locale-validation-plugin.ts"
|
||||||
],
|
],
|
||||||
"rooibos": {
|
"rooibos": {
|
||||||
"logLevel": 2,
|
"logLevel": 2,
|
||||||
|
|||||||
@@ -294,14 +294,20 @@ This is mostly useful to QA the `canary` release (see [Canary release](https://e
|
|||||||
|
|
||||||
#### In case of a softlock
|
#### In case of a softlock
|
||||||
|
|
||||||
If the dev menu is used to load a custom Playlet lib url, but the lib does not have a functionality to revert back:
|
If the dev menu is used to load a custom Playlet lib url, but you couldn't revert back:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/dev?clearPlayletLibUrls=true"
|
curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/693751?clearPlayletLibUrls=true"
|
||||||
```
|
```
|
||||||
|
|
||||||
This will remove the custom lib, and revert to using default (latest release from Github).
|
This will remove the custom lib, and revert to using default (latest release from Github).
|
||||||
|
|
||||||
|
If you need to clear all the data from the registry, use
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/693751?clearRegistry=true"
|
||||||
|
```
|
||||||
|
|
||||||
## CI/CD
|
## CI/CD
|
||||||
|
|
||||||
On pull requests, a Github action will run `lint:fix` and `format:fix` and push changes to the PR branch, to keep things tidy.
|
On pull requests, a Github action will run `lint:fix` and `format:fix` and push changes to the PR branch, to keep things tidy.
|
||||||
|
|||||||
@@ -13,16 +13,11 @@ These are mostly the steps when releasing a new version:
|
|||||||
|
|
||||||
## Playlet lib
|
## Playlet lib
|
||||||
|
|
||||||
- Create local branch `release/$VERSION` e.g. `release/0.10.0`
|
- Use the [Release trigger](https://github.com/iBicha/playlet/actions/workflows/release-trigger.yml) to trigger a release
|
||||||
- Set version in package.json
|
- Run workflow from **main** branch
|
||||||
- Update CHANGELOG.md section from `[Unreleased]` to `[$VERSION] - DATE`
|
- Set the new version in the format X.Y.Z
|
||||||
- `npm run build:release`
|
- Wait for the PR to be created
|
||||||
- This should fail because there are uncommitted changes. This is expected.
|
- Inspect PR, wait for CI and merge
|
||||||
- Commit changes
|
|
||||||
- Create pull request
|
|
||||||
- Title: `Release v$VERSION`
|
|
||||||
- Comment: `Release $VERSION \nIt should contain everything planned from #6`
|
|
||||||
- Wait for CI and merge
|
|
||||||
- Wait for CI on main branch to create the `canary` release
|
- Wait for CI on main branch to create the `canary` release
|
||||||
- Edit `canary` release
|
- Edit `canary` release
|
||||||
- Tag: `v$VERSION`
|
- Tag: `v$VERSION`
|
||||||
@@ -40,11 +35,4 @@ These are mostly the steps when releasing a new version:
|
|||||||
|
|
||||||
## Playlet
|
## Playlet
|
||||||
|
|
||||||
For releasing to the store (when needed), this is done following a Playlet lib release:
|
For releasing to the store (when needed), signed packages are attached to Github releases, ready to publish
|
||||||
|
|
||||||
- Switch to main branch and pull changes, **including tags** - **match commit corresponding to the release.**
|
|
||||||
- `npm run build:release:ci`
|
|
||||||
- This makes sure to have a valid app in the staging folder
|
|
||||||
- `npm run sign-released-package`
|
|
||||||
- This should create the signed package under `release/playlet.pkg`
|
|
||||||
- Upload to dashboard, and schedule a release (takes a couple of days)
|
|
||||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
|||||||
|
|
||||||
info:
|
info:
|
||||||
title: Playlet Web API
|
title: Playlet Web API
|
||||||
version: 0.20.1
|
version: 0.24.6
|
||||||
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
|
||||||
@@ -46,6 +46,7 @@ paths:
|
|||||||
- device
|
- device
|
||||||
- invidious
|
- invidious
|
||||||
- preferences
|
- preferences
|
||||||
|
- profiles
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@@ -322,14 +323,63 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
format: uri
|
format: uri
|
||||||
/invidious/logout:
|
/api/profiles:
|
||||||
get:
|
get:
|
||||||
summary: Logout from Invidious
|
summary: Get profiles
|
||||||
description: Logout from Invidious, and invalidate the token if any.
|
description: Get the logged profiles, and the currently active profile.
|
||||||
operationId: invidiousLogout
|
operationId: getProfiles
|
||||||
responses:
|
responses:
|
||||||
"204":
|
"200":
|
||||||
description: No Content
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
currentProfile:
|
||||||
|
type: string
|
||||||
|
profiles:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/ProfileObject"
|
||||||
|
delete:
|
||||||
|
summary: Logout from a profile
|
||||||
|
description: Logout from a profile. This will remove the profile from the list of logged profiles.
|
||||||
|
operationId: logoutProfile
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: query
|
||||||
|
description: The ID of the profile to logout
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
/api/profiles/activate:
|
||||||
|
post:
|
||||||
|
summary: Activate a profile
|
||||||
|
description: Activate a profile. This will set the profile as the active profile.
|
||||||
|
operationId: activateProfile
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
|
||||||
# Roku External Control Protocol (ECP)
|
# Roku External Control Protocol (ECP)
|
||||||
/input/{appId}:
|
/input/{appId}:
|
||||||
@@ -523,6 +573,8 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
friendly_name:
|
friendly_name:
|
||||||
type: string
|
type: string
|
||||||
|
current_locale:
|
||||||
|
type: string
|
||||||
invidious:
|
invidious:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -530,14 +582,17 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
auth_url:
|
auth_url:
|
||||||
type: string
|
type: string
|
||||||
logged_in:
|
|
||||||
type: boolean
|
|
||||||
logged_in_instance:
|
|
||||||
type: string
|
|
||||||
logged_in_username:
|
|
||||||
type: string
|
|
||||||
preferences:
|
preferences:
|
||||||
$ref: "#/components/schemas/PreferencesObject"
|
$ref: "#/components/schemas/PreferencesObject"
|
||||||
|
profiles:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
currentProfile:
|
||||||
|
type: string
|
||||||
|
profiles:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/ProfileObject"
|
||||||
PreferencesObject:
|
PreferencesObject:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -560,6 +615,17 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
sponsorblock.show_notifications:
|
sponsorblock.show_notifications:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
ProfileObject:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
serverUrl:
|
||||||
|
type: string
|
||||||
# TODO:P1 add the rest of properties
|
# TODO:P1 add the rest of properties
|
||||||
VideoQueueObject:
|
VideoQueueObject:
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
- [Logger](#logger)
|
- [Logger](#logger)
|
||||||
- [Type Gen](#type-gen)
|
- [Type Gen](#type-gen)
|
||||||
- [Web Server](#web-server)
|
- [Web Server](#web-server)
|
||||||
|
- [Locale validation](#locale-validation)
|
||||||
|
|
||||||
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:
|
||||||
|
|
||||||
@@ -602,3 +603,23 @@ There one special annotation, and one special route:
|
|||||||
- `*` matches all paths
|
- `*` matches all paths
|
||||||
|
|
||||||
So `@all(*)` would be a middleware that will be matched with any request.
|
So `@all(*)` would be a middleware that will be matched with any request.
|
||||||
|
|
||||||
|
## Locale validation
|
||||||
|
|
||||||
|
**[Source](/tools/bs-plugins/locale-validation-plugin.ts)**
|
||||||
|
|
||||||
|
### Why
|
||||||
|
|
||||||
|
Roku's built-in localization system has some undesired side effects: for example, it might translate node ids, which would break the relationship between the nodes.
|
||||||
|
This plugin enforces some rules to ensure translation files are kept up to date with code implementation.
|
||||||
|
See the next section for the validation rules.
|
||||||
|
|
||||||
|
### How
|
||||||
|
|
||||||
|
The plugin checks for the following:
|
||||||
|
|
||||||
|
- Translated words and sentenses are defined in an enum annotated with `@locale`
|
||||||
|
- All the values in the `@locale` enums must be provided in the English (`en_US`) translation. This is because `en_US` is the fallback translation when the current localte translations are not complete.
|
||||||
|
- `en_US` must have matching source and translation values, so it can act as a fallback translation.
|
||||||
|
- All `source` translations from all languages must be present in the `@locale` enums. This is to prevent renaming the values in the code without updating translation files.
|
||||||
|
- Translation `source` keys can't be used except for certain fields such as `"text"` and `"title"`. This is to prevent the accidental localization of non-display fields, such as node ids.
|
||||||
@@ -14,13 +14,17 @@
|
|||||||
| ------------------------- | --------------------------- |
|
| ------------------------- | --------------------------- |
|
||||||
|  |  |
|
|  |  |
|
||||||
|
|
||||||
| Settings | Invidious instances | Invidious testing |
|
| Profiles | Settings |
|
||||||
| --------------------------- | ------------------------------------------------ | --------------------------------------------- |
|
| --------------------------- | --------------------------- |
|
||||||
|  |  |  |
|
|  |  |
|
||||||
|
|
||||||
| Remote | App info |
|
| Invidious instances | Invidious testing |
|
||||||
| ----------------------- | --------------------------- |
|
| ------------------------------------------------ | --------------------------------------------- |
|
||||||
|  |  |
|
|  |  |
|
||||||
|
|
||||||
|
| Remote | Info |
|
||||||
|
| ----------------------- | ------------------- |
|
||||||
|
|  |  |
|
||||||
|
|
||||||
## Playlet web app
|
## Playlet web app
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
@@ -1,46 +1,46 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.20.1",
|
"version": "0.24.6",
|
||||||
"description": "Unofficial YouTube client for Roku",
|
"description": "Unofficial YouTube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.17",
|
"@rokucommunity/bslint": "^0.8.21",
|
||||||
"@types/crypto-js": "^4.2.2",
|
"@types/crypto-js": "^4.2.2",
|
||||||
"@types/fs-extra": "^11.0.4",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/node": "^20.11.19",
|
"@types/node": "^20.14.10",
|
||||||
"@types/xml2js": "^0.4.14",
|
"@types/xml2js": "^0.4.14",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "0.65.22",
|
"brighterscript": "0.67.3",
|
||||||
"brighterscript-formatter": "^1.6.40",
|
"brighterscript-formatter": "^1.7.3",
|
||||||
"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.4.4",
|
"dotenv": "^16.4.5",
|
||||||
"express": "^4.18.2",
|
"express": "^4.19.2",
|
||||||
"fs-extra": "^11.2.0",
|
"fs-extra": "^11.2.0",
|
||||||
"glob": "^10.3.10",
|
"glob": "^10.4.2",
|
||||||
"imap": "^0.8.19",
|
"imap": "^0.8.19",
|
||||||
"ip": "^1.1.8",
|
"ip": "^2.0.1",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"mailparser": "^3.6.7",
|
"mailparser": "^3.7.1",
|
||||||
"roku-deploy": "^3.11.2",
|
"roku-deploy": "^3.12.0",
|
||||||
"rooibos-roku": "5.10.0",
|
"rooibos-roku": "5.12.0",
|
||||||
"semver": "^7.6.0",
|
"rounded-rect-9patch": "^1.0.1",
|
||||||
|
"semver": "^7.6.2",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.5.3",
|
||||||
"xml2js": "^0.6.2",
|
"xml2js": "^0.6.2",
|
||||||
"yaml": "^2.3.4"
|
"yaml": "^2.4.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18"
|
"node": "20"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:web": "cd playlet-web && npm run dev",
|
"dev:web": "cd playlet-web && npm run dev",
|
||||||
"prebuild": "rm -rf dist",
|
"prebuild": "rm -rf dist",
|
||||||
"build:dev": "npm run build:web && npm run build:lib:dev && npm run build:app:dev",
|
"build:dev": "npm run build:web && npm run build:lib:dev && npm run build:app:dev",
|
||||||
"build:prod": "npm run build:web && npm run build:lib:prod && npm run build:app:prod",
|
"build:prod": "npm run build:web && npm run build:lib:prod && npm run build:app:prod",
|
||||||
"build:release": "npm run build:release:ci && npm run sign-package",
|
"build:release": "npm run format:fix && npm run lint:fix && npm run version-sync && npm run manifest-git-hash && npm run build:prod",
|
||||||
"build:release:ci": "npm run format:fix && npm run lint:fix && npm run version-sync && npm run manifest-git-hash && npm run build:prod",
|
|
||||||
"build:app:dev": "cd playlet-app && npm run build:dev",
|
"build:app:dev": "cd playlet-app && npm run build:dev",
|
||||||
"build:app:prod": "cd playlet-app && npm run build:prod",
|
"build:app:prod": "cd playlet-app && npm run build:prod",
|
||||||
"build:lib:dev": "cd playlet-lib && npm run build:dev",
|
"build:lib:dev": "cd playlet-lib && npm run build:dev",
|
||||||
@@ -58,14 +58,13 @@
|
|||||||
"test:build:lib": "cd playlet-lib && npm run test:build",
|
"test:build:lib": "cd playlet-lib && npm run test:build",
|
||||||
"version-sync": "node tools/version-sync.js",
|
"version-sync": "node tools/version-sync.js",
|
||||||
"manifest-git-hash": "node tools/update-manifest-git-hash.js",
|
"manifest-git-hash": "node tools/update-manifest-git-hash.js",
|
||||||
"sign-package": "node tools/sign-package.js",
|
|
||||||
"sign-released-package": "node tools/sign-released-package.js",
|
"sign-released-package": "node tools/sign-released-package.js",
|
||||||
"screenshot": "node tools/screenshot.js",
|
"screenshot": "node tools/screenshot.js",
|
||||||
"profile-sync": "node tools/profile-sync.js",
|
"profile-sync": "node tools/profile-sync.js",
|
||||||
"generate-sponsorblock-config": "node tools/generate-sponsorblock-config.js",
|
"generate-sponsorblock-config": "node tools/generate-sponsorblock-config.js",
|
||||||
"update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip",
|
"update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip",
|
||||||
"postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playlet-web && npm install",
|
"postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playlet-web && npm install",
|
||||||
"update-deps": "npx npm-check-updates -u && cd playlet-app && npx npm-check-updates -u && cd ../playlet-lib && npx npm-check-updates -u && cd ../playlet-web && npx npm-check-updates -u",
|
"update-deps": "npx npm-check-updates --deep --upgrade --install always",
|
||||||
"registry:write": "node tools/registry.js --input registry.json",
|
"registry:write": "node tools/registry.js --input registry.json",
|
||||||
"registry:read": "node tools/registry.js --output registry.json",
|
"registry:read": "node tools/registry.js --output registry.json",
|
||||||
"registry:clear": "node tools/registry.js --clear"
|
"registry:clear": "node tools/registry.js --clear"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.20.1",
|
"version": "0.24.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.20.1"
|
"version": "0.24.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.20.1",
|
"version": "0.24.6",
|
||||||
"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",
|
||||||
"prebuild:dev": "npm run prebuild",
|
"prebuild:dev": "npm run prebuild",
|
||||||
"prebuild:prod": "npm run prebuild",
|
"prebuild:prod": "npm run prebuild",
|
||||||
"build:dev": "bsc --create-package --debug --sourceMap=true --lintConfig ../config/bslint.jsonc",
|
"build:dev": "bsc --create-package --debug --sourceMap=true --lintConfig ../config/bslint.jsonc",
|
||||||
"build:prod": "bsc --create-package --sourceMap=false --lintConfig ../config/bslint.jsonc",
|
"build:prod": "bsc --create-package --sourceMap=false --lintConfig ../config/bslint.jsonc",
|
||||||
"postbuild:prod": "mkdir -p ../release && cp ../dist/playlet-app.zip ../release/playlet.zip",
|
"postbuild:prod": "mkdir -p ../release && cp ../dist/playlet-app.zip ../release/playlet.zip && npm run squash-fs && npm run sign-package",
|
||||||
|
"squash-fs": "node ../tools/squash-fs.js --in-file ../release/playlet.zip --out-file ../release/playlet.squashfs.zip",
|
||||||
|
"sign-package": "node ../tools/sign-package.js --out-file playlet.squashfs.zip --out-dir ../release --staging-dir ../build/playlet-app",
|
||||||
"lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc",
|
"lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc",
|
||||||
"lint:fix": "npm run lint -- --fix",
|
"lint:fix": "npm run lint -- --fix",
|
||||||
"format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"!**/*.transpiled/**\" \"!**/*.transpiled.*\" --bsfmt-path ../config/bsfmt.jsonc",
|
"format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"!**/*.transpiled/**\" \"!**/*.transpiled.*\" --bsfmt-path ../config/bsfmt.jsonc",
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ end function
|
|||||||
|
|
||||||
function GetPlayletLibUrls() as object
|
function GetPlayletLibUrls() as object
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
debug = { type: "debug", link: Manifest.ReadValue("playlet_lib_debug_url") }
|
debug = { type: "debug-zip", link: Manifest.ReadValue("playlet_lib_zip_debug_url") }
|
||||||
embedded = { type: "embedded", link: Manifest.ReadValue("playlet_lib_embedded_url") }
|
embedded = { type: "embedded-zip", link: Manifest.ReadValue("playlet_lib_zip_embedded_url") }
|
||||||
#if DEBUG_FALLBACK_TO_EMBEDDED
|
#if DEBUG_FALLBACK_TO_EMBEDDED
|
||||||
return [debug, embedded]
|
return [debug, embedded]
|
||||||
#else
|
#else
|
||||||
@@ -36,9 +36,10 @@ function GetPlayletLibUrls() as object
|
|||||||
return savedUrls
|
return savedUrls
|
||||||
end if
|
end if
|
||||||
|
|
||||||
github = { type: "github", link: Manifest.ReadValue("playlet_lib_remote_url") }
|
githubSquashFs = { type: "github-squashfs", link: Manifest.ReadValue("playlet_lib_squashfs_remote_url") }
|
||||||
embedded = { type: "embedded", link: Manifest.ReadValue("playlet_lib_embedded_url") }
|
githubZip = { type: "github-zip", link: Manifest.ReadValue("playlet_lib_zip_remote_url") }
|
||||||
return [github, embedded]
|
embedded = { type: "embedded-zip", link: Manifest.ReadValue("playlet_lib_zip_embedded_url") }
|
||||||
|
return [githubSquashFs, githubZip, embedded]
|
||||||
#end if
|
#end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ function OnLoadStatusChanged() as void
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
if m.lib.loadStatus = "failed"
|
if m.lib.loadStatus = "failed"
|
||||||
Logger.Log(`Playlet lib failed to load from ${libUrl.link}`)
|
Logger.Log(`Playlet lib failed to load from ${libUrl.link} in ${m.timer.TotalMilliseconds()} ms`)
|
||||||
' Try next url
|
' Try next url
|
||||||
m.playletLibUrlIndex += 1
|
m.playletLibUrlIndex += 1
|
||||||
LoadPlayletLib()
|
LoadPlayletLib()
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ end function
|
|||||||
|
|
||||||
function GetLoadingMessagesFromCache() as object
|
function GetLoadingMessagesFromCache() as object
|
||||||
messagesFile = ReadAsciiFile("cachefs:/loading_messages_v1.json")
|
messagesFile = ReadAsciiFile("cachefs:/loading_messages_v1.json")
|
||||||
if messagesFile = invalid or messagesFile = ""
|
if messagesFile = ""
|
||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
return ParseJson(messagesFile)
|
return ParseJson(messagesFile)
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -1,163 +1,35 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" viewBox="0 0 508 285.75">
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
<defs>
|
||||||
|
<path id="a" d="M180.216 328.727h570.683v243.625H180.216z" />
|
||||||
<svg
|
<path id="b" d="M180.216 328.727h570.683v243.625H180.216z" />
|
||||||
width="1920"
|
<path id="c" d="M180.216 328.727h570.683v243.625H180.216z" />
|
||||||
height="1080"
|
<path id="d" d="M180.216 328.727h570.683v243.625H180.216z" />
|
||||||
viewBox="0 0 508 285.75"
|
<path id="e" d="M180.216 328.727h570.683v243.625H180.216z" />
|
||||||
version="1.1"
|
<path id="f" d="M180.216 328.727h570.683v243.625H180.216z" />
|
||||||
id="svg10011"
|
<path id="g" d="M180.216 328.727h570.683v243.625H180.216z" />
|
||||||
sodipodi:docname="logo-dark.svg"
|
</defs>
|
||||||
inkscape:version="1.2.1 (9c6d41e4, 2022-07-14)"
|
<g transform="translate(25.407 14.291)scale(.89997)">
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
<rect width="192.927" height="108.944" x="109.706" y="88.403" rx="20.14" ry="19.408" style="fill:#f0f9f2;fill-opacity:1;stroke:none;stroke-width:3.68071;stroke-linejoin:round;stroke-dasharray:none" />
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
<g style="white-space:pre;shape-inside:url(#a);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
<path d="M182.082 397.454v-50.027h15.38q4.033 0 7.542 1.494 3.51 1.493 6.123 4.18 2.613 2.614 4.107 6.124 1.493 3.509 1.493 7.54 0 3.958-1.493 7.468t-4.107 6.122q-2.613 2.539-6.123 4.032-3.51 1.494-7.541 1.494h-8.81v11.573zm6.57-18.144h8.81q2.614 0 4.929-.97 2.315-1.046 4.032-2.689 1.717-1.717 2.688-3.957 1.045-2.315 1.045-4.928 0-2.688-1.045-5.003-.97-2.314-2.688-4.032-1.717-1.717-4.032-2.688-2.315-.97-4.928-.97h-8.81z" aria-label="P" transform="translate(-115.36 -354.387)scale(1.3209)" />
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
</g>
|
||||||
<sodipodi:namedview
|
<g style="white-space:pre;shape-inside:url(#b);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
id="namedview396"
|
<path d="M189.922 349.369v48.085h-6.272v-48.085z" aria-label="l" transform="translate(-65.867 -354.45)scale(1.3209)" />
|
||||||
pagecolor="#ffffff"
|
</g>
|
||||||
bordercolor="#000000"
|
<g style="white-space:pre;shape-inside:url(#c);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
borderopacity="0.25"
|
<path d="M216.354 388.867q-3.062 4.555-7.243 6.646-4.107 2.09-8.96 2.09-3.808 0-7.168-1.418-3.36-1.494-5.824-3.958t-3.957-5.824q-1.42-3.36-1.42-7.168 0-3.882 1.42-7.242 1.493-3.36 3.957-5.824 2.464-2.54 5.824-3.958 3.36-1.493 7.168-1.493 4.853 0 9.11 2.24 4.33 2.24 7.466 6.944l-21.653 20.16q1.194.821 2.986 1.195 1.792.298 3.584.074 3.136-.373 5.824-2.09 2.763-1.792 4.63-4.48zm-28.598-10.602q-.224 2.837.747 5.226.97 2.39 2.763 3.734l17.098-16.651q-1.418-1.717-3.808-2.763-2.39-1.12-5.226-.97-2.315.149-4.331 1.045t-3.584 2.464q-1.493 1.493-2.464 3.51-.97 2.015-1.195 4.405" aria-label="e" transform="translate(87.108 -354.302)scale(1.3209)" />
|
||||||
inkscape:showpageshadow="2"
|
</g>
|
||||||
inkscape:pageopacity="0.0"
|
<g style="white-space:pre;shape-inside:url(#d);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
inkscape:pagecheckerboard="0"
|
<path d="M180.215 360.718h3.435v-11.35h6.346v11.35h6.646v5.227h-6.646v20.234q0 2.614 1.643 4.256 1.643 1.568 4.256 1.568v5.6q-6.048 0-9.184-2.912-3.061-2.912-3.061-8.512v-20.234h-3.435z" aria-label="t" transform="translate(138.55 -354.312)scale(1.3209)" />
|
||||||
inkscape:deskcolor="#d1d1d1"
|
</g>
|
||||||
showgrid="false"
|
<g style="white-space:pre;shape-inside:url(#e);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
inkscape:zoom="0.21851852"
|
<path d="M189.922 349.369v48.085h-6.272v-48.085z" aria-label="l" transform="translate(69.6 -354.306)scale(1.3209)" />
|
||||||
inkscape:cx="382.11864"
|
</g>
|
||||||
inkscape:cy="540"
|
<g style="white-space:pre;shape-inside:url(#f);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
inkscape:window-width="1440"
|
<path d="M181.858 379.235q0-3.882 1.344-7.242t3.584-5.824q2.314-2.54 5.376-3.958 3.136-1.493 6.72-1.493 4.256 0 7.765 2.09 3.51 2.017 5.75 5.451v-7.392h6.346v36.587h-6.347v-7.317q-2.24 3.434-5.75 5.45-3.508 2.016-7.764 2.016-3.584 0-6.72-1.418-3.062-1.494-5.376-3.958-2.24-2.464-3.584-5.824t-1.344-7.168m6.346 0q0 2.464.896 4.704.97 2.166 2.539 3.808 1.643 1.643 3.808 2.614 2.24.896 4.779.896 2.464 0 4.629-.896 2.24-.971 3.883-2.614t2.613-3.808q.97-2.24.97-4.704t-.97-4.704-2.613-3.882-3.883-2.614q-2.165-.97-4.63-.97-2.538 0-4.778.97-2.165.97-3.808 2.614-1.568 1.642-2.539 3.882-.896 2.24-.896 4.704" aria-label="a" transform="translate(-48.47 -354.515)scale(1.3209)" />
|
||||||
inkscape:window-height="758"
|
</g>
|
||||||
inkscape:window-x="0"
|
<g style="white-space:pre;shape-inside:url(#g);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
inkscape:window-y="25"
|
<path d="m186.562 360.867 10.976 28.075 10.752-28.075h6.72l-18.742 47.563h-6.272l4.256-10.827-14.485-36.736z" aria-label="y" transform="translate(9.07 -354.11)scale(1.3209)" />
|
||||||
inkscape:window-maximized="1"
|
</g>
|
||||||
inkscape:current-layer="svg10011" />
|
|
||||||
<defs
|
|
||||||
id="defs10008">
|
|
||||||
<rect
|
|
||||||
x="180.21565"
|
|
||||||
y="328.72668"
|
|
||||||
width="570.68286"
|
|
||||||
height="243.62486"
|
|
||||||
id="rect418-2-51" />
|
|
||||||
<rect
|
|
||||||
x="180.21565"
|
|
||||||
y="328.72668"
|
|
||||||
width="570.68286"
|
|
||||||
height="243.62486"
|
|
||||||
id="rect418-2-8-2" />
|
|
||||||
<rect
|
|
||||||
x="180.21565"
|
|
||||||
y="328.72668"
|
|
||||||
width="570.68286"
|
|
||||||
height="243.62486"
|
|
||||||
id="rect418-2-53-6" />
|
|
||||||
<rect
|
|
||||||
x="180.21565"
|
|
||||||
y="328.72668"
|
|
||||||
width="570.68286"
|
|
||||||
height="243.62486"
|
|
||||||
id="rect418-2-6-6" />
|
|
||||||
<rect
|
|
||||||
x="180.21565"
|
|
||||||
y="328.72668"
|
|
||||||
width="570.68286"
|
|
||||||
height="243.62486"
|
|
||||||
id="rect418-2-5-5" />
|
|
||||||
<rect
|
|
||||||
x="180.21565"
|
|
||||||
y="328.72668"
|
|
||||||
width="570.68286"
|
|
||||||
height="243.62486"
|
|
||||||
id="rect418-2-1-4" />
|
|
||||||
<rect
|
|
||||||
x="180.21565"
|
|
||||||
y="328.72668"
|
|
||||||
width="570.68286"
|
|
||||||
height="243.62486"
|
|
||||||
id="rect418-2-3-1" />
|
|
||||||
</defs>
|
|
||||||
<g
|
|
||||||
id="layer1"
|
|
||||||
transform="matrix(0.8999741,0,0,0.8999741,25.406579,14.291204)">
|
|
||||||
<rect
|
|
||||||
style="fill:#f0f9f2;fill-opacity:1;stroke:none;stroke-width:3.68071;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect8445-7"
|
|
||||||
width="192.9267"
|
|
||||||
height="108.94424"
|
|
||||||
x="109.70631"
|
|
||||||
y="88.402878"
|
|
||||||
rx="20.13974"
|
|
||||||
ry="19.408449" />
|
|
||||||
<g
|
|
||||||
aria-label="P"
|
|
||||||
transform="matrix(1.3208994,0,0,1.3208994,-115.36013,-354.38654)"
|
|
||||||
id="text416-2-13"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-51);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 182.08151,397.45387 v -50.02669 h 15.38134 q 4.032,0 7.54134,1.49333 3.50933,1.49334 6.12267,4.18134 2.61333,2.61333 4.10667,6.12267 1.49333,3.50933 1.49333,7.54133 0,3.95734 -1.49333,7.46667 -1.49334,3.50934 -4.10667,6.12267 -2.61334,2.53867 -6.12267,4.03201 -3.50934,1.49333 -7.54134,1.49333 h -8.81067 v 11.57334 z m 6.57067,-18.14401 h 8.81067 q 2.61334,0 4.928,-0.97067 2.31467,-1.04533 4.03201,-2.688 1.71733,-1.71733 2.688,-3.95733 1.04533,-2.31467 1.04533,-4.92801 0,-2.688 -1.04533,-5.00267 -0.97067,-2.31466 -2.688,-4.032 -1.71734,-1.71733 -4.03201,-2.688 -2.31466,-0.97067 -4.928,-0.97067 h -8.81067 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path533" />
|
|
||||||
</g>
|
</g>
|
||||||
<g
|
</svg>
|
||||||
aria-label="l"
|
|
||||||
transform="matrix(1.3208994,0,0,1.3208994,-65.866935,-354.45042)"
|
|
||||||
id="text416-2-1-4"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-8-2);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 189.92152,349.36851 v 48.08536 h -6.27201 v -48.08536 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path530" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
aria-label="e"
|
|
||||||
transform="matrix(1.3208994,0,0,1.3208994,87.108046,-354.30193)"
|
|
||||||
id="text416-2-5-8"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-53-6);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 216.35353,388.8672 q -3.06134,4.55467 -7.24267,6.64533 -4.10667,2.09067 -8.96001,2.09067 -3.808,0 -7.168,-1.41867 -3.36,-1.49333 -5.824,-3.95733 -2.464,-2.464 -3.95734,-5.824 -1.41867,-3.36001 -1.41867,-7.16801 0,-3.88267 1.41867,-7.24267 1.49334,-3.36 3.95734,-5.824 2.464,-2.53867 5.824,-3.95734 3.36,-1.49333 7.168,-1.49333 4.85334,0 9.10934,2.24 4.33067,2.24 7.46667,6.944 l -21.65334,20.16001 q 1.19466,0.82134 2.98667,1.19467 1.792,0.29867 3.584,0.0747 3.136,-0.37334 5.824,-2.09067 2.76267,-1.792 4.62934,-4.48 z m -28.59735,-10.60267 q -0.224,2.83733 0.74667,5.22666 0.97066,2.38934 2.76267,3.73334 l 17.09867,-16.65067 q -1.41867,-1.71734 -3.808,-2.76267 -2.38934,-1.12 -5.22667,-0.97067 -2.31467,0.14933 -4.33067,1.04533 -2.016,0.896 -3.584,2.46401 -1.49333,1.49333 -2.464,3.50933 -0.97067,2.016 -1.19467,4.40534 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path527" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
aria-label="t"
|
|
||||||
transform="matrix(1.3208994,0,0,1.3208994,138.55003,-354.31168)"
|
|
||||||
id="text416-2-59-6"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-6-6);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 180.21484,360.71785 h 3.43467 v -11.34934 h 6.34667 v 11.34934 h 6.64534 v 5.22667 h -6.64534 v 20.23468 q 0,2.61333 1.64267,4.256 1.64267,1.568 4.256,1.568 v 5.6 q -6.048,0 -9.184,-2.912 -3.06134,-2.912 -3.06134,-8.512 v -20.23468 h -3.43467 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path524" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
aria-label="l"
|
|
||||||
transform="matrix(1.3208994,0,0,1.3208994,69.600141,-354.30583)"
|
|
||||||
id="text416-2-8-1"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-5-5);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 189.92152,349.36851 v 48.08536 h -6.27201 v -48.08536 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path521" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
aria-label="a"
|
|
||||||
transform="matrix(1.3208994,0,0,1.3208994,-48.469095,-354.51494)"
|
|
||||||
id="text416-2-4-5"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-1-4);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 181.85751,379.23519 q 0,-3.88267 1.344,-7.24267 1.344,-3.36 3.584,-5.824 2.31467,-2.53867 5.37601,-3.95734 3.136,-1.49333 6.72,-1.49333 4.256,0 7.76534,2.09067 3.50933,2.016 5.74933,5.45067 v -7.39201 h 6.34667 v 36.58669 h -6.34667 v -7.31734 q -2.24,3.43467 -5.74933,5.45067 -3.50934,2.016 -7.76534,2.016 -3.584,0 -6.72,-1.41867 -3.06134,-1.49333 -5.37601,-3.95733 -2.24,-2.464 -3.584,-5.824 -1.344,-3.36001 -1.344,-7.16801 z m 6.34667,0 q 0,2.464 0.896,4.704 0.97067,2.16534 2.53867,3.80801 1.64267,1.64266 3.808,2.61333 2.24,0.896 4.77867,0.896 2.464,0 4.62934,-0.896 2.24,-0.97067 3.88266,-2.61333 1.64267,-1.64267 2.61334,-3.80801 0.97067,-2.24 0.97067,-4.704 0,-2.464 -0.97067,-4.704 -0.97067,-2.24 -2.61334,-3.88267 -1.64266,-1.64267 -3.88266,-2.61333 -2.16534,-0.97067 -4.62934,-0.97067 -2.53867,0 -4.77867,0.97067 -2.16533,0.97066 -3.808,2.61333 -1.568,1.64267 -2.53867,3.88267 -0.896,2.24 -0.896,4.704 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path518" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
aria-label="y"
|
|
||||||
transform="matrix(1.3208994,0,0,1.3208994,9.0695965,-354.11012)"
|
|
||||||
id="text416-2-84-0"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-3-1);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 186.56151,360.86718 10.97601,28.07468 10.752,-28.07468 h 6.72001 l -18.74135,47.56269 h -6.272 l 4.256,-10.82667 -14.48534,-36.73602 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path515" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
inputHash: '0536f51fa72c2e4e368ea0e901aadfc1',
|
inputHash: '23ef9dfb70a20dea763f36c50f0e47d1',
|
||||||
outputs: [
|
outputs: [
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/splash-screen_fhd.jpg',
|
outputFilePath: 'images/splash-screen_fhd.jpg',
|
||||||
outputHash: 'b15f3a3f1ccc459cbca12cb828b78d16',
|
outputHash: '114d19754dea31c83f17355d8741ac35',
|
||||||
width: 1920,
|
width: 1920,
|
||||||
height: 1080,
|
height: 1080,
|
||||||
background: '#242424',
|
background: '#242424',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/splash-screen_hd.jpg',
|
outputFilePath: 'images/splash-screen_hd.jpg',
|
||||||
outputHash: '25e9c4220f8a42101d6333e548e33aa8',
|
outputHash: '8592e44c5d00183af4c45402f6fd495c',
|
||||||
width: 1280,
|
width: 1280,
|
||||||
height: 720,
|
height: 720,
|
||||||
background: '#242424',
|
background: '#242424',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/splash-screen_sd.jpg',
|
outputFilePath: 'images/splash-screen_sd.jpg',
|
||||||
outputHash: 'c54a2f7fa65f443263806962450f2c04',
|
outputHash: '5a5585def512912739a2fc771971fcdd',
|
||||||
width: 720,
|
width: 720,
|
||||||
height: 480,
|
height: 480,
|
||||||
background: '#242424',
|
background: '#242424',
|
||||||
|
|||||||
@@ -1,36 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 26.458 26.458">
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
<rect width="26.378" height="26.508" x=".059" y=".001" rx="4" ry="4" style="fill:#242424;fill-opacity:1;stroke:none;stroke-width:.671348;stroke-linejoin:round;stroke-dasharray:none" />
|
||||||
|
<g style="white-space:pre;shape-inside:url(#rect418-2);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
<svg
|
<path d="M182.082 397.454v-50.027h15.38q4.033 0 7.542 1.494 3.51 1.493 6.123 4.18 2.613 2.614 4.107 6.124 1.493 3.509 1.493 7.54 0 3.958-1.493 7.468t-4.107 6.122q-2.613 2.539-6.123 4.032-3.51 1.494-7.541 1.494h-8.81v11.573zm6.57-18.144h8.81q2.614 0 4.929-.97 2.315-1.046 4.032-2.689 1.717-1.717 2.688-3.957 1.045-2.315 1.045-4.928 0-2.688-1.045-5.003-.97-2.314-2.688-4.032-1.717-1.717-4.032-2.688-2.315-.97-4.928-.97h-8.81z" aria-label="P" transform="translate(-64.218 -131.424)scale(.3884)" />
|
||||||
width="100"
|
|
||||||
height="100"
|
|
||||||
viewBox="0 0 26.458333 26.458333"
|
|
||||||
version="1.1"
|
|
||||||
id="svg9602"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<defs
|
|
||||||
id="defs9599" />
|
|
||||||
<g
|
|
||||||
id="layer1">
|
|
||||||
<rect
|
|
||||||
style="fill:#242424;fill-opacity:1;stroke:none;stroke-width:0.671348;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect8445"
|
|
||||||
width="26.378244"
|
|
||||||
height="26.508022"
|
|
||||||
x="0.059478253"
|
|
||||||
y="0.0009513023"
|
|
||||||
rx="4"
|
|
||||||
ry="4" />
|
|
||||||
<g
|
|
||||||
aria-label="P"
|
|
||||||
transform="matrix(0.3883926,0,0,0.3883926,-64.217943,-131.42398)"
|
|
||||||
id="text416-2"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 182.08151,397.45387 v -50.02669 h 15.38134 q 4.032,0 7.54134,1.49333 3.50933,1.49334 6.12267,4.18134 2.61333,2.61333 4.10667,6.12267 1.49333,3.50933 1.49333,7.54133 0,3.95734 -1.49333,7.46667 -1.49334,3.50934 -4.10667,6.12267 -2.61334,2.53867 -6.12267,4.03201 -3.50934,1.49333 -7.54134,1.49333 h -8.81067 v 11.57334 z m 6.57067,-18.14401 h 8.81067 q 2.61334,0 4.928,-0.97067 2.31467,-1.04533 4.03201,-2.688 1.71733,-1.71733 2.688,-3.95733 1.04533,-2.31467 1.04533,-4.92801 0,-2.688 -1.04533,-5.00267 -0.97067,-2.31466 -2.688,-4.032 -1.71734,-1.71733 -4.03201,-2.688 -2.31466,-0.97067 -4.928,-0.97067 h -8.81067 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path9573" />
|
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</svg>
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 933 B |
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
inputHash: 'd61131ccc714d8df0b4514ca76883494',
|
inputHash: 'ccde0fcc2946c2f402565bb4875b5816',
|
||||||
outputs: [],
|
outputs: [],
|
||||||
}
|
}
|
||||||
@@ -1,96 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="540" height="405" viewBox="0 0 142.875 107.156">
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
<rect width="65.395" height="36.795" x="22.703" y="35.181" rx="6.827" ry="6.555" style="fill:#242424;fill-opacity:.99;stroke:none;stroke-width:1.24539;stroke-linejoin:round;stroke-dasharray:none" />
|
||||||
|
<g style="white-space:pre;shape-inside:url(#rect418-2);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
<svg
|
<path d="M182.082 397.454v-50.027h15.38q4.033 0 7.542 1.494 3.51 1.493 6.123 4.18 2.613 2.614 4.107 6.124 1.493 3.509 1.493 7.54 0 3.958-1.493 7.468t-4.107 6.122q-2.613 2.539-6.123 4.032-3.51 1.494-7.541 1.494h-8.81v11.573zm6.57-18.144h8.81q2.614 0 4.929-.97 2.315-1.046 4.032-2.689 1.717-1.717 2.688-3.957 1.045-2.315 1.045-4.928 0-2.688-1.045-5.003-.97-2.314-2.688-4.032-1.717-1.717-4.032-2.688-2.315-.97-4.928-.97h-8.81z" aria-label="P" transform="translate(-53.311 -114.204)scale(.44612)" />
|
||||||
width="540"
|
|
||||||
height="405"
|
|
||||||
viewBox="0 0 142.875 107.15625"
|
|
||||||
version="1.1"
|
|
||||||
id="svg9602"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<defs
|
|
||||||
id="defs9599" />
|
|
||||||
<g
|
|
||||||
id="layer1">
|
|
||||||
<rect
|
|
||||||
style="fill:#242424;fill-opacity:0.99;stroke:none;stroke-width:1.24539;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect8445"
|
|
||||||
width="65.39537"
|
|
||||||
height="36.795055"
|
|
||||||
x="22.703459"
|
|
||||||
y="35.180595"
|
|
||||||
rx="6.8266635"
|
|
||||||
ry="6.5550508" />
|
|
||||||
<g
|
|
||||||
aria-label="P"
|
|
||||||
transform="matrix(0.44612332,0,0,0.44612332,-53.310985,-114.20369)"
|
|
||||||
id="text416-2"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 182.08151,397.45387 v -50.02669 h 15.38134 q 4.032,0 7.54134,1.49333 3.50933,1.49334 6.12267,4.18134 2.61333,2.61333 4.10667,6.12267 1.49333,3.50933 1.49333,7.54133 0,3.95734 -1.49333,7.46667 -1.49334,3.50934 -4.10667,6.12267 -2.61334,2.53867 -6.12267,4.03201 -3.50934,1.49333 -7.54134,1.49333 h -8.81067 v 11.57334 z m 6.57067,-18.14401 h 8.81067 q 2.61334,0 4.928,-0.97067 2.31467,-1.04533 4.03201,-2.688 1.71733,-1.71733 2.688,-3.95733 1.04533,-2.31467 1.04533,-4.92801 0,-2.688 -1.04533,-5.00267 -0.97067,-2.31466 -2.688,-4.032 -1.71734,-1.71733 -4.03201,-2.688 -2.31466,-0.97067 -4.928,-0.97067 h -8.81067 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path9573" />
|
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g style="white-space:pre;shape-inside:url(#rect418-2-8);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
aria-label="l"
|
<path d="M189.922 349.369v48.085h-6.272v-48.085z" aria-label="l" transform="translate(-36.595 -114.225)scale(.44612)" />
|
||||||
transform="matrix(0.44612332,0,0,0.44612332,-36.59502,-114.22526)"
|
|
||||||
id="text416-2-1"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-8);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 189.92152,349.36851 v 48.08536 h -6.27201 v -48.08536 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path9570" />
|
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g style="white-space:pre;shape-inside:url(#rect418-2-53);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
aria-label="e"
|
<path d="M216.354 388.867q-3.062 4.555-7.243 6.646-4.107 2.09-8.96 2.09-3.808 0-7.168-1.418-3.36-1.494-5.824-3.958t-3.957-5.824q-1.42-3.36-1.42-7.168 0-3.882 1.42-7.242 1.493-3.36 3.957-5.824 2.464-2.54 5.824-3.958 3.36-1.493 7.168-1.493 4.853 0 9.11 2.24 4.33 2.24 7.466 6.944l-21.653 20.16q1.194.821 2.986 1.195 1.792.298 3.584.074 3.136-.373 5.824-2.09 2.763-1.792 4.63-4.48zm-28.598-10.602q-.224 2.837.747 5.226.97 2.39 2.763 3.734l17.098-16.651q-1.418-1.717-3.808-2.763-2.39-1.12-5.226-.97-2.315.149-4.331 1.045t-3.584 2.464q-1.493 1.493-2.464 3.51-.97 2.015-1.195 4.405" aria-label="e" transform="translate(15.071 -114.175)scale(.44612)" />
|
||||||
transform="matrix(0.44612332,0,0,0.44612332,15.071073,-114.17511)"
|
|
||||||
id="text416-2-5"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-53);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 216.35353,388.8672 q -3.06134,4.55467 -7.24267,6.64533 -4.10667,2.09067 -8.96001,2.09067 -3.808,0 -7.168,-1.41867 -3.36,-1.49333 -5.824,-3.95733 -2.464,-2.464 -3.95734,-5.824 -1.41867,-3.36001 -1.41867,-7.16801 0,-3.88267 1.41867,-7.24267 1.49334,-3.36 3.95734,-5.824 2.464,-2.53867 5.824,-3.95734 3.36,-1.49333 7.168,-1.49333 4.85334,0 9.10934,2.24 4.33067,2.24 7.46667,6.944 l -21.65334,20.16001 q 1.19466,0.82134 2.98667,1.19467 1.792,0.29867 3.584,0.0747 3.136,-0.37334 5.824,-2.09067 2.76267,-1.792 4.62934,-4.48 z m -28.59735,-10.60267 q -0.224,2.83733 0.74667,5.22666 0.97066,2.38934 2.76267,3.73334 l 17.09867,-16.65067 q -1.41867,-1.71734 -3.808,-2.76267 -2.38934,-1.12 -5.22667,-0.97067 -2.31467,0.14933 -4.33067,1.04533 -2.016,0.896 -3.584,2.46401 -1.49333,1.49333 -2.464,3.50933 -0.97067,2.016 -1.19467,4.40534 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path9558" />
|
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g style="white-space:pre;shape-inside:url(#rect418-2-6);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
aria-label="t"
|
<path d="M180.215 360.718h3.435v-11.35h6.346v11.35h6.646v5.227h-6.646v20.234q0 2.614 1.643 4.256 1.643 1.568 4.256 1.568v5.6q-6.048 0-9.184-2.912-3.061-2.912-3.061-8.512v-20.234h-3.435z" aria-label="t" transform="translate(32.445 -114.178)scale(.44612)" />
|
||||||
transform="matrix(0.44612332,0,0,0.44612332,32.445174,-114.17841)"
|
|
||||||
id="text416-2-59"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-6);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 180.21484,360.71785 h 3.43467 v -11.34934 h 6.34667 v 11.34934 h 6.64534 v 5.22667 h -6.64534 v 20.23468 q 0,2.61333 1.64267,4.256 1.64267,1.568 4.256,1.568 v 5.6 q -6.048,0 -9.184,-2.912 -3.06134,-2.912 -3.06134,-8.512 v -20.23468 h -3.43467 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path9555" />
|
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g style="white-space:pre;shape-inside:url(#rect418-2-5);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
aria-label="l"
|
<path d="M189.922 349.369v48.085h-6.272v-48.085z" aria-label="l" transform="translate(9.158 -114.176)scale(.44612)" />
|
||||||
transform="matrix(0.44612332,0,0,0.44612332,9.157916,-114.17642)"
|
|
||||||
id="text416-2-8"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-5);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 189.92152,349.36851 v 48.08536 h -6.27201 v -48.08536 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path9561" />
|
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g style="white-space:pre;shape-inside:url(#rect418-2-1);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
aria-label="a"
|
<path d="M181.858 379.235q0-3.882 1.344-7.242t3.584-5.824q2.314-2.54 5.376-3.958 3.136-1.493 6.72-1.493 4.256 0 7.765 2.09 3.51 2.017 5.75 5.451v-7.392h6.346v36.587h-6.347v-7.317q-2.24 3.434-5.75 5.45-3.508 2.016-7.764 2.016-3.584 0-6.72-1.418-3.062-1.494-5.376-3.958-2.24-2.464-3.584-5.824t-1.344-7.168m6.346 0q0 2.464.896 4.704.97 2.166 2.539 3.808 1.643 1.643 3.808 2.614 2.24.896 4.779.896 2.464 0 4.629-.896 2.24-.971 3.883-2.614t2.613-3.808q.97-2.24.97-4.704t-.97-4.704-2.613-3.882-3.883-2.614q-2.165-.97-4.63-.97-2.538 0-4.778.97-2.165.97-3.808 2.614-1.568 1.642-2.539 3.882-.896 2.24-.896 4.704" aria-label="a" transform="translate(-30.719 -114.247)scale(.44612)" />
|
||||||
transform="matrix(0.44612332,0,0,0.44612332,-30.719029,-114.24707)"
|
|
||||||
id="text416-2-4"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-1);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 181.85751,379.23519 q 0,-3.88267 1.344,-7.24267 1.344,-3.36 3.584,-5.824 2.31467,-2.53867 5.37601,-3.95734 3.136,-1.49333 6.72,-1.49333 4.256,0 7.76534,2.09067 3.50933,2.016 5.74933,5.45067 v -7.39201 h 6.34667 v 36.58669 h -6.34667 v -7.31734 q -2.24,3.43467 -5.74933,5.45067 -3.50934,2.016 -7.76534,2.016 -3.584,0 -6.72,-1.41867 -3.06134,-1.49333 -5.37601,-3.95733 -2.24,-2.464 -3.584,-5.824 -1.344,-3.36001 -1.344,-7.16801 z m 6.34667,0 q 0,2.464 0.896,4.704 0.97067,2.16534 2.53867,3.80801 1.64267,1.64266 3.808,2.61333 2.24,0.896 4.77867,0.896 2.464,0 4.62934,-0.896 2.24,-0.97067 3.88266,-2.61333 1.64267,-1.64267 2.61334,-3.80801 0.97067,-2.24 0.97067,-4.704 0,-2.464 -0.97067,-4.704 -0.97067,-2.24 -2.61334,-3.88267 -1.64266,-1.64267 -3.88266,-2.61333 -2.16534,-0.97067 -4.62934,-0.97067 -2.53867,0 -4.77867,0.97067 -2.16533,0.97066 -3.808,2.61333 -1.568,1.64267 -2.53867,3.88267 -0.896,2.24 -0.896,4.704 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path9567" />
|
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g style="white-space:pre;shape-inside:url(#rect418-2-3);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
||||||
aria-label="y"
|
<path d="m186.562 360.867 10.976 28.075 10.752-28.075h6.72l-18.742 47.563h-6.272l4.256-10.827-14.485-36.736z" aria-label="y" transform="translate(-11.286 -114.11)scale(.44612)" />
|
||||||
transform="matrix(0.44612332,0,0,0.44612332,-11.285794,-114.11033)"
|
|
||||||
id="text416-2-84"
|
|
||||||
style="font-size:74.6667px;font-family:'The Amaranth';-inkscape-font-specification:'The Amaranth, Normal';white-space:pre;shape-inside:url(#rect418-2-3);display:inline;fill:#ff1c30;stroke-width:1.06591;stroke-linejoin:round">
|
|
||||||
<path
|
|
||||||
d="m 186.56151,360.86718 10.97601,28.07468 10.752,-28.07468 h 6.72001 l -18.74135,47.56269 h -6.272 l 4.256,-10.82667 -14.48534,-36.73602 z"
|
|
||||||
style="font-family:'Bunya PERSONAL';-inkscape-font-specification:'Bunya PERSONAL, Normal'"
|
|
||||||
id="path9564" />
|
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</svg>
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 3.8 KiB |
@@ -1,26 +1,26 @@
|
|||||||
{
|
{
|
||||||
inputHash: '3452c6ea1c84f59aedf5530bf86a7a51',
|
inputHash: 'a53fa87bb5266adf84b58a347e807a9f',
|
||||||
outputs: [
|
outputs: [
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/channel-poster_fhd.png',
|
outputFilePath: 'images/channel-poster_fhd.png',
|
||||||
outputHash: '50729b5bdd2a7c0fd4a1d502812117d4',
|
outputHash: '1b224960fc8923434d9fd2fdd0262e02',
|
||||||
width: 540,
|
width: 540,
|
||||||
height: 405,
|
height: 405,
|
||||||
background: '#EEEEEE',
|
background: '#EBEBEB',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/channel-poster_hd.png',
|
outputFilePath: 'images/channel-poster_hd.png',
|
||||||
outputHash: '8022dc6fa993ce3194c5aea37d6ea49a',
|
outputHash: 'e3177153969166fa5f7352f3e38db852',
|
||||||
width: 290,
|
width: 290,
|
||||||
height: 218,
|
height: 218,
|
||||||
background: '#EEEEEE',
|
background: '#EBEBEB',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
outputFilePath: 'images/channel-poster_sd.png',
|
outputFilePath: 'images/channel-poster_sd.png',
|
||||||
outputHash: '63b8f12ac155c29b4e85db17a2886817',
|
outputHash: '1dd56e1db02ca90beecc52e56160ad58',
|
||||||
width: 246,
|
width: 246,
|
||||||
height: 140,
|
height: 140,
|
||||||
background: '#EEEEEE',
|
background: '#EBEBEB',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@@ -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=20
|
minor_version=24
|
||||||
build_version=00001
|
build_version=00006
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
|
|
||||||
@@ -27,9 +27,10 @@ confirm_partner_button=1
|
|||||||
|
|
||||||
supports_input_launch=1
|
supports_input_launch=1
|
||||||
|
|
||||||
playlet_lib_remote_url=https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip
|
playlet_lib_squashfs_remote_url=https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.squashfs.pkg
|
||||||
playlet_lib_embedded_url=pkg:/lib/playlet-lib.zip
|
playlet_lib_zip_remote_url=https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip
|
||||||
playlet_lib_debug_url=http://DEBUG_HOST_IP_ADDRESS:8086/playlet-lib.zip
|
playlet_lib_zip_embedded_url=pkg:/lib/playlet-lib.zip
|
||||||
|
playlet_lib_zip_debug_url=http://DEBUG_HOST_IP_ADDRESS:8086/playlet-lib.zip
|
||||||
|
|
||||||
git_commit_sha=unknown
|
git_commit_sha=unknown
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ function DialogSetPalette(msgDialog as object)
|
|||||||
DialogBackgroundColor: "#242424FF"
|
DialogBackgroundColor: "#242424FF"
|
||||||
DialogFocusColor: "#CECECEFF"
|
DialogFocusColor: "#CECECEFF"
|
||||||
DialogFocusItemColor: "#202020FF"
|
DialogFocusItemColor: "#202020FF"
|
||||||
DialogSecondaryTextColor: "#DBDBDBFF"
|
DialogSecondaryTextColor: "#EBEBEBFF"
|
||||||
DialogSecondaryItemColor: "#FF1C30FF"
|
DialogSecondaryItemColor: "#FF1C30FF"
|
||||||
DialogTextColor: "#DBDBDBFF"
|
DialogTextColor: "#EBEBEBFF"
|
||||||
}
|
}
|
||||||
msgDialog.palette = palette
|
msgDialog.palette = palette
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ function Main(args as object) as void
|
|||||||
Logger.Init()
|
Logger.Init()
|
||||||
|
|
||||||
Registry.ClearPlayletLibUrlsIfNeeded(args)
|
Registry.ClearPlayletLibUrlsIfNeeded(args)
|
||||||
|
Registry.ClearRegistryIfNeeded(args)
|
||||||
|
|
||||||
scene = screen.CreateScene("BootstrapScene")
|
scene = screen.CreateScene("BootstrapScene")
|
||||||
screen.show()
|
screen.show()
|
||||||
@@ -45,10 +46,9 @@ function Main(args as object) as void
|
|||||||
input = CreateObject("roInput")
|
input = CreateObject("roInput")
|
||||||
input.setMessagePort(port)
|
input.setMessagePort(port)
|
||||||
|
|
||||||
' TODO:P2 follow up on bug where roSystemLog does not fire for a video player in ComponentLibrary
|
|
||||||
' https://community.roku.com/t5/Roku-Developer-Program/BUG-roSystemLog-not-firing-with-ComponentLibrary/td-p/906075
|
|
||||||
systemLog = CreateObject("roSystemLog")
|
systemLog = CreateObject("roSystemLog")
|
||||||
systemLog.SetMessagePort(port)
|
systemLog.SetMessagePort(port)
|
||||||
|
' Although all types are enabled, they are filtered in Playlet Lib to avoid spamming the logs
|
||||||
systemLog.EnableType("http.connect")
|
systemLog.EnableType("http.connect")
|
||||||
systemLog.EnableType("http.error")
|
systemLog.EnableType("http.error")
|
||||||
systemLog.EnableType("http.complete")
|
systemLog.EnableType("http.complete")
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ namespace Tests
|
|||||||
@it("Reads values from manifest")
|
@it("Reads values from manifest")
|
||||||
@params("title", "Playlet")
|
@params("title", "Playlet")
|
||||||
@params("supports_input_launch", "1")
|
@params("supports_input_launch", "1")
|
||||||
@params("playlet_lib_remote_url", "https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip")
|
@params("playlet_lib_squashfs_remote_url", "https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.squashfs.pkg")
|
||||||
@params("playlet_lib_embedded_url", "pkg:/lib/playlet-lib.zip")
|
@params("playlet_lib_zip_remote_url", "https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip")
|
||||||
|
@params("playlet_lib_zip_embedded_url", "pkg:/lib/playlet-lib.zip")
|
||||||
function _(key as string, expectedValue as string)
|
function _(key as string, expectedValue as string)
|
||||||
m.assertEqual(Manifest.ReadValue(key), expectedValue)
|
m.assertEqual(Manifest.ReadValue(key), expectedValue)
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -14,6 +14,15 @@ namespace Registry
|
|||||||
sec.Flush()
|
sec.Flush()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function DeleteAll()
|
||||||
|
reg = CreateObject("roRegistry")
|
||||||
|
sectionNames = reg.GetSectionList()
|
||||||
|
for each sectionName in sectionNames
|
||||||
|
reg.Delete(sectionName)
|
||||||
|
end for
|
||||||
|
reg.Flush()
|
||||||
|
end function
|
||||||
|
|
||||||
function GetPlayletLibUrlsFromRegistry() as object
|
function GetPlayletLibUrlsFromRegistry() as object
|
||||||
urlsJson = ReadKey("playlet_lib_urls", "Playlet")
|
urlsJson = ReadKey("playlet_lib_urls", "Playlet")
|
||||||
if urlsJson = invalid
|
if urlsJson = invalid
|
||||||
@@ -31,4 +40,12 @@ namespace Registry
|
|||||||
Logger.Log("Cleared key playlet_lib_urls from registry")
|
Logger.Log("Cleared key playlet_lib_urls from registry")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ClearRegistryIfNeeded(launchArgs as object) as void
|
||||||
|
if launchArgs = invalid or launchArgs.clearRegistry = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
DeleteAll()
|
||||||
|
Logger.Log("Cleared all data from registry")
|
||||||
|
end function
|
||||||
|
|
||||||
end namespace
|
end namespace
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.20.1",
|
"version": "0.24.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.20.1"
|
"version": "0.24.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.20.1",
|
"version": "0.24.6",
|
||||||
"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",
|
||||||
"prebuild:dev": "npm run prebuild",
|
"prebuild:dev": "npm run prebuild",
|
||||||
"prebuild:prod": "npm run prebuild",
|
"prebuild:prod": "npm run prebuild",
|
||||||
"build:dev": "bsc --create-package --debug --sourceMap=true --lintConfig ../config/bslint.jsonc",
|
"build:dev": "bsc --create-package --debug --sourceMap=true --lintConfig ../config/bslint.jsonc",
|
||||||
"build:prod": "bsc --create-package --sourceMap=false --lintConfig ../config/bslint.jsonc",
|
"build:prod": "bsc --create-package --sourceMap=false --lintConfig ../config/bslint.jsonc",
|
||||||
"postbuild": "mkdir -p ../release && mkdir -p ../playlet-app/src/lib && cp ../dist/playlet-lib.zip ../playlet-app/src/lib/playlet-lib.zip",
|
"postbuild": "mkdir -p ../release && mkdir -p ../playlet-app/src/lib && cp ../dist/playlet-lib.zip ../playlet-app/src/lib/playlet-lib.zip",
|
||||||
"postbuild:dev": "npm run postbuild",
|
"postbuild:dev": "npm run postbuild",
|
||||||
"postbuild:prod": "npm run postbuild && cp ../dist/playlet-lib.zip ../release/playlet-lib.zip",
|
"postbuild:prod": "npm run postbuild && cp ../dist/playlet-lib.zip ../release/playlet-lib.zip && npm run squash-fs && npm run sign-package",
|
||||||
|
"squash-fs": "node ../tools/squash-fs.js --in-file ../release/playlet-lib.zip --out-file ../release/playlet-lib.squashfs.zip",
|
||||||
|
"sign-package": "node ../tools/sign-package.js --out-file playlet-lib.squashfs.zip --out-dir ../release --staging-dir ../build/playlet-lib",
|
||||||
"lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc",
|
"lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc",
|
||||||
"lint:fix": "npm run lint -- --fix",
|
"lint:fix": "npm run lint -- --fix",
|
||||||
"format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"!**/*.transpiled/**\" \"!**/*.transpiled.*\" --bsfmt-path ../config/bsfmt.jsonc",
|
"format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"!**/*.transpiled/**\" \"!**/*.transpiled.*\" --bsfmt-path ../config/bsfmt.jsonc",
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ import "pkg:/components/Navigation/LongPress.bs"
|
|||||||
import "pkg:/components/VideoQueue/VideoQueueUtils.bs"
|
import "pkg:/components/VideoQueue/VideoQueueUtils.bs"
|
||||||
import "pkg:/components/VideoQueue/VideoQueueViewUtils.bs"
|
import "pkg:/components/VideoQueue/VideoQueueViewUtils.bs"
|
||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
|
import "pkg:/source/utils/Locale.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
|
import "pkg:/source/utils/RemoteKeys.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()
|
||||||
m.screens = {}
|
m.screens = {}
|
||||||
|
m.firstScreenCalled = false
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
@@ -58,7 +61,7 @@ function ShowRootScreen(screenName as string) as void
|
|||||||
screen.id = screenName
|
screen.id = screenName
|
||||||
m.screens[screenName] = screen
|
m.screens[screenName] = screen
|
||||||
' 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.screensContainer.insertChild(screen, 0)
|
||||||
if screen.hasField("binding_done")
|
if screen.hasField("binding_done")
|
||||||
screen@.BindNode()
|
screen@.BindNode()
|
||||||
end if
|
end if
|
||||||
@@ -68,6 +71,10 @@ function ShowRootScreen(screenName as string) as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
screen.visible = true
|
screen.visible = true
|
||||||
|
if not m.firstScreenCalled
|
||||||
|
m.firstScreenCalled = true
|
||||||
|
NodeSetFocus(screen, true)
|
||||||
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetRootScreen(screenName as string) as object
|
function GetRootScreen(screenName as string) as object
|
||||||
@@ -80,18 +87,18 @@ function GetRootScreen(screenName as string) as object
|
|||||||
return m.screens[screenName]
|
return m.screens[screenName]
|
||||||
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 LongPressHandler(key, press)
|
if LongPressHandler(key, press)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = OPTIONS_LONG_PRESS_KEY and press
|
if key = RemoteKeys.OptionsLongPress and press
|
||||||
LogInfo("Opening VideoQueueView")
|
LogInfo("Opening VideoQueueView")
|
||||||
VideoQueueViewUtils.Open(m.top.videoQueue, m.top)
|
VideoQueueViewUtils.Open(m.top.videoQueue, m.top)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "options" and not press
|
if key = RemoteKeys.Options and not press
|
||||||
if VideoQueueUtils.ToggleVideoPictureInPicture(m.top.videoQueue)
|
if VideoQueueUtils.ToggleVideoPictureInPicture(m.top.videoQueue)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
@@ -101,31 +108,31 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "play"
|
if key = RemoteKeys.Play
|
||||||
if VideoQueueUtils.TogglePause(m.top.videoQueue)
|
if VideoQueueUtils.TogglePause(m.top.videoQueue)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "pause"
|
if key = RemoteKeys.Pause
|
||||||
if VideoQueueUtils.Pause(m.top.videoQueue)
|
if VideoQueueUtils.Pause(m.top.videoQueue)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "playonly"
|
if key = RemoteKeys.PlayOnly
|
||||||
if VideoQueueUtils.Play(m.top.videoQueue)
|
if VideoQueueUtils.Play(m.top.videoQueue)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "back"
|
if key = RemoteKeys.Back
|
||||||
if VideoQueueUtils.IsVideoPlayerOpen(m.top.videoQueue) and not VideoQueueUtils.IsVideoPlayerFullScreen(m.top.videoQueue)
|
if VideoQueueUtils.IsVideoPlayerOpen(m.top.videoQueue) and not VideoQueueUtils.IsVideoPlayerFullScreen(m.top.videoQueue)
|
||||||
if VideoQueueUtils.ToggleVideoPictureInPicture(m.top.videoQueue)
|
if VideoQueueUtils.ToggleVideoPictureInPicture(m.top.videoQueue)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
dialog = DialogUtils.ShowDialogButtons("Do you want to exit Playlet?", "Exit", ["Exit", "Cancel"])
|
dialog = DialogUtils.ShowDialogButtons(Tr(Locale.Dialogs.ExitPlayletQuestion), Tr(Locale.Buttons.exit), [Tr(Locale.Buttons.exit), Tr(Locale.Buttons.Cancel)])
|
||||||
dialog.observeField("buttonSelected", FuncName(OnExitDialog), ["buttonSelected"])
|
dialog.observeField("buttonSelected", FuncName(OnExitDialog), ["buttonSelected"])
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<component name="AppController" extends="Group" includes="AutoBind">
|
<component name="AppController" extends="Group" includes="AutoBind">
|
||||||
<interface>
|
<interface>
|
||||||
|
<field id="screensContainer" type="node" />
|
||||||
<field id="root" type="node" />
|
<field id="root" type="node" />
|
||||||
<field id="stack" type="node" />
|
<field id="stack" type="node" />
|
||||||
<field id="videoQueue" type="node" />
|
<field id="videoQueue" type="node" />
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ function OnFocusChange() as void
|
|||||||
if m.lastFocusedChild <> invalid
|
if m.lastFocusedChild <> invalid
|
||||||
focusNode = m.lastFocusedChild
|
focusNode = m.lastFocusedChild
|
||||||
else if m.top.getChildCount() > 0
|
else if m.top.getChildCount() > 0
|
||||||
focusNode = m.top.getChild(0)
|
focusNode = m.top.getChild(m.top.getChildCount() - 1)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if focusNode <> invalid
|
if focusNode <> invalid
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
' TODO:P1 this is a duplicate of AppRoot, refactor to use the same code
|
||||||
|
function Init()
|
||||||
|
m.scrollAnimation = m.top.findNode("scrollAnimation")
|
||||||
|
m.scrollAnimationInterpolator = m.scrollAnimation.findNode("scrollAnimationInterpolator")
|
||||||
|
m.lastFocusedChild = invalid
|
||||||
|
m.top.observeField("focusedChild", FuncName(OnFocusedChildChange))
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFocusChange() as void
|
||||||
|
if not m.top.focus
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
focusNode = invalid
|
||||||
|
if m.lastFocusedChild <> invalid
|
||||||
|
focusNode = m.lastFocusedChild
|
||||||
|
else if m.top.getChildCount() > 0
|
||||||
|
focusNode = m.top.getChild(0)
|
||||||
|
end if
|
||||||
|
|
||||||
|
if focusNode <> invalid
|
||||||
|
NodeSetFocus(focusNode, true)
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFocusedChildChange() as void
|
||||||
|
if m.top.focusedChild <> invalid
|
||||||
|
m.lastFocusedChild = m.top.focusedChild
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnAnimateToPosition() as void
|
||||||
|
m.scrollAnimation.control = "stop"
|
||||||
|
|
||||||
|
current = m.top.translation[0]
|
||||||
|
destination = m.top.animateToPosition
|
||||||
|
|
||||||
|
if current = destination
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.scrollAnimationInterpolator.keyValue = [[current, 0], [(current + destination) / 2, 0], [destination, 0]]
|
||||||
|
m.scrollAnimation.control = "start"
|
||||||
|
end function
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<component name="AppScreens" extends="Group" includes="Focus">
|
||||||
|
<interface>
|
||||||
|
<field id="animateToPosition" type="float" onChange="OnAnimateToPosition" />
|
||||||
|
</interface>
|
||||||
|
<children>
|
||||||
|
<Animation
|
||||||
|
id="scrollAnimation"
|
||||||
|
duration="0.2">
|
||||||
|
<Vector2DFieldInterpolator
|
||||||
|
id="scrollAnimationInterpolator"
|
||||||
|
key="[ 0.0, 0.5, 1.0 ]"
|
||||||
|
fieldToInterp="AppScreens.translation" />
|
||||||
|
</Animation>
|
||||||
|
</children>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
import "pkg:/source/utils/MathUtils.bs"
|
||||||
|
import "pkg:/source/utils/RemoteKeys.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.backgroundNode = m.top.findNode("background")
|
||||||
|
m.labelNode = m.top.findNode("label")
|
||||||
|
m.iconNode = m.top.findNode("icon")
|
||||||
|
m.anchorNode = m.top.findNode("anchor")
|
||||||
|
m.focusAnimation = m.top.findNode("focusAnimation")
|
||||||
|
m.normalFont = m.top.findNode("normalFont")
|
||||||
|
m.boldFont = m.top.findNode("boldFont")
|
||||||
|
|
||||||
|
DoLayout()
|
||||||
|
OnDisabledChange()
|
||||||
|
m.top.observeField("focusedChild", FuncName(OnFocusedChild))
|
||||||
|
end function
|
||||||
|
|
||||||
|
function DoLayout() as void
|
||||||
|
minWidth = m.top.minWidth
|
||||||
|
height = m.top.height
|
||||||
|
padding = m.top.padding
|
||||||
|
textVisible = m.top.textVisible
|
||||||
|
iconVisible = m.top.iconVisible
|
||||||
|
|
||||||
|
if not textVisible and not iconVisible
|
||||||
|
m.top.width = minWidth
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
contentWidth = 0
|
||||||
|
iconWidth = 0
|
||||||
|
iconHeight = 0
|
||||||
|
textWidth = 0
|
||||||
|
iconTextSpacing = 0
|
||||||
|
|
||||||
|
if iconVisible
|
||||||
|
iconWidth = m.top.iconWidth
|
||||||
|
iconHeight = m.top.iconHeight
|
||||||
|
contentWidth += iconWidth
|
||||||
|
end if
|
||||||
|
|
||||||
|
if textVisible
|
||||||
|
labelRect = m.labelNode.boundingRect()
|
||||||
|
textWidth = labelRect.width
|
||||||
|
contentWidth += textWidth
|
||||||
|
end if
|
||||||
|
|
||||||
|
if iconVisible and textVisible
|
||||||
|
iconTextSpacing = m.top.iconTextSpacing
|
||||||
|
contentWidth += iconTextSpacing
|
||||||
|
end if
|
||||||
|
|
||||||
|
contentWidth += padding[0] + padding[1]
|
||||||
|
|
||||||
|
width = MathUtils.Max(contentWidth, minWidth)
|
||||||
|
m.top.width = width
|
||||||
|
|
||||||
|
if iconVisible
|
||||||
|
x = (width - contentWidth) / 2 + padding[0]
|
||||||
|
y = (height - iconHeight) / 2
|
||||||
|
m.iconNode.translation = [x, y]
|
||||||
|
end if
|
||||||
|
|
||||||
|
if textVisible
|
||||||
|
x = (width - contentWidth) / 2 + padding[0] + iconWidth + iconTextSpacing
|
||||||
|
m.labelNode.height = height
|
||||||
|
m.labelNode.translation = [x, 0]
|
||||||
|
end if
|
||||||
|
|
||||||
|
OnAnchorChange()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnAnchorChange()
|
||||||
|
width = m.top.width
|
||||||
|
height = m.top.height
|
||||||
|
anchor = m.top.anchor
|
||||||
|
|
||||||
|
m.anchorNode.scaleRotateCenter = [width / 2, height / 2]
|
||||||
|
m.anchorNode.translation = [-width * anchor[0], -height * anchor[1]]
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnDisabledChange()
|
||||||
|
disabled = m.top.disabled
|
||||||
|
|
||||||
|
if disabled
|
||||||
|
if m.top.textVisible
|
||||||
|
m.labelNode.color = m.top.disabledTextColor
|
||||||
|
m.labelNode.font = m.normalFont
|
||||||
|
end if
|
||||||
|
if m.top.iconVisible
|
||||||
|
m.iconNode.blendColor = m.top.disabledIconColor
|
||||||
|
end if
|
||||||
|
m.backgroundNode.blendColor = m.top.disabledBackgroundColor
|
||||||
|
else
|
||||||
|
OnButtonFocused()
|
||||||
|
end if
|
||||||
|
m.top.focusable = not disabled
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFocusedChild()
|
||||||
|
m.top.buttonFocused = m.top.hasFocus()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnButtonFocused()
|
||||||
|
buttonFocused = m.top.buttonFocused
|
||||||
|
textVisible = m.top.textVisible
|
||||||
|
iconVisible = m.top.iconVisible
|
||||||
|
|
||||||
|
if buttonFocused
|
||||||
|
if textVisible
|
||||||
|
m.labelNode.color = m.top.focusedTextColor
|
||||||
|
m.labelNode.font = m.boldFont
|
||||||
|
end if
|
||||||
|
if iconVisible
|
||||||
|
m.iconNode.blendColor = m.top.focusedIconColor
|
||||||
|
end if
|
||||||
|
m.backgroundNode.blendColor = m.top.focusedBackgroundColor
|
||||||
|
|
||||||
|
m.focusAnimation.control = "start"
|
||||||
|
else
|
||||||
|
if textVisible
|
||||||
|
m.labelNode.color = m.top.textColor
|
||||||
|
m.labelNode.font = m.normalFont
|
||||||
|
end if
|
||||||
|
if iconVisible
|
||||||
|
m.iconNode.blendColor = m.top.iconColor
|
||||||
|
end if
|
||||||
|
m.backgroundNode.blendColor = m.top.backgroundColor
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||||
|
if not press
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = RemoteKeys.Ok
|
||||||
|
disabled = m.top.disabled
|
||||||
|
if not disabled
|
||||||
|
m.top.buttonSelected = true
|
||||||
|
end if
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
return false
|
||||||
|
end function
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<component name="ButtonEx" extends="Group">
|
||||||
|
<interface>
|
||||||
|
<field id="text" type="string" alias="label.text" onChange="DoLayout" />
|
||||||
|
<field id="textVisible" type="boolean" alias="label.visible" onChange="DoLayout" />
|
||||||
|
<field id="textColor" type="color" value="#DDDDDD" />
|
||||||
|
<field id="focusedTextColor" type="color" value="#262626" />
|
||||||
|
<field id="disabledTextColor" type="color" value="#606060" />
|
||||||
|
<field id="normalFontSize" type="integer" alias="normalFont.size" onChange="DoLayout" />
|
||||||
|
<field id="boldFontSize" type="integer" alias="boldFont.size" onChange="DoLayout" />
|
||||||
|
|
||||||
|
<field id="iconTextSpacing" type="float" value="10" onChange="DoLayout" />
|
||||||
|
|
||||||
|
<field id="iconUri" type="uri" alias="icon.uri" />
|
||||||
|
<field id="iconVisible" type="boolean" alias="icon.visible" onChange="DoLayout" />
|
||||||
|
<field id="iconWidth" type="float" alias="icon.width" value="42" onChange="DoLayout" />
|
||||||
|
<field id="iconHeight" type="float" alias="icon.height" value="42" onChange="DoLayout" />
|
||||||
|
<field id="iconColor" type="color" value="#DDDDDD" />
|
||||||
|
<field id="focusedIconColor" type="color" value="#262626" />
|
||||||
|
<field id="disabledIconColor" type="color" value="#606060" />
|
||||||
|
|
||||||
|
<field id="backgroundColor" type="color" value="#3C3C3C" />
|
||||||
|
<field id="focusedBackgroundColor" type="color" value="#DDDDDD" />
|
||||||
|
<field id="disabledBackgroundColor" type="color" value="#292929" />
|
||||||
|
|
||||||
|
<field id="width" type="float" alias="background.width" onChange="DoLayout" />
|
||||||
|
<field id="minWidth" type="float" onChange="DoLayout" />
|
||||||
|
<field id="height" type="float" alias="background.height" onChange="DoLayout" value="58" />
|
||||||
|
<field id="padding" type="vector2d" value="[20,20]" onChange="DoLayout" />
|
||||||
|
<field id="anchor" type="vector2d" onChange="OnAnchorChange" />
|
||||||
|
<field id="disabled" type="boolean" onChange="OnDisabledChange" />
|
||||||
|
|
||||||
|
<field id="buttonSelected" type="boolean" alwaysNotify="true" />
|
||||||
|
<field id="buttonFocused" type="boolean" onChange="OnButtonFocused" />
|
||||||
|
</interface>
|
||||||
|
<children>
|
||||||
|
<Font id="normalFont" uri="font:SystemFontFile" size="24" />
|
||||||
|
<Font id="boldFont" uri="font:MediumSystemFontFile" size="24" />
|
||||||
|
<Group id="anchor">
|
||||||
|
<Poster
|
||||||
|
id="background"
|
||||||
|
uri="pkg:/images/button-ex.9.png">
|
||||||
|
<Poster id="icon" />
|
||||||
|
<Label
|
||||||
|
id="label"
|
||||||
|
horizAlign="center"
|
||||||
|
vertAlign="center" />
|
||||||
|
</Poster>
|
||||||
|
</Group>
|
||||||
|
<Animation
|
||||||
|
id="focusAnimation"
|
||||||
|
optional="true"
|
||||||
|
duration="0.15">
|
||||||
|
<Vector2DFieldInterpolator
|
||||||
|
id="scale"
|
||||||
|
key="[ 0.0, 0.5, 1.0 ]"
|
||||||
|
keyValue="[ [ 1.0, 1.0 ], [ 1.05, 1.05 ], [ 1.0, 1.0 ] ]"
|
||||||
|
fieldToInterp="anchor.scale" />
|
||||||
|
</Animation>
|
||||||
|
</children>
|
||||||
|
</component>
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
|
import "pkg:/components/ContextMenu/ContextMenuUtils.bs"
|
||||||
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
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/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/Locale.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
|
import "pkg:/source/utils/RemoteKeys.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"
|
||||||
|
|
||||||
@@ -16,6 +20,7 @@ function Init()
|
|||||||
m.banner = m.top.findNode("banner")
|
m.banner = m.top.findNode("banner")
|
||||||
m.thumbnail = m.top.findNode("thumbnail")
|
m.thumbnail = m.top.findNode("thumbnail")
|
||||||
m.authorLabel = m.top.findNode("authorLabel")
|
m.authorLabel = m.top.findNode("authorLabel")
|
||||||
|
m.subCountLabel = m.top.findNode("subCountLabel")
|
||||||
m.subscribeButton = m.top.findNode("subscribeButton")
|
m.subscribeButton = m.top.findNode("subscribeButton")
|
||||||
m.rowList = m.top.FindNode("rowList")
|
m.rowList = m.top.FindNode("rowList")
|
||||||
m.rowList.focusable = true
|
m.rowList.focusable = true
|
||||||
@@ -26,15 +31,16 @@ function Init()
|
|||||||
m.authorId = ""
|
m.authorId = ""
|
||||||
|
|
||||||
InitializeTabs()
|
InitializeTabs()
|
||||||
|
InitializeSortOptions()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeready()
|
function OnNodeready()
|
||||||
m.rowList@.BindNode()
|
m.rowList@.BindNode()
|
||||||
|
|
||||||
SetNavigation(m.rowList, "up", m.subscribeButton)
|
SetNavigation(m.rowList, RemoteKeys.Up, m.subscribeButton)
|
||||||
SetNavigation(m.subscribeButton, "down", m.rowList)
|
SetNavigation(m.subscribeButton, RemoteKeys.Down, m.rowList)
|
||||||
|
|
||||||
m.subscribeButton.text = "Subscribe"
|
m.subscribeButton.text = Tr(Locale.Buttons.Subscribe)
|
||||||
DisposableObserveFieldScoped(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
|
DisposableObserveFieldScoped(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
|
||||||
|
|
||||||
SetSubscribeButtonVisibility()
|
SetSubscribeButtonVisibility()
|
||||||
@@ -60,6 +66,7 @@ function OnContentSet() as void
|
|||||||
|
|
||||||
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
|
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
|
||||||
m.authorLabel.text = content._author
|
m.authorLabel.text = content._author
|
||||||
|
m.subCountLabel.text = content.subCountText
|
||||||
m.banner.uri = content.banner
|
m.banner.uri = content.banner
|
||||||
if StringUtils.IsNullOrEmpty(content.thumbnail)
|
if StringUtils.IsNullOrEmpty(content.thumbnail)
|
||||||
m.thumbnail.uri = ""
|
m.thumbnail.uri = ""
|
||||||
@@ -98,7 +105,7 @@ function CreateChannelFeeds(authorId as string, author as string, tabs as object
|
|||||||
return feeds
|
return feeds
|
||||||
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 NavigationKeyHandler(key, press).handled
|
if NavigationKeyHandler(key, press).handled
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
@@ -107,10 +114,11 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "back"
|
if key = RemoteKeys.Back
|
||||||
Close()
|
Close()
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -170,25 +178,51 @@ end function
|
|||||||
|
|
||||||
function InitializeTabs()
|
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("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
|
"releases": function(authorId as string, author as string) as object
|
||||||
|
return CreateChannelFeed("Releases", "channel_releases", authorId, author)
|
||||||
|
end function
|
||||||
|
"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
|
end function
|
||||||
}
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function InitializeSortOptions()
|
||||||
|
m.sortOptions = {
|
||||||
|
"channel_videos": [{
|
||||||
|
"id": "newest"
|
||||||
|
"title": "Latest"
|
||||||
|
}, {
|
||||||
|
"id": "popular"
|
||||||
|
"title": "Popular"
|
||||||
|
}, {
|
||||||
|
"id": "oldest"
|
||||||
|
"title": "Oldest"
|
||||||
|
}]
|
||||||
|
"channel_playlists": [{
|
||||||
|
"id": "newest"
|
||||||
|
"title": "Date added (newest)"
|
||||||
|
}, {
|
||||||
|
"id": "last"
|
||||||
|
"title": "Last video added"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
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
|
||||||
|
title = Tr(title)
|
||||||
return {
|
return {
|
||||||
title: title
|
title: title
|
||||||
feedSources: [{
|
feedSources: [{
|
||||||
@@ -207,7 +241,32 @@ function GetContextMenuOptionsForItem(video as object) as object
|
|||||||
if StringUtils.IsNullOrEmpty(m.top.authorId)
|
if StringUtils.IsNullOrEmpty(m.top.authorId)
|
||||||
return []
|
return []
|
||||||
end if
|
end if
|
||||||
return m.bookmarks@.GetMenuForChannel(m.top.content)
|
options = m.bookmarksService@.GetMenuForChannel(m.top.content)
|
||||||
|
options.Append(GetSortingContextMenuOptionsForItem(video))
|
||||||
|
return options
|
||||||
|
end function
|
||||||
|
|
||||||
|
function GetSortingContextMenuOptionsForItem(video as object) as object
|
||||||
|
feedContentNode = video.getParent()
|
||||||
|
if feedContentNode = invalid or not feedContentNode.hasField("feedSources")
|
||||||
|
return []
|
||||||
|
end if
|
||||||
|
|
||||||
|
feedSources = feedContentNode.feedSources
|
||||||
|
if feedSources = invalid or feedSources.Count() = 0
|
||||||
|
return []
|
||||||
|
end if
|
||||||
|
|
||||||
|
feedSource = feedSources[0]
|
||||||
|
endpoint = feedSource.endpoint
|
||||||
|
if not m.sortOptions.DoesExist(endpoint)
|
||||||
|
return []
|
||||||
|
end if
|
||||||
|
|
||||||
|
title = Tr(Locale.Dialogs.SortFeedBy).replace("%1", `"${feedSource.title}"`)
|
||||||
|
sortOptions = m.sortOptions[endpoint]
|
||||||
|
|
||||||
|
return [ContextMenuUtils.CreateOption(title + "...", m.top, "ShowSortDialog", [title, sortOptions, feedContentNode])]
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function IsLoggedIn() as boolean
|
function IsLoggedIn() as boolean
|
||||||
@@ -236,10 +295,10 @@ function OnAuthorIdChange()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function SetSubscribeButtonVisibility()
|
function SetSubscribeButtonVisibility()
|
||||||
isLogged = IsLoggedIn()
|
isEnabled = IsLoggedIn() and not StringUtils.IsNullOrEmpty(m.top.authorId)
|
||||||
m.subscribeButton.visible = isLogged and not StringUtils.IsNullOrEmpty(m.top.authorId)
|
m.subscribeButton.visible = isEnabled
|
||||||
m.subscribeButton.focusable = m.subscribeButton.visible
|
m.subscribeButton.focusable = isEnabled
|
||||||
if not m.subscribeButton.visible and m.subscribeButton.hasFocus()
|
if not isEnabled and m.subscribeButton.hasFocus()
|
||||||
NodeSetFocus(m.rowList, true)
|
NodeSetFocus(m.rowList, true)
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
@@ -247,8 +306,56 @@ end function
|
|||||||
function OnSubscriptionChanged()
|
function OnSubscriptionChanged()
|
||||||
isSubbed = IsSubscribed()
|
isSubbed = IsSubscribed()
|
||||||
if isSubbed
|
if isSubbed
|
||||||
m.subscribeButton.text = "Unsubscribe"
|
m.subscribeButton.text = Tr(Locale.Buttons.Unsubscribe)
|
||||||
else
|
else
|
||||||
m.subscribeButton.text = "Subscribe"
|
m.subscribeButton.text = Tr(Locale.Buttons.Subscribe)
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ShowSortDialog(title as string, sortOptions as object, feedContentNode as object)
|
||||||
|
buttons = []
|
||||||
|
for i = 0 to sortOptions.Count() - 1
|
||||||
|
buttons.Push(Tr(sortOptions[i].title))
|
||||||
|
end for
|
||||||
|
|
||||||
|
dialog = DialogUtils.ShowDialogButtons("", title, buttons)
|
||||||
|
dialog.addFields({
|
||||||
|
"feedContentNode": feedContentNode
|
||||||
|
"sortOptions": sortOptions
|
||||||
|
})
|
||||||
|
dialog.observeField("buttonSelected", FuncName(OnSortDialogResult), ["buttonSelected"])
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnSortDialogResult(event as object) as void
|
||||||
|
dialog = event.getRoSGNode()
|
||||||
|
sortOptions = dialog.sortOptions
|
||||||
|
buttonIndex = event.GetData()
|
||||||
|
|
||||||
|
if not IsInt(buttonIndex) or buttonIndex < 0 or buttonIndex >= sortOptions.Count()
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
selected = sortOptions[buttonIndex]
|
||||||
|
|
||||||
|
feedContentNode = dialog.feedContentNode
|
||||||
|
feedSources = feedContentNode.feedSources
|
||||||
|
if feedSources = invalid or feedSources.Count() = 0
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
selectedFeedSource = feedSources[0]
|
||||||
|
|
||||||
|
currentFeeds = m.rowList.feeds
|
||||||
|
for i = 0 to currentFeeds.Count() - 1
|
||||||
|
feed = currentFeeds[i]
|
||||||
|
feedSource = feed.feedSources[0]
|
||||||
|
if feedSource.id = selectedFeedSource.id
|
||||||
|
if feedSource.queryParams = invalid
|
||||||
|
feedSource.queryParams = {}
|
||||||
|
end if
|
||||||
|
|
||||||
|
feedSource.queryParams["sort_by"] = selected.id
|
||||||
|
m.rowList.feeds = currentFeeds
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
end function
|
||||||
@@ -4,7 +4,8 @@
|
|||||||
<field id="authorId" type="string" onChange="OnAuthorIdChange" />
|
<field id="authorId" type="string" onChange="OnAuthorIdChange" />
|
||||||
<field id="appController" type="node" bind="/AppController" />
|
<field id="appController" type="node" bind="/AppController" />
|
||||||
<field id="invidious" type="node" bind="/Invidious" />
|
<field id="invidious" type="node" bind="/Invidious" />
|
||||||
<field id="bookmarks" type="node" bind="/Bookmarks" />
|
<field id="bookmarksService" type="node" bind="/BookmarksService" />
|
||||||
|
<function name="ShowSortDialog" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
translation="[115,20]"
|
translation="[115,20]"
|
||||||
width="104"
|
width="104"
|
||||||
height="104"
|
height="104"
|
||||||
|
blendColor="#DDDDDDFF"
|
||||||
uri="pkg:/images/white-circle.png">
|
uri="pkg:/images/white-circle.png">
|
||||||
|
|
||||||
<CirclePoster
|
<CirclePoster
|
||||||
@@ -36,15 +38,18 @@
|
|||||||
id="authorLabel"
|
id="authorLabel"
|
||||||
translation="[115,40]"
|
translation="[115,40]"
|
||||||
font="font:MediumBoldSystemFont" />
|
font="font:MediumBoldSystemFont" />
|
||||||
|
<Label
|
||||||
|
id="subCountLabel"
|
||||||
|
translation="[115,70]"
|
||||||
|
font="font:SmallestSystemFont" />
|
||||||
</Poster>
|
</Poster>
|
||||||
|
|
||||||
<Button
|
<ButtonEx
|
||||||
id="subscribeButton"
|
id="subscribeButton"
|
||||||
iconUri=""
|
iconVisible="false"
|
||||||
focusedIconUri=""
|
anchor="[0.5,0.5]"
|
||||||
showFocusFootprint="true"
|
padding="[30,30]"
|
||||||
minWidth="200"
|
translation="[1050,90]" />
|
||||||
translation="[930,64]" />
|
|
||||||
|
|
||||||
<VideoRowList
|
<VideoRowList
|
||||||
itemComponentName="RowCell"
|
itemComponentName="RowCell"
|
||||||
@@ -61,7 +66,7 @@
|
|||||||
showRowLabel="[true]"
|
showRowLabel="[true]"
|
||||||
rowFocusAnimationStyle="floatingfocus"
|
rowFocusAnimationStyle="floatingfocus"
|
||||||
variableWidthItems="true"
|
variableWidthItems="true"
|
||||||
focusBitmapUri="pkg:/images/focus_grid.9.png" />
|
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" />
|
||||||
|
|
||||||
<Animation
|
<Animation
|
||||||
id="scrollAnimation"
|
id="scrollAnimation"
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.top.font.size = 18
|
||||||
|
m.top.horizAlign = "right"
|
||||||
|
m.top.translation = [1034, 34]
|
||||||
|
m.top.width = 200
|
||||||
|
|
||||||
|
m.dateTime = CreateObject("roDateTime")
|
||||||
|
Update()
|
||||||
|
|
||||||
|
seconds = m.dateTime.GetSeconds()
|
||||||
|
m.timer = CreateObject("roSGNode", "Timer")
|
||||||
|
' add 2 seconds delay between real clock time and the displayed time to in case of inaccuracy of the timer
|
||||||
|
m.timer.duration = 60 - seconds + 2
|
||||||
|
m.timer.repeat = false
|
||||||
|
m.timer.ObserveField("fire", FuncName(FirstUpdate))
|
||||||
|
m.timer.control = "start"
|
||||||
|
end function
|
||||||
|
|
||||||
|
function FirstUpdate()
|
||||||
|
m.timer.control = "stop"
|
||||||
|
m.timer.unobserveField("fire")
|
||||||
|
m.timer.ObserveField("fire", FuncName(Update))
|
||||||
|
m.timer.duration = 60
|
||||||
|
m.timer.repeat = true
|
||||||
|
m.timer.control = "start"
|
||||||
|
|
||||||
|
Update()
|
||||||
|
end function
|
||||||
|
|
||||||
|
' format time HH:MM AM/PM
|
||||||
|
function Update()
|
||||||
|
m.dateTime.Mark()
|
||||||
|
m.dateTime.ToLocalTime()
|
||||||
|
|
||||||
|
hours = m.dateTime.GetHours()
|
||||||
|
minutes = m.dateTime.GetMinutes()
|
||||||
|
|
||||||
|
if hours >= 12
|
||||||
|
ampm = "PM"
|
||||||
|
else
|
||||||
|
ampm = "AM"
|
||||||
|
end if
|
||||||
|
|
||||||
|
if hours > 12
|
||||||
|
hours = hours - 12
|
||||||
|
end if
|
||||||
|
|
||||||
|
hoursStr = hours.ToStr()
|
||||||
|
minutesStr = minutes.ToStr()
|
||||||
|
|
||||||
|
if hours < 10
|
||||||
|
hoursStr = "0" + hoursStr
|
||||||
|
end if
|
||||||
|
|
||||||
|
if minutes < 10
|
||||||
|
minutesStr = "0" + minutesStr
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.top.text = hoursStr + ":" + minutesStr + " " + ampm
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnDispose()
|
||||||
|
m.timer.control = "stop"
|
||||||
|
m.timer.unobserveField("fire")
|
||||||
|
end function
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<component name="Clock" extends="Label" includes="Disposable">
|
||||||
|
</component>
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<component name="ActionContentNode" extends="ContentNode">
|
|
||||||
<interface>
|
|
||||||
<field id="type" type="string" value="action" />
|
|
||||||
<field id="action" type="string" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -3,6 +3,7 @@ import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
|||||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
import "pkg:/source/utils/ErrorUtils.bs"
|
import "pkg:/source/utils/ErrorUtils.bs"
|
||||||
|
import "pkg:/source/utils/Locale.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
|
|
||||||
function LoadChannel(invidiousNode as object) as void
|
function LoadChannel(invidiousNode as object) as void
|
||||||
@@ -39,8 +40,8 @@ function OnChannelContentTaskResult(output as object) as void
|
|||||||
error = ErrorUtils.Format(error)
|
error = ErrorUtils.Format(error)
|
||||||
LogError(error)
|
LogError(error)
|
||||||
authorId = output.task.input.content.authorId
|
authorId = output.task.input.content.authorId
|
||||||
message = `Failed to load channel ${authorId}\n${error}`
|
message = Tr(Locale.Dialogs.FailedToLoadChannel).Replace("%1", authorId) + `\n${error}`
|
||||||
DialogUtils.ShowDialog(message, "Channel load fail", true)
|
DialogUtils.ShowDialog(message, Tr(Locale.Dialogs.ChannelLoadError), true)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
@@ -29,8 +29,7 @@ function ChannelContentTask(input as object) as object
|
|||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
|
|
||||||
instance = service.GetInstance()
|
InvidiousContent.ToChannelContentNode(contentNode, metadata)
|
||||||
InvidiousContent.ToChannelContentNode(contentNode, metadata, instance)
|
|
||||||
|
|
||||||
contentNode.loadState = FeedLoadState.Loaded
|
contentNode.loadState = FeedLoadState.Loaded
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
|||||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
import "pkg:/source/utils/ErrorUtils.bs"
|
import "pkg:/source/utils/ErrorUtils.bs"
|
||||||
|
import "pkg:/source/utils/Locale.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
|
|
||||||
function LoadPlaylistPage(invidiousNode as object) as void
|
function LoadPlaylistPage(invidiousNode as object) as void
|
||||||
@@ -48,8 +49,8 @@ function OnPlaylistContentTaskResult(output as object) as void
|
|||||||
error = ErrorUtils.Format(error)
|
error = ErrorUtils.Format(error)
|
||||||
LogError(error)
|
LogError(error)
|
||||||
playlistId = output.task.input.content.playlistId
|
playlistId = output.task.input.content.playlistId
|
||||||
message = `Failed to load playlist ${playlistId}\n${error}`
|
message = Tr(Locale.Dialogs.FailedToLoadPlaylist).Replace("%1", playlistId) + `\n${error}`
|
||||||
DialogUtils.ShowDialog(message, "Playlist load fail", true)
|
DialogUtils.ShowDialog(message, Tr(Locale.Dialogs.PlaylistLoadError), true)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<component name="ProfileContentNode" extends="ContentNode">
|
||||||
|
<interface>
|
||||||
|
<field id="type" type="string" value="invidious" />
|
||||||
|
<field id="isSelected" type="boolean" alwaysNotify="true" />
|
||||||
|
|
||||||
|
<field id="username" type="string" />
|
||||||
|
<field id="serverUrl" type="string" />
|
||||||
|
<field id="accessToken" type="string" />
|
||||||
|
|
||||||
|
<field id="color" type="color" />
|
||||||
|
</interface>
|
||||||
|
</component>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<field id="premiereTimestampText" type="string" />
|
<field id="premiereTimestampText" type="string" />
|
||||||
<field id="publishedText" type="string" />
|
<field id="publishedText" type="string" />
|
||||||
<field id="thumbnail" type="uri" />
|
<field id="thumbnail" type="uri" />
|
||||||
<field id="timestamp" type="integer" />
|
<field id="timestamp" type="integer" value="-1" />
|
||||||
<field id="title" type="string" />
|
<field id="title" type="string" />
|
||||||
<field id="videoId" type="string" />
|
<field id="videoId" type="string" />
|
||||||
<field id="viewCountText" type="string" />
|
<field id="viewCountText" type="string" />
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
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/RemoteKeys.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"
|
||||||
|
|
||||||
@@ -71,8 +72,6 @@ import "pkg:/source/utils/Types.bs"
|
|||||||
' - "Remove group from Bookmarks"
|
' - "Remove group from Bookmarks"
|
||||||
' - "Reload bookmarks" - DONE
|
' - "Reload bookmarks" - DONE
|
||||||
'
|
'
|
||||||
' TODO:P1 Playlist item seletected from the bookmarks need to play as a playlist, not as a single video
|
|
||||||
' TODO:P1 Context menu might need to be scrollable (both horizontally and vertically)
|
|
||||||
' TODO:P1 Context menu might need sections. Example:
|
' TODO:P1 Context menu might need sections. Example:
|
||||||
' In a Channel view, while selecting a playlist:
|
' In a Channel view, while selecting a playlist:
|
||||||
' - Channel
|
' - Channel
|
||||||
@@ -88,7 +87,7 @@ function Init()
|
|||||||
m.showAnimation = m.top.findNode("showAnimation")
|
m.showAnimation = m.top.findNode("showAnimation")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function Show(unsued as dynamic)
|
function Show(_unused as dynamic)
|
||||||
m.optionsList.ObserveField("itemSelected", FuncName(OnItemSelected))
|
m.optionsList.ObserveField("itemSelected", FuncName(OnItemSelected))
|
||||||
m.showAnimation.control = "start"
|
m.showAnimation.control = "start"
|
||||||
end function
|
end function
|
||||||
@@ -154,22 +153,22 @@ function OnItemSelected(event as object) as void
|
|||||||
end if
|
end if
|
||||||
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 press = false
|
if press = false
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "back"
|
if key = RemoteKeys.Back
|
||||||
Close()
|
Close()
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "up"
|
if key = RemoteKeys.Up
|
||||||
m.optionsList.jumpToItem = m.optionsList.content.getChildCount() - 1
|
m.optionsList.jumpToItem = m.optionsList.content.getChildCount() - 1
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "down"
|
if key = RemoteKeys.Down
|
||||||
m.optionsList.jumpToItem = 0
|
m.optionsList.jumpToItem = 0
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function OnItemHasFocus()
|
|||||||
m.top.color = "#262626ff"
|
m.top.color = "#262626ff"
|
||||||
else
|
else
|
||||||
m.top.font = "font:SmallestSystemFont"
|
m.top.font = "font:SmallestSystemFont"
|
||||||
m.top.color = "#DBDBDBFF"
|
m.top.color = "#EBEBEBFF"
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -24,6 +24,6 @@ function OnFocusPercent()
|
|||||||
m.top.color = "#262626FF"
|
m.top.color = "#262626FF"
|
||||||
else
|
else
|
||||||
m.top.font = "font:SmallestSystemFont"
|
m.top.font = "font:SmallestSystemFont"
|
||||||
m.top.color = "#DBDBDBFF"
|
m.top.color = "#EBEBEBFF"
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
@@ -4,9 +4,9 @@ function SetPalette(dialog as object)
|
|||||||
DialogBackgroundColor: "#242424FF"
|
DialogBackgroundColor: "#242424FF"
|
||||||
DialogFocusColor: "#CECECEFF"
|
DialogFocusColor: "#CECECEFF"
|
||||||
DialogFocusItemColor: "#202020FF"
|
DialogFocusItemColor: "#202020FF"
|
||||||
DialogSecondaryTextColor: "#DBDBDBFF"
|
DialogSecondaryTextColor: "#EBEBEBFF"
|
||||||
DialogSecondaryItemColor: "#FF1C30FF"
|
DialogSecondaryItemColor: "#FF1C30FF"
|
||||||
DialogTextColor: "#DBDBDBFF"
|
DialogTextColor: "#EBEBEBFF"
|
||||||
}
|
}
|
||||||
dialog.palette = palette
|
dialog.palette = palette
|
||||||
end function
|
end function
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import "pkg:/source/utils/Locale.bs"
|
||||||
|
|
||||||
namespace DialogUtils
|
namespace DialogUtils
|
||||||
function ShowDialog(message as dynamic, title as string, large = false as boolean) as object
|
function ShowDialog(message as dynamic, title as string, large = false as boolean) as object
|
||||||
return ShowDialogButtons(message, title, ["Ok"], large)
|
return ShowDialogButtons(message, title, [Tr(Locale.Buttons.OK)], large)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ShowDialogButtons(message as dynamic, title as string, buttons as object, large = false as boolean) as object
|
function ShowDialogButtons(message as dynamic, title as string, buttons as object, large = false as boolean) as object
|
||||||
@@ -22,4 +24,33 @@ namespace DialogUtils
|
|||||||
m.top.getScene().dialog = dialog
|
m.top.getScene().dialog = dialog
|
||||||
return dialog
|
return dialog
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ShowTimedDialogButtons(message as dynamic, title as string, buttons as object, defaultButton as integer, timeoutSeconds as integer, large = false as boolean) as object
|
||||||
|
dialog = CreateObject("roSGNode", "TimedDialog")
|
||||||
|
if GetInterface(message, "ifArray") = invalid
|
||||||
|
message = message.Tokenize(`\n`).ToArray()
|
||||||
|
end if
|
||||||
|
dialog.message = message
|
||||||
|
dialog.title = title
|
||||||
|
dialog.actualButtons = buttons
|
||||||
|
|
||||||
|
if large
|
||||||
|
if m._deviceDisplayWidth = invalid
|
||||||
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
|
displaySize = deviceInfo.GetDisplaySize()
|
||||||
|
m._deviceDisplayWidth = displaySize.w
|
||||||
|
end if
|
||||||
|
dialog.width = m._deviceDisplayWidth - 100
|
||||||
|
end if
|
||||||
|
|
||||||
|
dialog.defaultButtonIndex = defaultButton
|
||||||
|
dialog.defaultActionTimeoutSeconds = timeoutSeconds
|
||||||
|
dialog.startCountdown = true
|
||||||
|
|
||||||
|
m.top.getScene().dialog = dialog
|
||||||
|
|
||||||
|
dialog.focusDefaultButton = true
|
||||||
|
|
||||||
|
return dialog
|
||||||
|
end function
|
||||||
end namespace
|
end namespace
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import "DialogPalette.bs"
|
import "DialogPalette.bs"
|
||||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
import "pkg:/source/utils/Locale.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"
|
||||||
|
|
||||||
@@ -11,6 +10,9 @@ function Init()
|
|||||||
|
|
||||||
m.top.width = "920"
|
m.top.width = "920"
|
||||||
m.top.observeFieldScoped("buttonSelected", FuncName(Close))
|
m.top.observeFieldScoped("buttonSelected", FuncName(Close))
|
||||||
|
|
||||||
|
scanLabel = m.top.findNode("scanLabel")
|
||||||
|
scanLabel.text = Tr(Locale.Dialogs.ScanTheQrCode)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
@@ -19,7 +21,7 @@ function OnNodeReady()
|
|||||||
if isValidAddress
|
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 = Tr(Locale.Dialogs.IpAddressNotAvailable)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.invidious.observeFieldScoped("authToken", FuncName(OnAuthTokenChange))
|
m.invidious.observeFieldScoped("authToken", FuncName(OnAuthTokenChange))
|
||||||
@@ -33,14 +35,10 @@ function OnUrlSet()
|
|||||||
url = m.top.url
|
url = m.top.url
|
||||||
|
|
||||||
m.urlLabel.text = url
|
m.urlLabel.text = url
|
||||||
AsyncTask.Start(Tasks.GenerateQrCodeTask, {
|
m.qrCode.text = url
|
||||||
poster: m.qrCode
|
|
||||||
text: url
|
|
||||||
size: m.qrCode.loadWidth
|
|
||||||
padding: 10
|
|
||||||
})
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnAuthTokenChange()
|
function OnAuthTokenChange()
|
||||||
|
m.invidious.unobserveFieldScoped("authToken")
|
||||||
Close()
|
Close()
|
||||||
end function
|
end function
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
<children>
|
<children>
|
||||||
<StdDlgTitleArea primaryTitle="Login to Invidious" />
|
<StdDlgTitleArea primaryTitle="Login to Invidious" />
|
||||||
<StdDlgContentArea>
|
<StdDlgContentArea>
|
||||||
<StdDlgTextItem
|
<StdDlgTextItem text="Login to Invidious in order to view Subscriptions, Playlists, and use the Watch history." />
|
||||||
text="Login to Invidious in order to view Subscriptions, Playlists, and use the Watch history.

Please note that an Invidious account is different from a YouTube account." />
|
<StdDlgTextItem text="Please note that an Invidious account is different from a YouTube account." />
|
||||||
</StdDlgContentArea>
|
</StdDlgContentArea>
|
||||||
<StdDlgButtonArea id="buttonArea">
|
<StdDlgButtonArea id="buttonArea">
|
||||||
<StdDlgButton text="OK" />
|
<StdDlgButton text="OK" />
|
||||||
@@ -20,24 +20,26 @@
|
|||||||
extendToDialogEdge="false"
|
extendToDialogEdge="false"
|
||||||
showDivider="false">
|
showDivider="false">
|
||||||
<Label
|
<Label
|
||||||
|
id="scanLabel"
|
||||||
text="Scan the QR Code"
|
text="Scan the QR Code"
|
||||||
horizAlign="center"
|
horizAlign="center"
|
||||||
wrap="true" width="400">
|
wrap="true" width="400">
|
||||||
<Font role="font" uri="font:SystemFontFile" size="24" />
|
<Font role="font" uri="font:SystemFontFile" size="24" />
|
||||||
</Label>
|
</Label>
|
||||||
<Poster
|
<QrCodePoster
|
||||||
id="QrCodePoster"
|
id="QrCodePoster"
|
||||||
width="300"
|
width="300"
|
||||||
height="300"
|
height="300"
|
||||||
loadWidth="300"
|
loadWidth="300"
|
||||||
loadHeight="300"
|
loadHeight="300"
|
||||||
|
padding="10"
|
||||||
translation="[50, 50]" />
|
translation="[50, 50]" />
|
||||||
<Label
|
<Label
|
||||||
id="urlLabel"
|
id="urlLabel"
|
||||||
horizAlign="center"
|
horizAlign="center"
|
||||||
width="400"
|
width="400"
|
||||||
translation="[0, 380]">
|
translation="[0, 380]">
|
||||||
<Font role="font" uri="font:BoldSystemFontFile" size="18" />
|
<Font role="font" uri="font:MediumSystemFontFile" size="18" />
|
||||||
</Label>
|
</Label>
|
||||||
</StdDlgSideCardArea>
|
</StdDlgSideCardArea>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
import "DialogPalette.bs"
|
||||||
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
|
import "pkg:/source/utils/Logging.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
SetPalette(m.top)
|
||||||
|
m.top.observeField("buttonSelected", FuncName(OnButtonSelected))
|
||||||
|
m.top.observeField("wasClosed", FuncName(OnDialogClosed))
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnStartCountdown()
|
||||||
|
actualButtons = m.top.actualButtons
|
||||||
|
defaultButtonIndex = m.top.defaultButtonIndex
|
||||||
|
defaultActionTimeoutSeconds = m.top.defaultActionTimeoutSeconds
|
||||||
|
|
||||||
|
buttons = []
|
||||||
|
for i = 0 to actualButtons.Count() - 1
|
||||||
|
if i = defaultButtonIndex
|
||||||
|
buttons.push(`${actualButtons[i]} (${defaultActionTimeoutSeconds})`)
|
||||||
|
else
|
||||||
|
buttons.push(actualButtons[i])
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
m.top.buttons = buttons
|
||||||
|
|
||||||
|
CancelTimer()
|
||||||
|
m.timer = CreateObject("roSGNode", "Timer")
|
||||||
|
m.timer.repeat = true
|
||||||
|
m.timer.observeFieldScoped("fire", FuncName(TimerUpdateButtons))
|
||||||
|
m.currentCountDown = defaultActionTimeoutSeconds
|
||||||
|
m.timer.control = "start"
|
||||||
|
|
||||||
|
FindButtonComponent()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFocusDefaultButton() as void
|
||||||
|
FindButtonComponent()
|
||||||
|
if m.buttonComponents = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
defaultButtonIndex = m.top.defaultButtonIndex
|
||||||
|
if m.buttonComponents.Count() <= defaultButtonIndex
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
button = m.buttonComponents[defaultButtonIndex]
|
||||||
|
NodeSetFocus(button, true)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function TimerUpdateButtons() as void
|
||||||
|
m.currentCountDown -= 1
|
||||||
|
if m.currentCountDown <= 0
|
||||||
|
m.top.actualButtonSelected = m.top.defaultButtonIndex
|
||||||
|
m.top.close = true
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
SetDefaultButtonText(m.currentCountDown)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnButtonSelected()
|
||||||
|
m.top.actualButtonSelected = m.top.buttonSelected
|
||||||
|
m.top.close = true
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnDialogClosed()
|
||||||
|
CancelTimer()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnKeyEvent(_key as string, _press as boolean) as boolean
|
||||||
|
if m.timer = invalid
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
CancelTimer()
|
||||||
|
|
||||||
|
FindButtonComponent()
|
||||||
|
SetDefaultButtonText(0)
|
||||||
|
return false
|
||||||
|
end function
|
||||||
|
|
||||||
|
function CancelTimer()
|
||||||
|
if m.timer <> invalid
|
||||||
|
m.timer.control = "stop"
|
||||||
|
m.timer.unobserveFieldScoped("fire")
|
||||||
|
m.timer = invalid
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function SetDefaultButtonText(timeLeft as integer) as void
|
||||||
|
if m.buttonComponents = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
defaultButtonIndex = m.top.defaultButtonIndex
|
||||||
|
|
||||||
|
if timeLeft > 0
|
||||||
|
m.buttonComponents[defaultButtonIndex].text = `${m.top.actualButtons[defaultButtonIndex]} (${timeLeft})`
|
||||||
|
else
|
||||||
|
m.buttonComponents[defaultButtonIndex].text = m.top.actualButtons[defaultButtonIndex]
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function FindButtonComponent() as void
|
||||||
|
if m.buttonComponents <> invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
areas = m.top.getChildren(-1, 0)
|
||||||
|
for each area in areas
|
||||||
|
if area.subtype() = "StdDlgButtonArea"
|
||||||
|
m.buttonComponents = area.getChildren(-1, 0)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
LogWarn("No buttons found in dialog")
|
||||||
|
end function
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<component name="TimedDialog" extends="StandardMessageDialog">
|
||||||
|
<interface>
|
||||||
|
<field id="actualButtons" type="stringarray" />
|
||||||
|
<field id="defaultButtonIndex" type="integer" value="-1" />
|
||||||
|
<field id="defaultActionTimeoutSeconds" type="integer" value="10" />
|
||||||
|
<!-- Use actualButtonSelected because buttonSelected is read only and defaults to 0 -->
|
||||||
|
<field id="actualButtonSelected" type="integer" value="-1" />
|
||||||
|
<field id="startCountdown" type="boolean" alwaysNotify="true" onChange="OnStartCountdown" />
|
||||||
|
<field id="focusDefaultButton" type="boolean" alwaysNotify="true" onChange="OnFocusDefaultButton" />
|
||||||
|
</interface>
|
||||||
|
</component>
|
||||||
@@ -29,10 +29,8 @@ function ProcessArguments(args as object) as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if not StringUtils.IsNullOrEmpty(args.contentId) and args.mediaType = "video"
|
if not StringUtils.IsNullOrEmpty(args.contentId) and StringUtils.IsNullOrEmpty(args.videoId)
|
||||||
if StringUtils.IsNullOrEmpty(args.videoId)
|
args.videoId = args.contentId
|
||||||
args.videoId = args.contentId
|
|
||||||
end if
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if args.timestamp <> invalid
|
if args.timestamp <> invalid
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
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"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.top.functionName = "LoggerLoop"
|
m.top.functionName = "LoggerLoop"
|
||||||
@@ -9,9 +10,7 @@ function Init()
|
|||||||
m.top.ObserveField("logLine", port)
|
m.top.ObserveField("logLine", port)
|
||||||
|
|
||||||
scene = m.top.getScene()
|
scene = m.top.getScene()
|
||||||
if scene.hasField("systemLogEvent")
|
scene.ObserveFieldScoped("systemLogEvent", port)
|
||||||
scene.ObserveFieldScoped("systemLogEvent", port)
|
|
||||||
end if
|
|
||||||
|
|
||||||
m.port = port
|
m.port = port
|
||||||
|
|
||||||
@@ -39,6 +38,7 @@ function LoggerLoop()
|
|||||||
logsFile = m.top.folder + "/" + m.top.filename
|
logsFile = m.top.folder + "/" + m.top.filename
|
||||||
previousLogsFile = m.top.folder + "/" + m.top.filenamePrevious
|
previousLogsFile = m.top.folder + "/" + m.top.filenamePrevious
|
||||||
filenameStartup = m.top.filenameStartup
|
filenameStartup = m.top.filenameStartup
|
||||||
|
dateTime = CreateObject("roDateTime")
|
||||||
|
|
||||||
CreateDirectory(m.top.folder)
|
CreateDirectory(m.top.folder)
|
||||||
DeleteFile(previousLogsFile)
|
DeleteFile(previousLogsFile)
|
||||||
@@ -53,22 +53,46 @@ function LoggerLoop()
|
|||||||
buffer.AppendFile(logsFile)
|
buffer.AppendFile(logsFile)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
lastExitInfo = GetLastExitInfo()
|
||||||
|
if not StringUtils.IsNullOrEmpty(lastExitInfo)
|
||||||
|
line = `************ Last Exit Info ************\n${lastExitInfo}\n********** End Last Exit Info **********\n`
|
||||||
|
' bs:disable-next-line LINT3012
|
||||||
|
print line
|
||||||
|
buffer.FromAsciiString(line)
|
||||||
|
buffer.AppendFile(logsFile)
|
||||||
|
end if
|
||||||
|
|
||||||
|
appMemoryMonitor = CreateObject("roAppMemoryMonitor")
|
||||||
|
if appMemoryMonitor <> invalid and FindMemberFunction(appMemoryMonitor, "EnableMemoryWarningEvent") <> invalid
|
||||||
|
appMemoryMonitor.SetMessagePort(port)
|
||||||
|
appMemoryMonitor.EnableMemoryWarningEvent(true)
|
||||||
|
end if
|
||||||
|
|
||||||
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
|
deviceInfo.SetMessagePort(port)
|
||||||
|
deviceInfo.EnableLowGeneralMemoryEvent(true)
|
||||||
|
m.lastDeviceInfoMemoryLevel = ""
|
||||||
|
|
||||||
while true
|
while true
|
||||||
msg = wait(0, port)
|
msg = wait(0, port)
|
||||||
msgType = type(msg)
|
msgType = type(msg)
|
||||||
if msgType = "roSGNodeEvent"
|
if msgType = "roSGNodeEvent"
|
||||||
field = msg.getField()
|
field = msg.getField()
|
||||||
if field = "logLine"
|
if field = "logLine"
|
||||||
OnLineLog(msg, logsFile, buffer)
|
OnLineLog(msg, dateTime, logsFile, buffer)
|
||||||
else if field = "systemLogEvent"
|
else if field = "systemLogEvent"
|
||||||
OnLineSysLog(msg, logsFile, buffer)
|
OnLineSysLog(msg, dateTime, logsFile, buffer)
|
||||||
end if
|
end if
|
||||||
|
else if msgType = "roAppMemoryNotificationEvent"
|
||||||
|
OnLineLogMonitorMemoryWarning(msg, dateTime, logsFile, buffer)
|
||||||
|
else if msgType = "roDeviceInfoEvent"
|
||||||
|
OnLineLogDeviceInfoMemoryWarning(msg, dateTime, logsFile, buffer)
|
||||||
end if
|
end if
|
||||||
end while
|
end while
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnLineLog(event as object, logsFile as string, buffer as object)
|
function OnLineLog(event as object, dateTime as object, logsFile as string, buffer as object)
|
||||||
line = event.getData()
|
line = FormatTime(dateTime) + event.getData()
|
||||||
' bs:disable-next-line LINT3012
|
' bs:disable-next-line LINT3012
|
||||||
print line
|
print line
|
||||||
|
|
||||||
@@ -76,15 +100,94 @@ function OnLineLog(event as object, logsFile as string, buffer as object)
|
|||||||
buffer.AppendFile(logsFile)
|
buffer.AppendFile(logsFile)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnLineSysLog(event as object, logsFile as string, buffer as object) as void
|
function OnLineSysLog(event as object, dateTime as object, logsFile as string, buffer as object) as void
|
||||||
info = event.getData()
|
info = event.getData()
|
||||||
if info.LogType <> "http.error"
|
if info.LogType <> "http.error"
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
line = "[ERROR][SysLog] " + ToString(info)
|
line = FormatTime(dateTime) + "[ERROR][SysLog] " + ToString(info)
|
||||||
' bs:disable-next-line LINT3012
|
' bs:disable-next-line LINT3012
|
||||||
print line
|
print line
|
||||||
|
|
||||||
buffer.FromAsciiString(line + `\n`)
|
buffer.FromAsciiString(line + `\n`)
|
||||||
buffer.AppendFile(logsFile)
|
buffer.AppendFile(logsFile)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function OnLineLogMonitorMemoryWarning(event as object, dateTime as object, logsFile as string, buffer as object) as void
|
||||||
|
info = event.getInfo()
|
||||||
|
line = FormatTime(dateTime) + "[WARN][AppMonitorMemory] " + ToString(info)
|
||||||
|
|
||||||
|
' bs:disable-next-line LINT3012
|
||||||
|
print line
|
||||||
|
|
||||||
|
buffer.FromAsciiString(line + `\n`)
|
||||||
|
buffer.AppendFile(logsFile)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnLineLogDeviceInfoMemoryWarning(event as object, dateTime as object, logsFile as string, buffer as object) as void
|
||||||
|
info = event.getInfo()
|
||||||
|
if not IsString(info.generalMemoryLevel)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
' roDeviceInfoEvent can be a bit spammy, so only log if the memory level has changed
|
||||||
|
if info.generalMemoryLevel = m.lastDeviceInfoMemoryLevel
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
m.lastDeviceInfoMemoryLevel = info.generalMemoryLevel
|
||||||
|
|
||||||
|
line = FormatTime(dateTime) + "[WARN][DeviceInfoMemory] " + ToString(info)
|
||||||
|
|
||||||
|
' bs:disable-next-line LINT3012
|
||||||
|
print line
|
||||||
|
|
||||||
|
buffer.FromAsciiString(line + `\n`)
|
||||||
|
buffer.AppendFile(logsFile)
|
||||||
|
end function
|
||||||
|
|
||||||
|
' Note: although the timestamp should be captured in the caller, not the logger,
|
||||||
|
' it is done here to avoid adding overhead to the caller thread.
|
||||||
|
function FormatTime(dateTime as object) as string
|
||||||
|
dateTime.Mark()
|
||||||
|
dateTime.ToLocalTime()
|
||||||
|
|
||||||
|
hours = dateTime.GetHours().ToStr()
|
||||||
|
if hours.Len() = 1
|
||||||
|
hours = "0" + hours
|
||||||
|
end if
|
||||||
|
|
||||||
|
minutes = dateTime.GetMinutes().ToStr()
|
||||||
|
if minutes.Len() = 1
|
||||||
|
minutes = "0" + minutes
|
||||||
|
end if
|
||||||
|
|
||||||
|
seconds = dateTime.GetSeconds().ToStr()
|
||||||
|
if seconds.Len() = 1
|
||||||
|
seconds = "0" + seconds
|
||||||
|
end if
|
||||||
|
|
||||||
|
milliseconds = dateTime.GetMilliseconds().ToStr()
|
||||||
|
if milliseconds.Len() = 1
|
||||||
|
milliseconds = "00" + milliseconds
|
||||||
|
else if milliseconds.Len() = 2
|
||||||
|
milliseconds = "0" + milliseconds
|
||||||
|
end if
|
||||||
|
|
||||||
|
return "[" + hours + ":" + minutes + ":" + seconds + "." + milliseconds + "]"
|
||||||
|
end function
|
||||||
|
|
||||||
|
function GetLastExitInfo() as dynamic
|
||||||
|
' roAppManager.GetLastExitInfo() is only available on Roku OS 13 and above
|
||||||
|
appManager = CreateObject("roAppManager")
|
||||||
|
hasMethod = FindMemberFunction(appManager, "GetLastExitInfo") <> invalid
|
||||||
|
if not hasMethod
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
lastExitInfo = appManager.GetLastExitInfo()
|
||||||
|
if lastExitInfo = invalid
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
return ToString(lastExitInfo)
|
||||||
|
end function
|
||||||
@@ -22,25 +22,29 @@
|
|||||||
<AppController id="AppController">
|
<AppController id="AppController">
|
||||||
<Group id="Stack">
|
<Group id="Stack">
|
||||||
<AppRoot id="AppRoot">
|
<AppRoot id="AppRoot">
|
||||||
<NavBar id="NavBar" focusIndex="1">
|
<AppScreens id="AppScreens" />
|
||||||
<ContentNode role="items">
|
<NavBar id="NavBar" initialFocus="2">
|
||||||
<NavBarItem screen="SearchScreen" text="Search" icon="pkg:/images/icons/search.png" />
|
<ContentNode role="content">
|
||||||
<NavBarItem screen="HomeScreen" text="Home" icon="pkg:/images/icons/home.png" />
|
<NavBarItemContent screen="ProfileScreen" text="Profile" isProfile="true" />
|
||||||
<NavBarItem screen="BookmarksScreen" text="Bookmarks" icon="pkg:/images/icons/star.png" />
|
<NavBarItemContent screen="SearchScreen" text="Search" icon="pkg:/images/icons/search.png" />
|
||||||
<NavBarItem screen="SettingsScreen" text="Settings" icon="pkg:/images/icons/settings.png" />
|
<NavBarItemContent screen="HomeScreen" text="Home" icon="pkg:/images/icons/home.png" />
|
||||||
<NavBarItem screen="RemoteScreen" text="Remote" icon="pkg:/images/icons/phone.png" />
|
<NavBarItemContent screen="BookmarksScreen" text="Bookmarks" icon="pkg:/images/icons/star.png" />
|
||||||
<NavBarItem screen="AppInfoScreen" text="Info" icon="pkg:/images/icons/info.png" />
|
<NavBarItemContent screen="SettingsScreen" text="Settings" icon="pkg:/images/icons/settings.png" />
|
||||||
|
<NavBarItemContent screen="RemoteScreen" text="Remote" icon="pkg:/images/icons/phone.png" />
|
||||||
|
<NavBarItemContent screen="AppInfoScreen" text="Info" icon="pkg:/images/icons/info.png" />
|
||||||
</ContentNode>
|
</ContentNode>
|
||||||
</NavBar>
|
</NavBar>
|
||||||
</AppRoot>
|
</AppRoot>
|
||||||
</Group>
|
</Group>
|
||||||
|
<Clock />
|
||||||
<VideoContainer id="VideoContainer" />
|
<VideoContainer id="VideoContainer" />
|
||||||
<Group id="Notifications" />
|
<Group id="Notifications" />
|
||||||
<VideoQueue id="VideoQueue" />
|
<VideoQueue id="VideoQueue" />
|
||||||
<ApplicationInfo id="ApplicationInfo" />
|
<ApplicationInfo id="ApplicationInfo" />
|
||||||
<Preferences id="Preferences" />
|
<Preferences id="Preferences" />
|
||||||
<Bookmarks id="Bookmarks" />
|
<BookmarksService id="BookmarksService" />
|
||||||
<SearchHistory id="SearchHistory" />
|
<SearchHistory id="SearchHistory" />
|
||||||
|
<ProfilesService id="ProfilesService" />
|
||||||
<Invidious id="Invidious" />
|
<Invidious id="Invidious" />
|
||||||
<PlayletWebServer id="WebServer" port="8888" />
|
<PlayletWebServer id="WebServer" port="8888" />
|
||||||
<DialServer id="DialServer" />
|
<DialServer id="DialServer" />
|
||||||
|
|||||||
@@ -3,48 +3,52 @@
|
|||||||
<!-- 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"
|
<AppController id="AppController"
|
||||||
|
screensContainer="bind:./AppScreens"
|
||||||
root="bind:./AppRoot"
|
root="bind:./AppRoot"
|
||||||
stack="bind:./Stack"
|
stack="bind:./Stack"
|
||||||
videoQueue="bind:./VideoQueue">
|
videoQueue="bind:./VideoQueue">
|
||||||
<Group id="Stack">
|
<Group id="Stack">
|
||||||
<AppRoot id="AppRoot">
|
<AppRoot id="AppRoot">
|
||||||
<NavBar id="NavBar" focusIndex="1" appController="bind:/AppController">
|
<AppScreens id="AppScreens" />
|
||||||
<ContentNode role="items">
|
<NavBar id="NavBar"
|
||||||
<NavBarItem
|
initialFocus="2"
|
||||||
|
appController="bind:/AppController"
|
||||||
|
screensContainer="bind:../AppScreens">
|
||||||
|
<ContentNode role="content">
|
||||||
|
<NavBarItemContent
|
||||||
|
screen="ProfileScreen"
|
||||||
|
text="Profile"
|
||||||
|
isProfile="true" />
|
||||||
|
<NavBarItemContent
|
||||||
screen="SearchScreen"
|
screen="SearchScreen"
|
||||||
text="Search"
|
text="Search"
|
||||||
icon="pkg:/images/icons/search.png">
|
icon="pkg:/images/icons/search.png" />
|
||||||
</NavBarItem>
|
<NavBarItemContent
|
||||||
<NavBarItem
|
|
||||||
screen="HomeScreen"
|
screen="HomeScreen"
|
||||||
text="Home"
|
text="Home"
|
||||||
icon="pkg:/images/icons/home.png">
|
icon="pkg:/images/icons/home.png" />
|
||||||
</NavBarItem>
|
<NavBarItemContent
|
||||||
<NavBarItem
|
|
||||||
screen="BookmarksScreen"
|
screen="BookmarksScreen"
|
||||||
text="Bookmarks"
|
text="Bookmarks"
|
||||||
icon="pkg:/images/icons/star.png">
|
icon="pkg:/images/icons/star.png" />
|
||||||
</NavBarItem>
|
<NavBarItemContent
|
||||||
<NavBarItem
|
|
||||||
screen="SettingsScreen"
|
screen="SettingsScreen"
|
||||||
text="Settings"
|
text="Settings"
|
||||||
icon="pkg:/images/icons/settings.png">
|
icon="pkg:/images/icons/settings.png" />
|
||||||
</NavBarItem>
|
<NavBarItemContent
|
||||||
<NavBarItem
|
|
||||||
screen="RemoteScreen"
|
screen="RemoteScreen"
|
||||||
text="Remote"
|
text="Remote"
|
||||||
icon="pkg:/images/icons/phone.png">
|
icon="pkg:/images/icons/phone.png" />
|
||||||
</NavBarItem>
|
<NavBarItemContent
|
||||||
<NavBarItem
|
|
||||||
screen="AppInfoScreen"
|
screen="AppInfoScreen"
|
||||||
text="Info"
|
text="Info"
|
||||||
icon="pkg:/images/icons/info.png">
|
icon="pkg:/images/icons/info.png" />
|
||||||
</NavBarItem>
|
|
||||||
</ContentNode>
|
</ContentNode>
|
||||||
</NavBar>
|
</NavBar>
|
||||||
</AppRoot>
|
</AppRoot>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
|
<Clock />
|
||||||
<VideoContainer id="VideoContainer" />
|
<VideoContainer id="VideoContainer" />
|
||||||
<Group id="Notifications" />
|
<Group id="Notifications" />
|
||||||
|
|
||||||
@@ -59,14 +63,18 @@
|
|||||||
|
|
||||||
<ApplicationInfo id="ApplicationInfo" />
|
<ApplicationInfo id="ApplicationInfo" />
|
||||||
<Preferences id="Preferences" />
|
<Preferences id="Preferences" />
|
||||||
<Bookmarks id="Bookmarks" />
|
<BookmarksService id="BookmarksService" />
|
||||||
<SearchHistory id="SearchHistory"
|
<SearchHistory id="SearchHistory"
|
||||||
preferences="bind:../Preferences" />
|
preferences="bind:../Preferences" />
|
||||||
|
|
||||||
|
<ProfilesService id="ProfilesService"
|
||||||
|
invidious="bind:../Invidious" />
|
||||||
|
|
||||||
<Invidious id="Invidious"
|
<Invidious id="Invidious"
|
||||||
webServer="bind:../WebServer"
|
webServer="bind:../WebServer"
|
||||||
applicationInfo="bind:../ApplicationInfo"
|
applicationInfo="bind:../ApplicationInfo"
|
||||||
preferences="bind:../Preferences" />
|
preferences="bind:../Preferences"
|
||||||
|
profilesService="bind:../ProfilesService" />
|
||||||
|
|
||||||
<!-- Tasks -->
|
<!-- Tasks -->
|
||||||
<PlayletWebServer id="WebServer"
|
<PlayletWebServer id="WebServer"
|
||||||
@@ -74,9 +82,10 @@
|
|||||||
appController="bind:/AppController"
|
appController="bind:/AppController"
|
||||||
applicationInfo="bind:../ApplicationInfo"
|
applicationInfo="bind:../ApplicationInfo"
|
||||||
invidious="bind:../Invidious"
|
invidious="bind:../Invidious"
|
||||||
|
profilesService="bind:../ProfilesService"
|
||||||
preferences="bind:../Preferences"
|
preferences="bind:../Preferences"
|
||||||
videoQueue="bind:../VideoQueue"
|
videoQueue="bind:../VideoQueue"
|
||||||
bookmarks="bind:../Bookmarks"
|
bookmarksService="bind:../BookmarksService"
|
||||||
loungeService="bind:../LoungeService" />
|
loungeService="bind:../LoungeService" />
|
||||||
<DialServer id="DialServer"
|
<DialServer id="DialServer"
|
||||||
webServer="bind:../WebServer"
|
webServer="bind:../WebServer"
|
||||||
|
|||||||
@@ -6,12 +6,14 @@ function InitializeBindings()
|
|||||||
},
|
},
|
||||||
childProps: {
|
childProps: {
|
||||||
"AppController": {
|
"AppController": {
|
||||||
|
"screensContainer": "./AppScreens",
|
||||||
"root": "./AppRoot",
|
"root": "./AppRoot",
|
||||||
"stack": "./Stack",
|
"stack": "./Stack",
|
||||||
"videoQueue": "./VideoQueue"
|
"videoQueue": "./VideoQueue"
|
||||||
},
|
},
|
||||||
"NavBar": {
|
"NavBar": {
|
||||||
"appController": "/AppController"
|
"appController": "/AppController",
|
||||||
|
"screensContainer": "../AppScreens"
|
||||||
},
|
},
|
||||||
"VideoQueue": {
|
"VideoQueue": {
|
||||||
"appController": "/AppController",
|
"appController": "/AppController",
|
||||||
@@ -24,18 +26,23 @@ function InitializeBindings()
|
|||||||
"SearchHistory": {
|
"SearchHistory": {
|
||||||
"preferences": "../Preferences"
|
"preferences": "../Preferences"
|
||||||
},
|
},
|
||||||
|
"ProfilesService": {
|
||||||
|
"invidious": "../Invidious"
|
||||||
|
},
|
||||||
"Invidious": {
|
"Invidious": {
|
||||||
"webServer": "../WebServer",
|
"webServer": "../WebServer",
|
||||||
"applicationInfo": "../ApplicationInfo",
|
"applicationInfo": "../ApplicationInfo",
|
||||||
"preferences": "../Preferences"
|
"preferences": "../Preferences",
|
||||||
|
"profilesService": "../ProfilesService"
|
||||||
},
|
},
|
||||||
"WebServer": {
|
"WebServer": {
|
||||||
"appController": "/AppController",
|
"appController": "/AppController",
|
||||||
"applicationInfo": "../ApplicationInfo",
|
"applicationInfo": "../ApplicationInfo",
|
||||||
"invidious": "../Invidious",
|
"invidious": "../Invidious",
|
||||||
|
"profilesService": "../ProfilesService",
|
||||||
"preferences": "../Preferences",
|
"preferences": "../Preferences",
|
||||||
"videoQueue": "../VideoQueue",
|
"videoQueue": "../VideoQueue",
|
||||||
"bookmarks": "../Bookmarks",
|
"bookmarksService": "../BookmarksService",
|
||||||
"loungeService": "../LoungeService"
|
"loungeService": "../LoungeService"
|
||||||
},
|
},
|
||||||
"DialServer": {
|
"DialServer": {
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
import "pkg:/source/utils/Types.bs"
|
|
||||||
|
|
||||||
' Based on https://github.com/jellyfin/jellyfin-roku/blob/unstable/components/IconButton.brs
|
|
||||||
function init()
|
|
||||||
m.buttonBackground = m.top.findNode("buttonBackground")
|
|
||||||
m.buttonIcon = m.top.findNode("buttonIcon")
|
|
||||||
m.buttonText = m.top.findNode("buttonText")
|
|
||||||
|
|
||||||
m.top.observeField("background", FuncName(onBackgroundChanged))
|
|
||||||
m.top.observeField("icon", FuncName(onIconChanged))
|
|
||||||
m.top.observeField("text", FuncName(onTextChanged))
|
|
||||||
m.top.observeField("height", FuncName(onHeightChanged))
|
|
||||||
m.top.observeField("width", FuncName(onWidthChanged))
|
|
||||||
m.top.observeField("padding", FuncName(onPaddingChanged))
|
|
||||||
end function
|
|
||||||
|
|
||||||
function OnFocusChange()
|
|
||||||
if m.top.focus
|
|
||||||
m.buttonBackground.blendColor = m.top.focusBackground
|
|
||||||
else
|
|
||||||
m.buttonBackground.blendColor = m.top.background
|
|
||||||
end if
|
|
||||||
m.buttonBackground.visible = m.top.focus
|
|
||||||
m.buttonText.visible = m.top.focus
|
|
||||||
end function
|
|
||||||
|
|
||||||
function onBackgroundChanged()
|
|
||||||
m.buttonBackground.blendColor = m.top.background
|
|
||||||
end function
|
|
||||||
|
|
||||||
function onIconChanged()
|
|
||||||
m.buttonIcon.uri = m.top.icon
|
|
||||||
end function
|
|
||||||
|
|
||||||
function onTextChanged()
|
|
||||||
m.buttonText.text = m.top.text
|
|
||||||
end function
|
|
||||||
|
|
||||||
function setIconSize()
|
|
||||||
height = m.top.height
|
|
||||||
width = m.top.width
|
|
||||||
if height > 0 and width > 0
|
|
||||||
' TODO: Use smallest number between them
|
|
||||||
m.buttonIcon.height = m.top.height
|
|
||||||
|
|
||||||
if m.top.padding > 0
|
|
||||||
m.buttonIcon.height = m.buttonIcon.height - m.top.padding
|
|
||||||
end if
|
|
||||||
|
|
||||||
m.buttonIcon.width = m.buttonIcon.height
|
|
||||||
|
|
||||||
m.buttonIcon.translation = [((width - m.buttonIcon.width) / 2), ((height - m.buttonIcon.height) / 2)]
|
|
||||||
m.buttonText.translation = [-5, height]
|
|
||||||
m.buttonText.width = width + 10
|
|
||||||
end if
|
|
||||||
end function
|
|
||||||
|
|
||||||
function onHeightChanged()
|
|
||||||
m.buttonBackground.height = m.top.height
|
|
||||||
setIconSize()
|
|
||||||
end function
|
|
||||||
|
|
||||||
function onWidthChanged()
|
|
||||||
m.buttonBackground.width = m.top.width - 10
|
|
||||||
m.buttonBackground.translation = [5, 0]
|
|
||||||
setIconSize()
|
|
||||||
end function
|
|
||||||
|
|
||||||
function onPaddingChanged()
|
|
||||||
setIconSize()
|
|
||||||
end function
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<component name="IconButton" extends="Group" includes="Focus">
|
|
||||||
<children>
|
|
||||||
<Poster id="buttonBackground" uri="pkg:/images/white.9.png" visible="false" />
|
|
||||||
<Poster id="buttonIcon" />
|
|
||||||
<Label id="buttonText" color="#aaaaaa" font="font:SmallestSystemFont" vertAlign="center" horizAlign="center" visible="false" />
|
|
||||||
</children>
|
|
||||||
<interface>
|
|
||||||
<field id="background" type="color" value="" />
|
|
||||||
<field id="focusBackground" type="color" value="" />
|
|
||||||
<field id="text" type="string" value="" />
|
|
||||||
<field id="padding" type="integer" value="-1" />
|
|
||||||
<field id="height" type="integer" value="" />
|
|
||||||
<field id="width" type="integer" value="" />
|
|
||||||
<field id="icon" type="string" value="" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -1,134 +1,151 @@
|
|||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
|
import "pkg:/source/utils/RemoteKeys.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
|
m.lastIsInFocusChain = false
|
||||||
|
m.top.focusable = true
|
||||||
|
m.sideBar = m.top.findNode("SideBar")
|
||||||
|
m.background = m.top.findNode("Background")
|
||||||
|
m.itemsList = m.top.findNode("ItemsList")
|
||||||
|
|
||||||
|
m.fadeAnimation = m.top.findNode("FadeAnimation")
|
||||||
|
m.sideBarFadeInterpolator = m.top.findNode("SideBarFadeInterpolator")
|
||||||
|
m.logoBarFadeInterpolator = m.top.findNode("LogoFadeInterpolator")
|
||||||
|
m.backgroundFadeInterpolator = m.top.findNode("BackgroundFadeInterpolator")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
PopulateButtons()
|
m.lastItemFocused = m.itemsList.itemFocused
|
||||||
m.top.observeField("focusedChild", FuncName(OnFocusedChildChange))
|
m.itemsList.observeField("focusedChild", FuncName(OnListFirstFocus))
|
||||||
m.top.observeField("items", FuncName(PopulateButtons))
|
|
||||||
|
' NavBar should be resized after the content is changed.
|
||||||
|
' Since we don't expect it change after initial setup, resize on node ready once.
|
||||||
|
ResizeNavBar()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnFocusedChildChange()
|
function ResizeNavBar() as void
|
||||||
m.top.focusIndex = m.top.focusIndex
|
content = m.top.content
|
||||||
end function
|
if content = invalid
|
||||||
|
|
||||||
function PopulateButtons() as void
|
|
||||||
buttonCount = m.buttonGroup.getChildCount()
|
|
||||||
if buttonCount > 0
|
|
||||||
m.buttonGroup.removeChildrenIndex(buttonCount, 0)
|
|
||||||
end if
|
|
||||||
|
|
||||||
if m.top.items = invalid
|
|
||||||
m.top.focusable = false
|
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
navBarItems = m.top.items.getChildren(-1, 0)
|
component = CreateObject("roSGNode", m.itemsList.itemComponentName)
|
||||||
|
itemSize = m.itemsList.itemSize
|
||||||
buttons = []
|
minWidth = itemSize[0]
|
||||||
for each item in navBarItems
|
items = content.getChildren(-1, 0)
|
||||||
button = CreateObject("roSGNode", "IconButton")
|
for each item in items
|
||||||
button.background = "#242424FF"
|
component.itemContent = item
|
||||||
button.focusBackground = "#FF1C30FF"
|
rect = component.boundingRect()
|
||||||
button.padding = 20
|
' Add 35 to account for padding
|
||||||
button.height = 50
|
width = rect.width + 35
|
||||||
button.width = 90
|
if width > minWidth
|
||||||
|
minWidth = width
|
||||||
button.icon = item.icon
|
end if
|
||||||
button.text = item.text
|
|
||||||
|
|
||||||
buttons.push(button)
|
|
||||||
end for
|
end for
|
||||||
m.buttonGroup.appendChildren(buttons)
|
m.itemsList.itemSize = [minWidth, itemSize[1]]
|
||||||
|
offset = minWidth - m.background.width + 30
|
||||||
m.top.focusable = buttons.Count() > 0
|
m.top.screenOffset = offset
|
||||||
|
m.sideBar.width = offset
|
||||||
m.top.focusIndex = m.top.focusIndex
|
|
||||||
|
|
||||||
CenterButtons()
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function CenterButtons()
|
function OnListFirstFocus() as void
|
||||||
parent = m.buttonGroup.getParent()
|
if not m.itemsList.hasFocus()
|
||||||
parentWidth = parent.width
|
return
|
||||||
parentHeight = parent.height
|
end if
|
||||||
|
|
||||||
rect = m.buttonGroup.boundingRect()
|
m.itemsList.unobserveField("focusedChild")
|
||||||
|
initialFocus = m.top.initialFocus
|
||||||
m.buttonGroup.translation = [parentWidth / 2 - rect.width / 2, parentHeight / 2 - rect.height / 2]
|
if initialFocus > -1
|
||||||
|
m.itemsList.jumpToItem = initialFocus
|
||||||
|
end if
|
||||||
|
m.itemsList.observeField("itemFocused", FuncName(OnItemFocused))
|
||||||
|
m.top.observeField("focusedChild", FuncName(OnFocusedChildChange))
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function onKeyEvent(key as string, press as boolean) as boolean
|
function OnFocusedChildChange() as void
|
||||||
if not press
|
isInFocusChain = m.top.isInFocusChain()
|
||||||
|
if m.lastIsInFocusChain = isInFocusChain
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.lastIsInFocusChain = isInFocusChain
|
||||||
|
|
||||||
|
m.sideBar.visible = isInFocusChain
|
||||||
|
|
||||||
|
if isInFocusChain
|
||||||
|
m.screensContainer.animateToPosition = m.top.screenOffset
|
||||||
|
else
|
||||||
|
m.screensContainer.animateToPosition = 0
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.fadeAnimation.control = "stop"
|
||||||
|
m.sideBarFadeInterpolator.reverse = not isInFocusChain
|
||||||
|
m.logoBarFadeInterpolator.reverse = not isInFocusChain
|
||||||
|
m.backgroundFadeInterpolator.reverse = not isInFocusChain
|
||||||
|
m.fadeAnimation.control = "start"
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFocusChange() as void
|
||||||
|
if not m.top.focus
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
NodeSetFocus(m.itemsList, true)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnItemFocused() as void
|
||||||
|
index = m.itemsList.itemFocused
|
||||||
|
item = GetItem(index)
|
||||||
|
if item = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
if m.lastItemFocused <> index
|
||||||
|
UnfocusItem(m.lastItemFocused)
|
||||||
|
end if
|
||||||
|
m.lastItemFocused = index
|
||||||
|
|
||||||
|
m.appController@.ShowRootScreen(item.screen)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function UnfocusItem(index as integer) as void
|
||||||
|
item = GetItem(index)
|
||||||
|
if item = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.appController@.HideRootScreen(item.screen)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||||
|
if key <> RemoteKeys.Right or not press
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
if key = "down"
|
|
||||||
i = m.top.focusIndex
|
item = GetItem(m.itemsList.itemFocused)
|
||||||
target = i + 1
|
if item = invalid
|
||||||
if target >= m.buttonGroup.getChildCount()
|
return false
|
||||||
return false
|
|
||||||
end if
|
|
||||||
m.top.focusIndex = target
|
|
||||||
return true
|
|
||||||
else if key = "up"
|
|
||||||
i = m.top.focusIndex
|
|
||||||
target = i - 1
|
|
||||||
if target < 0
|
|
||||||
return false
|
|
||||||
end if
|
|
||||||
m.top.focusIndex = target
|
|
||||||
return true
|
|
||||||
else if key = "right"
|
|
||||||
if m.top.items = invalid or m.top.focusIndex = -1 or m.top.focusIndex >= m.top.items.getChildCount()
|
|
||||||
return false
|
|
||||||
end if
|
|
||||||
navBarItem = m.top.items.getChild(m.top.focusIndex)
|
|
||||||
screen = m.appController@.GetRootScreen(navBarItem.screen)
|
|
||||||
if screen = invalid
|
|
||||||
return false
|
|
||||||
end if
|
|
||||||
if not screen.focusable
|
|
||||||
return false
|
|
||||||
end if
|
|
||||||
NodeSetFocus(screen, true)
|
|
||||||
return true
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return false
|
screen = m.appController@.GetRootScreen(item.screen)
|
||||||
|
if screen = invalid or not screen.focusable
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
NodeSetFocus(screen, true)
|
||||||
|
return true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnFocusIndexChange() as void
|
function GetItem(index as integer) as dynamic
|
||||||
if m.top.items = invalid
|
content = m.itemsList.content
|
||||||
return
|
if content = invalid
|
||||||
|
return invalid
|
||||||
end if
|
end if
|
||||||
|
|
||||||
buttonCount = m.buttonGroup.getChildCount()
|
childCount = content.getChildCount()
|
||||||
if buttonCount = 0
|
if childCount = 0 or index < 0 or index >= childCount
|
||||||
return
|
return invalid
|
||||||
end if
|
|
||||||
focusIndex = m.top.focusIndex
|
|
||||||
if focusIndex < 0
|
|
||||||
m.top.focusIndex = 0
|
|
||||||
return
|
|
||||||
end if
|
|
||||||
if focusIndex >= buttonCount
|
|
||||||
m.top.focusIndex = buttonCount - 1
|
|
||||||
return
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
navBarItems = m.top.items.getChildren(-1, 0)
|
return content.getChild(index)
|
||||||
|
|
||||||
buttons = m.buttonGroup.getChildren(-1, 0)
|
|
||||||
for i = 0 to buttonCount - 1
|
|
||||||
if i <> focusIndex
|
|
||||||
buttons[i].focus = false
|
|
||||||
m.appController@.HideRootScreen(navBarItems[i].screen)
|
|
||||||
end if
|
|
||||||
end for
|
|
||||||
if focusIndex <> -1
|
|
||||||
m.buttonGroup.getChild(focusIndex).focus = m.top.hasFocus()
|
|
||||||
m.appController@.ShowRootScreen(navBarItems[focusIndex].screen)
|
|
||||||
end if
|
|
||||||
end function
|
end function
|
||||||
@@ -1,21 +1,78 @@
|
|||||||
<component name="NavBar" extends="Group" includes="AutoBind">
|
<component name="NavBar" extends="Group" includes="AutoBind,Focus">
|
||||||
<interface>
|
<interface>
|
||||||
|
<field id="screensContainer" type="node" />
|
||||||
<field id="appController" type="node" />
|
<field id="appController" type="node" />
|
||||||
<field id="buttonGroup" type="node" bind="./NavBarButtonGroup" />
|
<field id="content" type="node" alias="ItemsList.content" />
|
||||||
<field id="items" type="node" />
|
<field id="itemsList" type="node" bind="./ItemsList" />
|
||||||
<field id="focusIndex" type="int" alwaysNotify="true" onChange="OnFocusIndexChange" />
|
<field id="initialFocus" type="int" value="-1" />
|
||||||
|
<field id="screenOffset" type="float" value="170" />
|
||||||
</interface>
|
</interface>
|
||||||
|
|
||||||
<children>
|
<children>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
id="SideBar"
|
||||||
|
width="170"
|
||||||
height="720"
|
height="720"
|
||||||
width="115"
|
color="#242424"
|
||||||
|
opacity="0.9"
|
||||||
|
translation="[80,0]"
|
||||||
|
visible="false">
|
||||||
|
</Rectangle>
|
||||||
|
|
||||||
|
<Rectangle
|
||||||
|
id="Background"
|
||||||
|
height="720"
|
||||||
|
width="80"
|
||||||
color="#242424"
|
color="#242424"
|
||||||
opacity="0.9">
|
opacity="0.9">
|
||||||
<LayoutGroup
|
|
||||||
id="NavBarButtonGroup"
|
<Poster
|
||||||
itemSpacings="[2]"
|
id="LogoFav"
|
||||||
translation="[7, 120]">
|
width="42"
|
||||||
</LayoutGroup>
|
height="42"
|
||||||
|
translation="[20, 48]"
|
||||||
|
uri="pkg:/images/logo-fav.png" />
|
||||||
|
<Poster
|
||||||
|
id="Logo"
|
||||||
|
width="106"
|
||||||
|
height="42"
|
||||||
|
translation="[20, 48]"
|
||||||
|
opacity="0"
|
||||||
|
uri="pkg:/images/logo-dark.png" />
|
||||||
|
|
||||||
|
<MarkupList
|
||||||
|
id="ItemsList"
|
||||||
|
itemSize="[190,50]"
|
||||||
|
itemComponentName="NavBarComponent"
|
||||||
|
focusFootprintBitmapUri=""
|
||||||
|
focusBitmapUri="pkg:/images/white.9.png"
|
||||||
|
focusBitmapBlendColor="0xFF1C30FF"
|
||||||
|
vertFocusAnimationStyle="floatingFocus"
|
||||||
|
numRows="7"
|
||||||
|
scrollSpeed="99999"
|
||||||
|
itemSpacing="[0, 16]"
|
||||||
|
translation="[15, 120]">
|
||||||
|
</MarkupList>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
|
|
||||||
|
<Animation
|
||||||
|
id="FadeAnimation"
|
||||||
|
duration="0.2">
|
||||||
|
<FloatFieldInterpolator
|
||||||
|
id="SideBarFadeInterpolator"
|
||||||
|
key="[0.0, 0.5, 1.0]"
|
||||||
|
keyValue="[0.0, 0.5, 1.0]"
|
||||||
|
fieldToInterp="SideBar.opacity" />
|
||||||
|
<FloatFieldInterpolator
|
||||||
|
id="LogoFadeInterpolator"
|
||||||
|
key="[0.0, 0.5, 1.0]"
|
||||||
|
keyValue="[0.0, 0.5, 1.0]"
|
||||||
|
fieldToInterp="Logo.opacity" />
|
||||||
|
<FloatFieldInterpolator
|
||||||
|
id="BackgroundFadeInterpolator"
|
||||||
|
key="[0.0, 0.5, 1.0]"
|
||||||
|
keyValue="[0.9, 0.95, 1.0]"
|
||||||
|
fieldToInterp="Background.opacity" />
|
||||||
|
</Animation>
|
||||||
</children>
|
</children>
|
||||||
</component>
|
</component>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
function Init()
|
||||||
|
m.titleLabel = m.top.findNode("TitleLabel")
|
||||||
|
m.titleLabelFocused = m.top.findNode("TitleLabelFocused")
|
||||||
|
m.iconPoster = m.top.findNode("IconPoster")
|
||||||
|
m.profileIcon = m.top.findNode("ProfileIcon")
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnContentSet() as void
|
||||||
|
content = m.top.itemContent
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.titleLabel.text = content.text
|
||||||
|
m.titleLabelFocused.text = content.text
|
||||||
|
|
||||||
|
isProfile = content.isProfile
|
||||||
|
if isProfile
|
||||||
|
m.iconPoster.visible = false
|
||||||
|
m.profileIcon.visible = true
|
||||||
|
else
|
||||||
|
m.iconPoster.visible = true
|
||||||
|
m.profileIcon.visible = false
|
||||||
|
m.iconPoster.uri = content.icon
|
||||||
|
end if
|
||||||
|
|
||||||
|
OnListHasFocusChange()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnItemHasFocusChange() as void
|
||||||
|
itemHasFocus = m.top.itemHasFocus
|
||||||
|
m.titleLabelFocused.visible = itemHasFocus
|
||||||
|
m.titleLabel.visible = not itemHasFocus
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnListHasFocusChange()
|
||||||
|
listHasFocus = m.top.listHasFocus
|
||||||
|
if not listHasFocus
|
||||||
|
m.titleLabelFocused.visible = false
|
||||||
|
m.titleLabel.visible = false
|
||||||
|
m.top.opacity = 0.8
|
||||||
|
else
|
||||||
|
OnItemHasFocusChange()
|
||||||
|
m.top.opacity = 1
|
||||||
|
end if
|
||||||
|
end function
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<component name="NavBarComponent" extends="Group">
|
||||||
|
<interface>
|
||||||
|
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||||
|
<field id="itemHasFocus" type="boolean" onChange="OnItemHasFocusChange" />
|
||||||
|
<field id="listHasFocus" type="boolean" onChange="OnListHasFocusChange" />
|
||||||
|
</interface>
|
||||||
|
|
||||||
|
<children>
|
||||||
|
<Poster
|
||||||
|
id="IconPoster"
|
||||||
|
width="32"
|
||||||
|
height="32"
|
||||||
|
translation="[8,8]" />
|
||||||
|
|
||||||
|
<ProfileIcon
|
||||||
|
id="ProfileIcon"
|
||||||
|
translation="[4,4]"
|
||||||
|
visible="false" />
|
||||||
|
|
||||||
|
<Label
|
||||||
|
id="TitleLabel"
|
||||||
|
height="32"
|
||||||
|
vertAlign="center"
|
||||||
|
translation="[55,8]"
|
||||||
|
visible="false">
|
||||||
|
<Font role="font" uri="font:SystemFontFile" size="22" />
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
id="TitleLabelFocused"
|
||||||
|
height="32"
|
||||||
|
vertAlign="center"
|
||||||
|
translation="[55,8]"
|
||||||
|
visible="false">
|
||||||
|
<Font role="font" uri="font:MediumSystemFontFile" size="22" />
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
</children>
|
||||||
|
</component>
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<component name="NavBarItem" extends="ContentNode">
|
<component name="NavBarItemContent" extends="ContentNode">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="screen" type="string" />
|
<field id="screen" type="string" />
|
||||||
<field id="icon" type="string" />
|
<field id="icon" type="string" />
|
||||||
<field id="text" type="string" />
|
<field id="text" type="string" />
|
||||||
|
<field id="isProfile" type="boolean" />
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.buttonIcon = m.top.findNode("buttonIcon")
|
||||||
|
m.circlePoster = m.top.findNode("circlePoster")
|
||||||
|
m.circlePosterInner = m.top.findNode("circlePosterInner")
|
||||||
|
m.letterLabel = m.top.findNode("letterLabel")
|
||||||
|
|
||||||
|
profilesService = m.top.getScene().findNode("ProfilesService")
|
||||||
|
if profilesService <> invalid
|
||||||
|
m.profilesService = profilesService
|
||||||
|
profilesService.observeField("currentProfile", FuncName(OnCurrentProfile))
|
||||||
|
OnCurrentProfile()
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnCurrentProfile() as void
|
||||||
|
currentProfile = m.profilesService.currentProfile
|
||||||
|
if currentProfile = invalid
|
||||||
|
m.circlePoster.visible = false
|
||||||
|
m.buttonIcon.visible = true
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
username = currentProfile.username
|
||||||
|
if not StringUtils.IsNullOrEmpty(username)
|
||||||
|
m.letterLabel.text = UCase(username.Left(1))
|
||||||
|
else
|
||||||
|
m.letterLabel.text = ""
|
||||||
|
end if
|
||||||
|
m.circlePosterInner.blendColor = currentProfile.color
|
||||||
|
|
||||||
|
m.circlePoster.visible = true
|
||||||
|
m.buttonIcon.visible = false
|
||||||
|
end function
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<component name="ProfileIcon" extends="Group">
|
||||||
|
<children>
|
||||||
|
<Poster
|
||||||
|
id="buttonIcon"
|
||||||
|
width="40"
|
||||||
|
height="40"
|
||||||
|
uri="pkg:/images/icons/user.png" />
|
||||||
|
|
||||||
|
<Poster
|
||||||
|
id="circlePoster"
|
||||||
|
width="40"
|
||||||
|
height="40"
|
||||||
|
blendColor="#DDDDDDFF"
|
||||||
|
uri="pkg:/images/white-circle.png">
|
||||||
|
<Poster
|
||||||
|
id="circlePosterInner"
|
||||||
|
width="36"
|
||||||
|
height="36"
|
||||||
|
blendColor="#9696C8"
|
||||||
|
uri="pkg:/images/white-circle.png"
|
||||||
|
translation="[2,2]">
|
||||||
|
<Label
|
||||||
|
id="letterLabel"
|
||||||
|
width="36"
|
||||||
|
height="36"
|
||||||
|
vertAlign="center"
|
||||||
|
horizAlign="center">
|
||||||
|
<Font role="font" uri="font:SystemFontFile" size="24" />
|
||||||
|
</Label>
|
||||||
|
</Poster>
|
||||||
|
</Poster>
|
||||||
|
</children>
|
||||||
|
</component>
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
const OK_LONG_PRESS_KEY = "OK_LONG_PRESS"
|
import "pkg:/source/utils/RemoteKeys.bs"
|
||||||
const OPTIONS_LONG_PRESS_KEY = "OPTIONS_LONG_PRESS"
|
|
||||||
|
|
||||||
function InitializeLongPress(keys as object, duration = 1.0 as float)
|
function InitializeLongPress(keys as object, duration = 1.0 as float)
|
||||||
longPressKeyMap = {
|
longPressKeyMap = {}
|
||||||
"OK": OK_LONG_PRESS_KEY
|
longPressKeyMap[RemoteKeys.Ok] = RemoteKeys.OkLongPress
|
||||||
"options": OPTIONS_LONG_PRESS_KEY
|
longPressKeyMap[RemoteKeys.Options] = RemoteKeys.OptionsLongPress
|
||||||
}
|
|
||||||
m._longPressKeyMap = {}
|
m._longPressKeyMap = {}
|
||||||
for each key in keys
|
for each key in keys
|
||||||
m._longPressKeyMap[key] = longPressKeyMap[key]
|
m._longPressKeyMap[key] = longPressKeyMap[key]
|
||||||
@@ -16,10 +15,9 @@ function InitializeLongPress(keys as object, duration = 1.0 as float)
|
|||||||
' Using the keyboard:
|
' Using the keyboard:
|
||||||
' - press K to simulate an "OK" long press on the remote.
|
' - press K to simulate an "OK" long press on the remote.
|
||||||
' - press O to simulate an "options" long press on the remote.
|
' - press O to simulate an "options" long press on the remote.
|
||||||
simulatedLongPressKeyMap = {
|
simulatedLongPressKeyMap = {}
|
||||||
"OK": "Lit_k"
|
simulatedLongPressKeyMap[RemoteKeys.Ok] = "Lit_k"
|
||||||
"options": "Lit_o"
|
simulatedLongPressKeyMap[RemoteKeys.Options] = "Lit_o"
|
||||||
}
|
|
||||||
|
|
||||||
m._simulatedLongPressKeyMap = {}
|
m._simulatedLongPressKeyMap = {}
|
||||||
for each key in keys
|
for each key in keys
|
||||||
@@ -43,7 +41,7 @@ function LongPressHandler(key as string, press as boolean) as boolean
|
|||||||
LogInfo(`[${subtype}] Simulating`, simulatedKey, "long press using key:", key, "press:", press)
|
LogInfo(`[${subtype}] Simulating`, simulatedKey, "long press using key:", key, "press:", press)
|
||||||
longPressKey = m._longPressKeyMap[simulatedKey]
|
longPressKey = m._longPressKeyMap[simulatedKey]
|
||||||
m._longPressFired = true
|
m._longPressFired = true
|
||||||
return OnkeyEvent(longPressKey, press)
|
return OnKeyEvent(longPressKey, press)
|
||||||
end if
|
end if
|
||||||
#end if
|
#end if
|
||||||
|
|
||||||
@@ -87,5 +85,5 @@ function LongPressTimerFired() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
OnkeyEvent(m._longPressKeyMap[m._longPressKey], true)
|
OnKeyEvent(m._longPressKeyMap[m._longPressKey], true)
|
||||||
end function
|
end function
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import "pkg:/components/ChannelView/ChannelUtils.bs"
|
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/Navigation/LongPress.bs"
|
import "pkg:/components/Navigation/LongPress.bs"
|
||||||
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||||
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
||||||
@@ -9,6 +8,7 @@ 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"
|
||||||
|
import "pkg:/source/utils/RemoteKeys.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"
|
||||||
|
|
||||||
@@ -62,17 +62,17 @@ function OnContentSet() as void
|
|||||||
LoadPlaylistIfNeeded()
|
LoadPlaylistIfNeeded()
|
||||||
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 LongPressHandler(key, press)
|
if LongPressHandler(key, press)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = OK_LONG_PRESS_KEY and press
|
if key = RemoteKeys.OkLongPress and press
|
||||||
OnItemLongPressed(m.list.itemFocused)
|
OnItemLongPressed(m.list.itemFocused)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "OK" and not press
|
if key = RemoteKeys.Ok and not press
|
||||||
OnItemSelected(m.list.itemFocused)
|
OnItemSelected(m.list.itemFocused)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
@@ -81,10 +81,11 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "back"
|
if key = RemoteKeys.Back
|
||||||
Close()
|
Close()
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -143,9 +144,6 @@ function OnItemLongPressed(index as integer) as void
|
|||||||
|
|
||||||
LogInfo("Long press: playlist:", playlistId, "video:", videoId)
|
LogInfo("Long press: playlist:", playlistId, "video:", videoId)
|
||||||
|
|
||||||
' TODO:P1 handle case of opening the channel
|
|
||||||
' - Owner of a video
|
|
||||||
' - Owner of a playlist
|
|
||||||
contextMenuProviders = [m.top]
|
contextMenuProviders = [m.top]
|
||||||
ContextMenuUtils.Open(contextMenuProviders, m.appController, video)
|
ContextMenuUtils.Open(contextMenuProviders, m.appController, video)
|
||||||
end function
|
end function
|
||||||
@@ -167,18 +165,30 @@ function GetContextMenuOptionsForItem(video as object) as object
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayPlaylist", [playlist, index]),
|
ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.PlayPlaylist), m.videoQueue, "FuncPlayPlaylist", [playlist, index]),
|
||||||
ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueuePlaylist", [playlist])
|
ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.QueuePlaylist), m.videoQueue, "FuncAddToQueuePlaylist", [playlist])
|
||||||
ContextMenuUtils.CreateOption("Play video", m.videoQueue, "FuncPlayVideo", [video]),
|
ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.PlayVideo), m.videoQueue, "FuncPlayVideo", [video]),
|
||||||
ContextMenuUtils.CreateOption("Queue video", m.videoQueue, "FuncAddToQueueVideo", [video]),
|
ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.QueueVideo), m.videoQueue, "FuncAddToQueueVideo", [video]),
|
||||||
]
|
]
|
||||||
|
|
||||||
if not StringUtils.IsNullOrEmpty(playlist.authorId)
|
playlistAuthorId = playlist.authorId
|
||||||
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenPlaylistChannel", [playlist]))
|
videoAuthorId = video.authorId
|
||||||
|
|
||||||
|
if not StringUtils.IsNullOrEmpty(playlistAuthorId) or not StringUtils.IsNullOrEmpty(videoAuthorId)
|
||||||
|
if playlistAuthorId = videoAuthorId
|
||||||
|
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.OpenChannel), m.top, "OpenPlaylistChannel", [playlist]))
|
||||||
|
else
|
||||||
|
if not StringUtils.IsNullOrEmpty(playlistAuthorId)
|
||||||
|
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.OpenPlaylistChannel), m.top, "OpenPlaylistChannel", [playlist]))
|
||||||
|
end if
|
||||||
|
if not StringUtils.IsNullOrEmpty(videoAuthorId)
|
||||||
|
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.OpenVideoChannel), m.top, "OpenVideoChannel", [video]))
|
||||||
|
end if
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
options.append(m.bookmarks@.GetMenuForPlaylist(playlist))
|
options.append(m.bookmarksService@.GetMenuForPlaylist(playlist))
|
||||||
options.append(m.bookmarks@.GetMenuForVideo(video))
|
options.append(m.bookmarksService@.GetMenuForVideo(video))
|
||||||
|
|
||||||
return options
|
return options
|
||||||
end function
|
end function
|
||||||
@@ -189,7 +199,17 @@ function OpenPlaylistChannel(playlist as object) as void
|
|||||||
LogWarn("Invalid authorId:", authorId)
|
LogWarn("Invalid authorId:", authorId)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
channel = InvidiousContent.ToChannelContentNode(invalid, { authorId: authorId }, invalid)
|
channel = InvidiousContent.ToChannelContentNode(invalid, { authorId: authorId })
|
||||||
|
ChannelUtils.Open(channel)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OpenVideoChannel(video as object) as void
|
||||||
|
authorId = video.authorId
|
||||||
|
if StringUtils.IsNullOrEmpty(authorId)
|
||||||
|
LogWarn("Invalid authorId:", authorId)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
channel = InvidiousContent.ToChannelContentNode(invalid, { authorId: authorId })
|
||||||
ChannelUtils.Open(channel)
|
ChannelUtils.Open(channel)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -216,5 +236,6 @@ function LoadPlaylistIfNeeded() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
' TODO:P1 use a field instead of function call
|
||||||
m.top.content@.LoadPlaylistPage(m.top.invidious)
|
m.top.content@.LoadPlaylistPage(m.top.invidious)
|
||||||
end function
|
end function
|
||||||
@@ -4,8 +4,9 @@
|
|||||||
<field id="appController" type="node" bind="/AppController" />
|
<field id="appController" type="node" bind="/AppController" />
|
||||||
<field id="invidious" type="node" bind="/Invidious" />
|
<field id="invidious" type="node" bind="/Invidious" />
|
||||||
<field id="videoQueue" type="node" bind="/VideoQueue" />
|
<field id="videoQueue" type="node" bind="/VideoQueue" />
|
||||||
<field id="bookmarks" type="node" bind="/Bookmarks" />
|
<field id="bookmarksService" type="node" bind="/BookmarksService" />
|
||||||
<function name="OpenPlaylistChannel" />
|
<function name="OpenPlaylistChannel" />
|
||||||
|
<function name="OpenVideoChannel" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
@@ -28,13 +29,15 @@
|
|||||||
<Label
|
<Label
|
||||||
id="titleLabel"
|
id="titleLabel"
|
||||||
width="500"
|
width="500"
|
||||||
maxLines="2"
|
maxLines="3"
|
||||||
wrap="true">
|
wrap="true">
|
||||||
<Font role="font" uri="font:BoldSystemFontFile" size="36" />
|
<Font role="font" uri="font:MediumSystemFontFile" size="36" />
|
||||||
</Label>
|
</Label>
|
||||||
<Label
|
<Label
|
||||||
id="subtitleLabel"
|
id="subtitleLabel"
|
||||||
width="500"
|
width="500"
|
||||||
|
maxLines="2"
|
||||||
|
wrap="true"
|
||||||
font="font:SmallestBoldSystemFont" />
|
font="font:SmallestBoldSystemFont" />
|
||||||
<Label
|
<Label
|
||||||
id="updatedLabel"
|
id="updatedLabel"
|
||||||
@@ -56,8 +59,8 @@
|
|||||||
numColumns="1"
|
numColumns="1"
|
||||||
numRows="5"
|
numRows="5"
|
||||||
vertFocusAnimationStyle="floatingFocus"
|
vertFocusAnimationStyle="floatingFocus"
|
||||||
translation="[620,90]" />
|
translation="[620,90]"
|
||||||
|
focusBitmapUri="pkg:/images/focus-glow-padding-27.9.png" />
|
||||||
</Poster>
|
</Poster>
|
||||||
</children>
|
</children>
|
||||||
</component>
|
</component>
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
import "pkg:/components/Navigation/Navigation.bs"
|
||||||
|
import "pkg:/source/utils/DisposableObserve.bs"
|
||||||
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
|
import "pkg:/source/utils/Locale.bs"
|
||||||
|
import "pkg:/source/utils/RemoteKeys.bs"
|
||||||
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.activateButton = m.top.findNode("activateButton")
|
||||||
|
m.logoutButton = m.top.findNode("logoutButton")
|
||||||
|
m.closeButton = m.top.findNode("closeButton")
|
||||||
|
|
||||||
|
DisposableObserveField(m.activateButton, "buttonSelected", FuncName(Activate))
|
||||||
|
DisposableObserveField(m.logoutButton, "buttonSelected", FuncName(Logout))
|
||||||
|
DisposableObserveField(m.closeButton, "buttonSelected", FuncName(Close))
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnNodeReady()
|
||||||
|
SetNavigation(m.activateButton, RemoteKeys.Down, m.logoutButton)
|
||||||
|
SetNavigation(m.logoutButton, RemoteKeys.Down, m.closeButton)
|
||||||
|
SetNavigation(m.closeButton, RemoteKeys.Up, m.logoutButton)
|
||||||
|
SetNavigation(m.logoutButton, RemoteKeys.Up, m.activateButton)
|
||||||
|
|
||||||
|
DisposableObserveFieldScoped(m.profilesService, "currentProfile", FuncName(OnCunrrentProfileChanged))
|
||||||
|
DisposableObserveFieldScoped(m.profilesService, "onProfileLogout", FuncName(OnProfileLogout))
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnContentSet() as void
|
||||||
|
content = m.top.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.top.circlePosterInnerUri = "pkg:/images/white-circle.png"
|
||||||
|
m.top.circlePosterInnerBlendColor = content.color
|
||||||
|
username = content.username
|
||||||
|
m.top.username = username
|
||||||
|
if not StringUtils.IsNullOrEmpty(username)
|
||||||
|
m.top.letter = UCase(username.Left(1))
|
||||||
|
else
|
||||||
|
m.top.letter = ""
|
||||||
|
end if
|
||||||
|
m.top.serverUrl = content.serverUrl
|
||||||
|
m.top.crownVisible = content.isSelected
|
||||||
|
UpdateActivateButton()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFocusChange() as void
|
||||||
|
if not m.top.focus
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
if m.activateButton.focusable
|
||||||
|
NodeSetFocus(m.activateButton, true)
|
||||||
|
else
|
||||||
|
NodeSetFocus(m.logoutButton, true)
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||||
|
if NavigationKeyHandler(key, press).handled
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = RemoteKeys.Options or key = RemoteKeys.Play or key = RemoteKeys.Pause or key = RemoteKeys.PlayOnly
|
||||||
|
' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = RemoteKeys.Back and press
|
||||||
|
Close()
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
return true
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Activate() as void
|
||||||
|
content = m.top.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
profile = m.profilesService.content.getChild(0).findNode(content.id)
|
||||||
|
if profile = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.top.content = invalid
|
||||||
|
m.profilesService@.SetCurrentProfile(profile)
|
||||||
|
Close()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Logout() as void
|
||||||
|
content = m.top.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.top.content = invalid
|
||||||
|
m.profilesService@.LogoutWithProfile(content)
|
||||||
|
Close()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Close()
|
||||||
|
m.top.appController@.PopScreen()
|
||||||
|
m.top.dispose = true
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnDispose()
|
||||||
|
DisposeObservers()
|
||||||
|
m.top.content = invalid
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnCunrrentProfileChanged() as void
|
||||||
|
content = m.top.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
m.top.crownVisible = content.isSelected
|
||||||
|
UpdateActivateButton()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnProfileLogout() as void
|
||||||
|
content = m.top.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
profile = m.profilesService.content.getChild(0).findNode(content.id)
|
||||||
|
if profile = invalid
|
||||||
|
Close()
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function UpdateActivateButton() as void
|
||||||
|
content = m.top.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
isSelected = content.isSelected
|
||||||
|
if isSelected
|
||||||
|
if m.activateButton.hasFocus()
|
||||||
|
NodeSetFocus(m.logoutButton, true)
|
||||||
|
end if
|
||||||
|
m.activateButton.text = Tr(Locale.Buttons.InUse)
|
||||||
|
m.activateButton.disabled = true
|
||||||
|
else
|
||||||
|
m.activateButton.text = Tr(Locale.Buttons.Activate)
|
||||||
|
m.activateButton.disabled = false
|
||||||
|
end if
|
||||||
|
end function
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<component name="ProfileView" extends="Group" includes="AutoBind,Focus,Disposable">
|
||||||
|
<interface>
|
||||||
|
<field id="content" type="node" onChange="OnContentSet" />
|
||||||
|
<field id="letter" type="string" alias="LetterLabel.text" />
|
||||||
|
<field id="username" type="string" alias="UsernameLabel.text" />
|
||||||
|
<field id="serverUrl" type="string" alias="ServerLabel.text" />
|
||||||
|
<field id="circlePosterInnerUri" type="uri" alias="circlePosterInner.uri" />
|
||||||
|
<field id="circlePosterInnerBlendColor" type="uri" alias="circlePosterInner.blendColor" />
|
||||||
|
<field id="crownVisible" type="boolean" alias="CrownPoster.visible" />
|
||||||
|
|
||||||
|
<field id="appController" type="node" bind="/AppController" />
|
||||||
|
<field id="profilesService" type="node" bind="/ProfilesService" />
|
||||||
|
</interface>
|
||||||
|
<children>
|
||||||
|
<Rectangle
|
||||||
|
width="1280"
|
||||||
|
height="720"
|
||||||
|
color="#000000"
|
||||||
|
opacity="0.5">
|
||||||
|
</Rectangle>
|
||||||
|
<Rectangle
|
||||||
|
width="720"
|
||||||
|
height="420"
|
||||||
|
translation="[280,150]"
|
||||||
|
color="#242424">
|
||||||
|
|
||||||
|
<Group translation="[100,90]">
|
||||||
|
<Poster
|
||||||
|
id="circlePoster"
|
||||||
|
width="160"
|
||||||
|
height="160"
|
||||||
|
translation="[20,20]"
|
||||||
|
blendColor="#DDDDDDFF"
|
||||||
|
uri="pkg:/images/white-circle.png">
|
||||||
|
<Poster
|
||||||
|
id="circlePosterInner"
|
||||||
|
width="152"
|
||||||
|
height="152"
|
||||||
|
blendColor="#9696C8"
|
||||||
|
uri="pkg:/images/white-circle.png"
|
||||||
|
translation="[4,4]">
|
||||||
|
<Label
|
||||||
|
id="LetterLabel"
|
||||||
|
width="152"
|
||||||
|
height="152"
|
||||||
|
vertAlign="center"
|
||||||
|
horizAlign="center">
|
||||||
|
<Font role="font" uri="font:SystemFontFile" size="120" />
|
||||||
|
</Label>
|
||||||
|
</Poster>
|
||||||
|
<Poster
|
||||||
|
id="CrownPoster"
|
||||||
|
width="60"
|
||||||
|
height="60"
|
||||||
|
translation="[50,-60]"
|
||||||
|
uri="pkg:/images/icons/crown.png"
|
||||||
|
visible="false">
|
||||||
|
</Poster>
|
||||||
|
</Poster>
|
||||||
|
<Label
|
||||||
|
id="UsernameLabel"
|
||||||
|
width="200"
|
||||||
|
horizAlign="center"
|
||||||
|
translation="[0,210]">
|
||||||
|
<Font role="font" uri="font:MediumSystemFontFile" size="26" />
|
||||||
|
</Label>
|
||||||
|
<Label
|
||||||
|
id="ServerLabel"
|
||||||
|
width="400"
|
||||||
|
horizAlign="center"
|
||||||
|
translation="[-100,250]">
|
||||||
|
<Font role="font" uri="font:SystemFontFile" size="18" />
|
||||||
|
</Label>
|
||||||
|
</Group>
|
||||||
|
|
||||||
|
<ButtonEx
|
||||||
|
id="activateButton"
|
||||||
|
iconVisible="false"
|
||||||
|
anchor="[0.5,0.5]"
|
||||||
|
text="Activate"
|
||||||
|
minWidth="200"
|
||||||
|
translation="[520,132]" />
|
||||||
|
<ButtonEx
|
||||||
|
id="logoutButton"
|
||||||
|
iconVisible="false"
|
||||||
|
anchor="[0.5,0.5]"
|
||||||
|
text="Logout"
|
||||||
|
minWidth="200"
|
||||||
|
translation="[520,210]" />
|
||||||
|
<ButtonEx
|
||||||
|
id="closeButton"
|
||||||
|
iconVisible="false"
|
||||||
|
anchor="[0.5,0.5]"
|
||||||
|
text="Close"
|
||||||
|
minWidth="200"
|
||||||
|
translation="[520,288]" />
|
||||||
|
|
||||||
|
</Rectangle>
|
||||||
|
</children>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
namespace ProfileViewUtils
|
||||||
|
|
||||||
|
function Open(profile as object, appController as object)
|
||||||
|
profileView = CreateObject("roSGNode", "ProfileView")
|
||||||
|
|
||||||
|
appController@.PushScreen(profileView)
|
||||||
|
profileView@.BindNode()
|
||||||
|
profileView.content = profile
|
||||||
|
end function
|
||||||
|
|
||||||
|
end namespace
|
||||||
@@ -2,7 +2,7 @@ import "pkg:/source/QrCode/QrImage.bs"
|
|||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
|
|
||||||
@asynctask
|
@asynctask
|
||||||
function GenerateQrCodeTask(input as object)
|
function GenerateQrCodeTask(input as object) as object
|
||||||
poster = input.poster
|
poster = input.poster
|
||||||
mode = input.mode
|
mode = input.mode
|
||||||
text = input.text
|
text = input.text
|
||||||
@@ -24,7 +24,13 @@ function GenerateQrCodeTask(input as object)
|
|||||||
qr = new QrCode.QRImage()
|
qr = new QrCode.QRImage()
|
||||||
imagePath = qr.Generate(text, size, padding, mode)
|
imagePath = qr.Generate(text, size, padding, mode)
|
||||||
|
|
||||||
|
if m.top.cancel
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
if not StringUtils.IsNullOrEmpty(imagePath)
|
if not StringUtils.IsNullOrEmpty(imagePath)
|
||||||
poster.uri = imagePath
|
poster.uri = imagePath
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
return invalid
|
||||||
end function
|
end function
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||||
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||||
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.busySpinner = m.top.findNode("busySpinner")
|
||||||
|
m.busySpinnerPoster = m.busySpinner.poster
|
||||||
|
|
||||||
|
m.busySpinnerPoster.uri = "pkg:/images/spinner.png"
|
||||||
|
|
||||||
|
m.top.observeField("width", FuncName(OnSizeChange))
|
||||||
|
m.top.observeField("height", FuncName(OnSizeChange))
|
||||||
|
OnSizeChange()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnSizeChange()
|
||||||
|
width = m.top.width
|
||||||
|
height = m.top.height
|
||||||
|
|
||||||
|
m.busySpinnerPoster.width = width / 2
|
||||||
|
m.busySpinnerPoster.height = height / 2
|
||||||
|
m.busySpinner.translation = [width / 4, height / 4]
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnTextChange() as void
|
||||||
|
if m.qrCodeGenTask <> invalid
|
||||||
|
m.qrCodeGenTask.cancel = true
|
||||||
|
end if
|
||||||
|
|
||||||
|
text = m.top.text
|
||||||
|
|
||||||
|
width = m.top.loadWidth
|
||||||
|
if width = 0
|
||||||
|
width = m.top.width
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.top.uri = ""
|
||||||
|
|
||||||
|
if StringUtils.IsNullOrEmpty(text)
|
||||||
|
m.busySpinner.control = "stop"
|
||||||
|
m.busySpinner.visible = false
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.busySpinnerPoster.rotation = 0
|
||||||
|
m.busySpinner.visible = true
|
||||||
|
m.busySpinner.control = "start"
|
||||||
|
|
||||||
|
m.qrCodeGenTask = AsyncTask.Start(Tasks.GenerateQrCodeTask, {
|
||||||
|
poster: m.top
|
||||||
|
text: text
|
||||||
|
size: width
|
||||||
|
padding: m.top.padding
|
||||||
|
}, OnGenerateQrCodeTaskResult)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnGenerateQrCodeTaskResult(output as object) as void
|
||||||
|
if output.cancelled
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.busySpinner.control = "stop"
|
||||||
|
m.busySpinner.visible = false
|
||||||
|
end function
|
||||||