Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
826228e939 | ||
|
|
b77519493d | ||
|
|
6a46d4cd09 | ||
|
|
382cbe33d3 | ||
|
|
e9b57c9c08 | ||
|
|
457242057d | ||
|
|
665f76701d | ||
|
|
258726fadb | ||
|
|
215a23c91d | ||
|
|
19ecc25852 | ||
|
|
0ae524f88c | ||
|
|
8bf16bfbd5 | ||
|
|
0acb7031d3 | ||
|
|
0ddc9a48aa | ||
|
|
3ac4d959d3 | ||
|
|
19de693298 | ||
|
|
46af79c2ae | ||
|
|
fd077a0d1a | ||
|
|
981e95b0d4 | ||
|
|
8883a59fcb | ||
|
|
662cb4b634 | ||
|
|
7269fdff7d | ||
|
|
710e892545 | ||
|
|
7dd5561faa | ||
|
|
d40a12d1f1 | ||
|
|
1170f422ec | ||
|
|
2639267e1f | ||
|
|
3b35adeae9 | ||
|
|
e8b6cd1588 | ||
|
|
0377f075be | ||
|
|
89034378fb | ||
|
|
9ae8601a32 | ||
|
|
61327401b0 | ||
|
|
94a017a878 | ||
|
|
eb3d1724e4 | ||
|
|
9d95834ebb | ||
|
|
9201b8dfe0 | ||
|
|
cf17fed02e | ||
|
|
f8d202be56 | ||
|
|
af091fe8f7 | ||
|
|
d89b1c519d | ||
|
|
dca3e42c79 | ||
|
|
2f72c6471a | ||
|
|
413e73c1c0 | ||
|
|
2a57cc99c7 | ||
|
|
d65f930247 | ||
|
|
ed632a7a62 | ||
|
|
89ea45ed54 | ||
|
|
d7e5732fde | ||
|
|
9f5a605e8f | ||
|
|
45da0880ba | ||
|
|
9e47d4d42e | ||
|
|
3312bbc56e | ||
|
|
e1cda5cc5c | ||
|
|
af0ddf68c5 | ||
|
|
3559a3fff6 | ||
|
|
e0709452be | ||
|
|
9bbf8dd038 | ||
|
|
64d655fca9 | ||
|
|
ecb738ab1f | ||
|
|
c14fa7a1d3 | ||
|
|
96f24a12a7 | ||
|
|
665fa44a49 | ||
|
|
3c43934081 | ||
|
|
e941bc2439 | ||
|
|
c35779b211 | ||
|
|
7adb90ccc2 | ||
|
|
59ed47108d | ||
|
|
2eb0cf88af | ||
|
|
38a1d9a950 | ||
|
|
c1bb059d66 | ||
|
|
da71382b4a | ||
|
|
4c32243e6e | ||
|
|
91be37fd8a | ||
|
|
54db808b83 | ||
|
|
8f722276f3 | ||
|
|
3b5d7a9520 | ||
|
|
94773d5c3a | ||
|
|
60fb566a01 | ||
|
|
ac9709fc4a | ||
|
|
1f1a4479da | ||
|
|
2dcfabdd60 | ||
|
|
8f59e3648e | ||
|
|
4233f30dec | ||
|
|
777db66bda | ||
|
|
771929d0d8 | ||
|
|
5179de5c74 | ||
|
|
e22051014f | ||
|
|
3eb45653f0 | ||
|
|
5287070233 | ||
|
|
d149c20e0d | ||
|
|
6cf735e089 | ||
|
|
af1fa0b401 | ||
|
|
f58137b326 | ||
|
|
200fb68ab9 | ||
|
|
bde4523c00 | ||
|
|
af020b509a | ||
|
|
97592f9839 | ||
|
|
53f8535535 |
No files matched your search
@@ -3,6 +3,7 @@ name: Release
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
workflow_dispatch: {}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
name: Stats
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 11 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update_wiki_stats:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout Wiki
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.repository }}.wiki
|
||||
path: ./playlet.wiki
|
||||
|
||||
- name: Configure repo
|
||||
run: |
|
||||
git config --local user.email "githubaction@githubaction.com"
|
||||
git config --local user.name "github-action wiki updater"
|
||||
working-directory: ./playlet.wiki
|
||||
|
||||
- name: Use Node.js 18.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Download attachements
|
||||
run: node tools/download-stats.js
|
||||
env:
|
||||
EMAIL: ${{ secrets.EMAIL }}
|
||||
EMAIL_APP_PASSWORD: ${{ secrets.EMAIL_APP_PASSWORD }}
|
||||
|
||||
- name: Update wiki
|
||||
run: git add "." && git commit -m "Update stats" --no-verify && git push || true
|
||||
working-directory: ./playlet.wiki
|
||||
@@ -0,0 +1,36 @@
|
||||
name: Update Dependencies
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 6"
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
update_deps:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js 18.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Update dependencies
|
||||
run: npm run update-deps
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm i
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
commit-message: "update dependencies"
|
||||
branch: chore/update-deps
|
||||
title: "[chore] update dependencies"
|
||||
body: "Weekly pull request to update dependencies."
|
||||
@@ -5,6 +5,72 @@ 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/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.17.2] - 2023-12-10
|
||||
|
||||
### Added
|
||||
|
||||
- Loading message
|
||||
|
||||
## [0.17.1] - 2023-12-08
|
||||
|
||||
### Added
|
||||
|
||||
- An instance test to make sure thumbnails are reachable
|
||||
|
||||
### Fixed
|
||||
|
||||
- A rare error when video player is closed but does not have valid content
|
||||
- A rare error that can occur with loading indicators causing a crash
|
||||
|
||||
## [0.17.0] - 2023-11-17
|
||||
|
||||
### Added
|
||||
|
||||
- Playlet logo in web app is clickable, and launches app if not already on
|
||||
- Remote control in web app
|
||||
- Clickable buttons and keyboard support
|
||||
|
||||
## [0.16.0] - 2023-11-13
|
||||
|
||||
### Added
|
||||
|
||||
- User interface for the Queue: Press and hold `Options (*)` to show the queue
|
||||
|
||||
### Fixed
|
||||
|
||||
- Crash when video player has no content
|
||||
- Execution timeout on cirlce posters
|
||||
|
||||
## [0.15.1] - 2023-11-10
|
||||
|
||||
### Added
|
||||
|
||||
- An option to disable search history
|
||||
|
||||
### Fixed
|
||||
|
||||
- A rare bug that causes the app to crash when displaying video cells
|
||||
- A bug where we show error dialogs that happened on screens that are already closed
|
||||
- A bug where bookmarks show duplicate videos
|
||||
- A bug where watch history is not always sent to Invidious
|
||||
|
||||
## [0.15.0] - 2023-11-05
|
||||
|
||||
### Added
|
||||
|
||||
- Pagination support in web app search (load more button)
|
||||
- Video links pasted into the web app triggers the dialog to cast the video
|
||||
- Ability to subscribe/unsubscribe from a channel screen
|
||||
- This needs additional scope for the Invidious token. You will be logged out, and need to login again. Sorry for the inconvenience.
|
||||
- A notification when videos are added to the queue (can be disabled from the settings)
|
||||
|
||||
### Fixed
|
||||
|
||||
- A bug where casting from web included timestamp even if the "Start at" check box is unchecked
|
||||
- A leak where channel screens would reload data even when closed
|
||||
- A crash when fetching subscriptions
|
||||
- Fetching errors by adding a retry mechanism to web requests
|
||||
|
||||
## [0.14.0] - 2023-10-25
|
||||
|
||||
### Added
|
||||
|
||||
@@ -62,14 +62,25 @@ More under [Screenshots](./docs/screenshots/README.md)
|
||||
### Customize Invidious instance
|
||||
|
||||
1. Open settings in Playlet
|
||||
1. Scan QR Code with Phone
|
||||
1. Change the Invidious instance
|
||||
1. You can also do this from the settings tab
|
||||
1. Select Invidious -> Instance
|
||||
1. Set a custom instance, or choose a public one hosted by volunteers (from https://api.invidious.io/)
|
||||
1. Optionally, Select `Test instance` to make sure it works
|
||||
1. Hit save
|
||||
|
||||
> ℹ️ **Note**: If you are logged in when you change the instance, you will remain logged in to the old instance. In this case, Playlet will use the old instance to retrieve your subscriptions and your playlists, but will use the new instance for everything else. After switching to a new instance, you can log out and log in again to use your profile on the new instance.
|
||||
|
||||
## Development
|
||||
|
||||
For everything related to Playlet app development, please see the [documentation](./docs/README.md)
|
||||
|
||||
## Analytics and reporting
|
||||
|
||||
We do not collect any usage data, anonymous or not. But Roku does, and you can find the data made available to Playlet in the [Wiki](https://github.com/iBicha/playlet/wiki).
|
||||
Most software in the wild collect some data to make sure things work, and to prioritize features.
|
||||
Because we don't do that, we wouldn't know if people using Playlet are facing issues, unless these issues get reported.
|
||||
Playlet could run on variaty of devices, with different capabilities and screen sizes, and different Invidious instances.
|
||||
That's why it's important to report any issues you encouter using Playlet, otherwise it's unlikely that they get addressed.
|
||||
|
||||
## Why Playlet
|
||||
|
||||
```none
|
||||
|
||||
@@ -143,7 +143,7 @@ That's pretty much it.
|
||||
There are a few reasons we made this separation:
|
||||
|
||||
- Playlet relies on [Invidious](https://github.com/iv-org/invidious). Invidious tries to keep up with Youtube making changes to their platform, but sometimes, a breaking change happens that requires Playlet to react quickly. Releasing through the Roku Channel store can take days, or a week. During this time, Playlet would be not functional, and that's not acceptable.
|
||||
- The ability to roll back: Sometimes an app breaking bug gets released. Allowing users to choose a seperate version is a flexible way to keep things working. Although right now rollbacks are behind a - hidden by default - developer menu, the reasoning still stands.
|
||||
- The ability to roll back: Sometimes an app breaking bug gets released. Allowing users to choose a seperate version is a flexible way to keep things working. For example, it's possible to choose a different verrsion from the developer settings in the web app.
|
||||
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very conveninct and less of a hassle, than going through the Roku Channel store.
|
||||
- I've had instances where I was trying to pass the certfication for Playlet to publish it. One of the criterias is to pass a some automated tests. But the tests were failing because their system could not connect to their Roku test devices (connection keeps timing out). My only option was to keep trying over and over until it worked.
|
||||
- It might sound that Playlet Lib is just a workaround for the Roku Channel release process. But phrased differently, Roku Channel release process is not good enough of what we need for Playlet.
|
||||
@@ -185,11 +185,11 @@ Since Component Libraries are simply zip files hosted at some https endpoint, Gi
|
||||
|
||||
### Dev library hosted by VS Code Extension
|
||||
|
||||
When in debug mode, Playlet lib is packaged and served locally on port 8080, and Playlet app would use it instead of the Playlet lib from Github. This is an important detail, because once you stop debugging in VS Code, the dev app on your Roku TV won't function anymore, with an error:
|
||||
When in debug mode, Playlet lib is packaged and served locally on port 8086, and Playlet app would use it instead of the Playlet lib from Github. This is an important detail, because once you stop debugging in VS Code, the dev app on your Roku TV won't function anymore, with an error:
|
||||
|
||||
> Could not load Playlet component library from any of the following urls:
|
||||
>
|
||||
> - \[debug\] http://192.168.1.x:8080/playlet-lib.zip <!-- markdownlint-disable-line -->
|
||||
> - \[debug\] http://192.168.1.x:8086/playlet-lib.zip <!-- markdownlint-disable-line -->
|
||||
> Please restart Playlet.
|
||||
> If the problem persist, contact Playlet authors.
|
||||
|
||||
@@ -256,7 +256,7 @@ The web app uses [Svelte](https://svelte.dev/), [Vite](https://vitejs.dev/) and
|
||||
|
||||
Since modifying the web app code requires building all three projects (Playlet, Playlet lib, and Playlet web app) this makes the iteration speed very slow, and we lose the benefits of web development, such as hot reloads.
|
||||
|
||||
For that reason, the recommended iteration when working on the dev app is:
|
||||
For that reason, the recommended iteration when working on the web app is:
|
||||
|
||||
1. Start `Playlet (dev)` (by selecting `Playlet (dev)` and pressing Play in VS Code)
|
||||
1. Once Playlet starts, switch to `Playlet Web (dev)` and press play. Do not stop `Playlet (dev)`
|
||||
|
||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
||||
|
||||
info:
|
||||
title: Playlet Web API
|
||||
version: 0.14.0
|
||||
version: 0.17.2
|
||||
description:
|
||||
Playlet Web API is a RESTful API for controlling the Playlet app on
|
||||
Roku devices. The API is intended to be used by the Playlet web app, but can
|
||||
@@ -538,6 +538,7 @@ components:
|
||||
type: boolean
|
||||
sponsorblock.show_notifications:
|
||||
type: boolean
|
||||
# TODO:P1 add the rest of properties
|
||||
PlayQueueObject:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
- [Bindings](#bindings)
|
||||
- [Async Task Generator](#async-task-generator)
|
||||
- [Tracking transpilied files](#tracking-transpilied-files)
|
||||
- [Logger](#logger)
|
||||
|
||||
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:
|
||||
|
||||
@@ -499,3 +500,37 @@ Additionally, if there's a folder `MyFolder` and `MyFolder.transpiled` in the so
|
||||
To reduce the noise of this plugin, it only runs when we're making a test build.
|
||||
|
||||
Because we continiously make test build in Github actions, the tracked transpilied files will be automatically added to PRs, so that we notice if outputs do not look right.
|
||||
|
||||
## Logger
|
||||
|
||||
**[Source](/tools/bs-plugins/logger-plugin.ts)**
|
||||
|
||||
### Why
|
||||
|
||||
The logger plugin does some code transformation to log calls, which can add caller path at compile time, or the filename, based on debug/release configuration.
|
||||
|
||||
### How
|
||||
|
||||
The logger plugin searches for calls to the predefined functions `LogError`, `LogWarn`, `LogInfo` and `LogDebug`. Once found, it does the following (we take `LogError` as an example):
|
||||
- It replaces calls of `LogError` with `LogErrorX` where X is the number of arguments.
|
||||
- For example, it replaces `LogError("Cannot complete operation:", error)` with `LogError2("Cannot complete operation:", error)`
|
||||
- Based on usage, it generates `LogErrorX` functions used. Example:
|
||||
```
|
||||
function LogError2(arg0, arg1) as void
|
||||
logger = m.global.logger
|
||||
if logger.logLevel < 0
|
||||
return
|
||||
end if
|
||||
m.global.logger.logLine = "[ERROR]" + ToString(arg0) + " " + ToString(arg1)
|
||||
end function
|
||||
```
|
||||
- Finally, it adds the caller file and line number to the args.
|
||||
- `LogError("Cannot complete operation:", error)` is replaced with `LogError(CALLER, "Cannot complete operation:", error)`
|
||||
- `CALLER` would be the full path to the source .bs file and line number, for easier debugging
|
||||
- In release mode, `CALLER` would be only the file name and line number, without the full path. This is so that dev directory does not get "leaked" in releases.
|
||||
|
||||
This is implemented to make it easy to identify where logs came from, and to generate log functions with the right number of parameters based on usage. This way we do not need all combination of functions (`LogError`, `LogWarn`, `LogInfo` and `LogDebug` multiplied by number of parameters, `LogError1`, `LogError2`, `LogError3`, and so on). Since brightscript does not support function templates or function overloading, it is either this method, or use optional parameters (but then we would have to check which parameter was passed, and which was is using the default value.) and end up with a log function with logs of if's else'es.
|
||||
|
||||
To understand more about what's being generated, download `playlet-lib.zip` from [releases](https://github.com/iBicha/playlet/releases), extract, and inspect the file `source/utils/Logging.brs`. You will see it contains log functions in the form `LogVerbX`, that are generated based on usage.
|
||||
|
||||
To give credit where credit is due, some of the ideas here (like adding the source location to the log) came from [roku-log](https://github.com/georgejecook/roku-log)
|
||||
@@ -1,39 +1,41 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.14.0",
|
||||
"version": "0.17.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet",
|
||||
"version": "0.14.0",
|
||||
"version": "0.17.2",
|
||||
"hasInstallScript": true,
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.11",
|
||||
"@types/crypto-js": "^4.1.2",
|
||||
"@types/fs-extra": "^11.0.2",
|
||||
"@types/node": "^20.8.4",
|
||||
"@types/xml2js": "^0.4.12",
|
||||
"@rokucommunity/bslint": "^0.8.13",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.10.4",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "^0.65.8",
|
||||
"brighterscript-formatter": "^1.6.34",
|
||||
"brighterscript": "0.65.13",
|
||||
"brighterscript-formatter": "^1.6.36",
|
||||
"convert-svg-to-png": "^0.6.4",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"crypto-js": "^4.1.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"express": "^4.18.2",
|
||||
"fs-extra": "^11.1.1",
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^10.3.10",
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^1.1.8",
|
||||
"json5": "^2.2.3",
|
||||
"roku-deploy": "^3.10.3",
|
||||
"rooibos-roku": "^5.7.0",
|
||||
"mailparser": "^3.6.5",
|
||||
"roku-deploy": "^3.11.1",
|
||||
"rooibos-roku": "^5.8.0",
|
||||
"semver": "^7.5.4",
|
||||
"shelljs": "^0.8.5",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.2.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.3.3",
|
||||
"xml2js": "^0.6.2",
|
||||
"yaml": "^2.3.2"
|
||||
"yaml": "^2.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18"
|
||||
@@ -274,9 +276,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@rokucommunity/bslint": {
|
||||
"version": "0.8.11",
|
||||
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.11.tgz",
|
||||
"integrity": "sha512-PKtYRngih4oybTN7IEZ4aQp2Bm6a1P4GyKo+F6eJkUmzbCN2glVXvWq+REHBinqEAYyL/3YiSsD4brFWCVPHcw==",
|
||||
"version": "0.8.13",
|
||||
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.13.tgz",
|
||||
"integrity": "sha512-EC5tQdtRFTJxOo+9lnZz6yLcsyctuchCzUNJX391ZgCN0EKJTjGigyqTsdsFprINmr0pBojUiys/ZpS/Bv3ROQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs-extra": "^10.0.0",
|
||||
@@ -305,6 +307,19 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@selderee/plugin-htmlparser2": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz",
|
||||
"integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"domhandler": "^5.0.3",
|
||||
"selderee": "^0.11.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/killymxi"
|
||||
}
|
||||
},
|
||||
"node_modules/@tsconfig/node10": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||
@@ -330,15 +345,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/crypto-js": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.2.tgz",
|
||||
"integrity": "sha512-t33RNmTu5ufG/sorROIafiCVJMx3jz95bXUMoPAZcUD14fxMXnuTzqzXZoxpR0tNx2xpw11Dlmem9vGCsrSOfA==",
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.1.tgz",
|
||||
"integrity": "sha512-FSPGd9+OcSok3RsM0UZ/9fcvMOXJ1ENE/ZbLfOPlBWj7BgXtEAM8VYfTtT760GiLbQIMoVozwVuisjvsVwqYWw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/fs-extra": {
|
||||
"version": "11.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.2.tgz",
|
||||
"integrity": "sha512-c0hrgAOVYr21EX8J0jBMXGLMgJqVf/v6yxi0dLaJboW9aQPh16Id+z6w2Tx1hm+piJOLv8xPfVKZCLfjPw/IMQ==",
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz",
|
||||
"integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/jsonfile": "*",
|
||||
@@ -355,18 +370,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.8.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz",
|
||||
"integrity": "sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==",
|
||||
"version": "20.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz",
|
||||
"integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.25.1"
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/xml2js": {
|
||||
"version": "0.4.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.12.tgz",
|
||||
"integrity": "sha512-CZPpQKBZ8db66EP5hCjwvYrLThgZvnyZrPXK2W+UI1oOaWezGt34iOaUCX4Jah2X8+rQqjvl9VKEIT8TR1I0rA==",
|
||||
"version": "0.4.14",
|
||||
"resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.14.tgz",
|
||||
"integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
@@ -713,9 +728,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brighterscript": {
|
||||
"version": "0.65.8",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.8.tgz",
|
||||
"integrity": "sha512-mqarSnGCl/VSTRj1oY9wRMZJV9s8dH+rZZ2P1yE7d1nZQucVpAIGICW83G9AJHQYUDjrGsKHn5UfAfaZaE1KCA==",
|
||||
"version": "0.65.13",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.13.tgz",
|
||||
"integrity": "sha512-f2Mvdpl+RRuVGLnwXvydpVjftSJl0n9L0HCBQlLZPQelksGV7n0ahIBcbPavqhXaZj/wB4wOKn2vQwWJI0G+tA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@rokucommunity/bslib": "^0.1.1",
|
||||
@@ -741,7 +756,7 @@
|
||||
"parse-ms": "^2.1.0",
|
||||
"readline": "^1.3.0",
|
||||
"require-relative": "^0.8.7",
|
||||
"roku-deploy": "^3.10.3",
|
||||
"roku-deploy": "^3.11.1",
|
||||
"serialize-error": "^7.0.1",
|
||||
"source-map": "^0.7.4",
|
||||
"vscode-languageserver": "7.0.0",
|
||||
@@ -756,12 +771,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brighterscript-formatter": {
|
||||
"version": "1.6.34",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.34.tgz",
|
||||
"integrity": "sha512-qGjoiIVrbvgit4RkSF4iNZKFCaavzQG/7G9ZgJs87rBHeCOvqBy+e264cD/KwDnhg4kMdvty45zZ+Um8Oeo2UQ==",
|
||||
"version": "1.6.36",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.36.tgz",
|
||||
"integrity": "sha512-f9Y3Re6egB1MCUftph8AT8RxWTtXmeMjwigRv1biNGmEuGeSOipoBnCbwY4U1CFz46L7W39/TL4n1JMV9URD6w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brighterscript": "^0.65.8",
|
||||
"brighterscript": "^0.65.12",
|
||||
"glob-all": "^3.3.0",
|
||||
"jsonc-parser": "^3.0.0",
|
||||
"source-map": "^0.7.3",
|
||||
@@ -1519,9 +1534,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/crypto-js": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
|
||||
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==",
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/css-select": {
|
||||
@@ -1574,9 +1589,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/dayjs": {
|
||||
"version": "1.11.8",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.8.tgz",
|
||||
"integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==",
|
||||
"version": "1.11.10",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
|
||||
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/debounce-promise": {
|
||||
@@ -1603,6 +1618,15 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/deepmerge": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
@@ -1761,6 +1785,15 @@
|
||||
"iconv-lite": "^0.6.2"
|
||||
}
|
||||
},
|
||||
"node_modules/encoding-japanese": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/encoding-japanese/-/encoding-japanese-2.0.0.tgz",
|
||||
"integrity": "sha512-++P0RhebUC8MJAwJOsT93dT+5oc5oPImp1HubZpAuCZ5kTLnhuuBhKHj2jJeO/Gj93idPBWmIuQ9QWMe5rX3pQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/encoding/node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
@@ -1942,9 +1975,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.2.12",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
|
||||
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
|
||||
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "^2.0.2",
|
||||
@@ -2109,9 +2142,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz",
|
||||
"integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==",
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
@@ -2382,6 +2415,31 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/he": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"he": "bin/he"
|
||||
}
|
||||
},
|
||||
"node_modules/html-to-text": {
|
||||
"version": "9.0.5",
|
||||
"resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz",
|
||||
"integrity": "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@selderee/plugin-htmlparser2": "^0.11.0",
|
||||
"deepmerge": "^4.3.1",
|
||||
"dom-serializer": "^2.0.0",
|
||||
"htmlparser2": "^8.0.2",
|
||||
"selderee": "^0.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/htmlparser2": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz",
|
||||
@@ -2499,6 +2557,43 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/imap": {
|
||||
"version": "0.8.19",
|
||||
"resolved": "https://registry.npmjs.org/imap/-/imap-0.8.19.tgz",
|
||||
"integrity": "sha512-z5DxEA1uRnZG73UcPA4ES5NSCGnPuuouUx43OPX7KZx1yzq3N8/vx2mtXEShT5inxB3pRgnfG1hijfu7XN2YMw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"readable-stream": "1.1.x",
|
||||
"utf7": ">=1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/imap/node_modules/isarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||
"integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/imap/node_modules/readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.1",
|
||||
"isarray": "0.0.1",
|
||||
"string_decoder": "~0.10.x"
|
||||
}
|
||||
},
|
||||
"node_modules/imap/node_modules/string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/immediate": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||
@@ -2752,6 +2847,51 @@
|
||||
"lcov-parse": "bin/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/leac": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/leac/-/leac-0.6.0.tgz",
|
||||
"integrity": "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/killymxi"
|
||||
}
|
||||
},
|
||||
"node_modules/libbase64": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/libbase64/-/libbase64-1.2.1.tgz",
|
||||
"integrity": "sha512-l+nePcPbIG1fNlqMzrh68MLkX/gTxk/+vdvAb388Ssi7UuUN31MI44w4Yf33mM3Cm4xDfw48mdf3rkdHszLNew==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/libmime": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/libmime/-/libmime-5.2.1.tgz",
|
||||
"integrity": "sha512-A0z9O4+5q+ZTj7QwNe/Juy1KARNb4WaviO4mYeFC4b8dBT2EEqK2pkM+GC8MVnkOjqhl5nYQxRgnPYRRTNmuSQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"encoding-japanese": "2.0.0",
|
||||
"iconv-lite": "0.6.3",
|
||||
"libbase64": "1.2.1",
|
||||
"libqp": "2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/libmime/node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/libqp": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/libqp/-/libqp-2.0.1.tgz",
|
||||
"integrity": "sha512-Ka0eC5LkF3IPNQHJmYBWljJsw0UvM6j+QdKRbWyCdTmYwvIDE6a7bCm0UkTAL/K+3KXK5qXT/ClcInU01OpdLg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lie": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
||||
@@ -2761,6 +2901,15 @@
|
||||
"immediate": "~3.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/linkify-it": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
|
||||
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"uc.micro": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
@@ -2773,6 +2922,12 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.omit": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
|
||||
@@ -2824,6 +2979,70 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/mailparser": {
|
||||
"version": "3.6.5",
|
||||
"resolved": "https://registry.npmjs.org/mailparser/-/mailparser-3.6.5.tgz",
|
||||
"integrity": "sha512-nteTpF0Khm5JLOnt4sigmzNdUH/6mO7PZ4KEnvxf4mckyXYFFhrtAWZzbq/V5aQMH+049gA7ZjfLdh+QiX2Uqg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"encoding-japanese": "2.0.0",
|
||||
"he": "1.2.0",
|
||||
"html-to-text": "9.0.5",
|
||||
"iconv-lite": "0.6.3",
|
||||
"libmime": "5.2.1",
|
||||
"linkify-it": "4.0.1",
|
||||
"mailsplit": "5.4.0",
|
||||
"nodemailer": "6.9.3",
|
||||
"tlds": "1.240.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mailparser/node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mailsplit": {
|
||||
"version": "5.4.0",
|
||||
"resolved": "https://registry.npmjs.org/mailsplit/-/mailsplit-5.4.0.tgz",
|
||||
"integrity": "sha512-wnYxX5D5qymGIPYLwnp6h8n1+6P6vz/MJn5AzGjZ8pwICWssL+CCQjWBIToOVHASmATot4ktvlLo6CyLfOXWYA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"libbase64": "1.2.1",
|
||||
"libmime": "5.2.0",
|
||||
"libqp": "2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/mailsplit/node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mailsplit/node_modules/libmime": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/libmime/-/libmime-5.2.0.tgz",
|
||||
"integrity": "sha512-X2U5Wx0YmK0rXFbk67ASMeqYIkZ6E5vY7pNWRKtnNzqjvdYYG8xtPDpCnuUEnPU9vlgNev+JoSrcaKSUaNvfsw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"encoding-japanese": "2.0.0",
|
||||
"iconv-lite": "0.6.3",
|
||||
"libbase64": "1.2.1",
|
||||
"libqp": "2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
@@ -2980,6 +3199,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/nodemailer": {
|
||||
"version": "6.9.3",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.3.tgz",
|
||||
"integrity": "sha512-fy9v3NgTzBngrMFkDsKEj0r02U7jm6XfC3b52eoNV+GCrGj+s8pt5OqhiJdWKuw51zCTdiNR/IUD1z33LIIGpg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
@@ -3159,6 +3387,19 @@
|
||||
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/parseley": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz",
|
||||
"integrity": "sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"leac": "^0.6.0",
|
||||
"peberminta": "^0.9.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/killymxi"
|
||||
}
|
||||
},
|
||||
"node_modules/parseurl": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||
@@ -3241,6 +3482,15 @@
|
||||
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/peberminta": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.9.0.tgz",
|
||||
"integrity": "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/killymxi"
|
||||
}
|
||||
},
|
||||
"node_modules/pend": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||
@@ -3376,9 +3626,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
|
||||
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
@@ -3673,9 +3923,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/roku-deploy": {
|
||||
"version": "3.10.3",
|
||||
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.3.tgz",
|
||||
"integrity": "sha512-COJSQ638QklcM+8AN1nujFuzT04rTZLFuLSww35edm8w/y0l60oF/Iu7TQ46m75DwoGFzGFfomLEmA1ltQk9mA==",
|
||||
"version": "3.11.1",
|
||||
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.11.1.tgz",
|
||||
"integrity": "sha512-ri3eJKGyPMexI+pwvBQxpi6I7I3z9670yOidTcVEohpbYhXpnaIHnKdLb2l87kuC+iTtIEsElgmx3fyEdI5Cjg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chalk": "^2.4.2",
|
||||
@@ -3686,6 +3936,7 @@
|
||||
"is-glob": "^4.0.3",
|
||||
"jsonc-parser": "^2.3.0",
|
||||
"jszip": "^3.6.0",
|
||||
"lodash": "^4.17.21",
|
||||
"micromatch": "^4.0.4",
|
||||
"moment": "^2.29.1",
|
||||
"parse-ms": "^2.1.0",
|
||||
@@ -3743,9 +3994,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rooibos-roku": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.7.0.tgz",
|
||||
"integrity": "sha512-rkEAaowZeuLbwvtBcRZ1r5ber2yeBRqjxcwya9kfYQmDJ+m2XP8pGO9j10C0eW9hx6H7ZZl+5z1oHjnjwQsmBQ==",
|
||||
"version": "5.8.0",
|
||||
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.8.0.tgz",
|
||||
"integrity": "sha512-mPAszwOH1VdxMgSaoXQ/CgpAZ3RQ0A+d3BoxyY8axMsYS5kPO/8dL8fa7iFTGEZYA7803Ur52zlyN8GXqV5nLg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"source-map": "^0.7.3",
|
||||
@@ -3846,6 +4097,18 @@
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/selderee": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz",
|
||||
"integrity": "sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"parseley": "^0.12.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/killymxi"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
@@ -4021,9 +4284,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sshpk": {
|
||||
"version": "1.17.0",
|
||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
|
||||
"integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
|
||||
"version": "1.18.0",
|
||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz",
|
||||
"integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"asn1": "~0.2.3",
|
||||
@@ -4213,6 +4476,15 @@
|
||||
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tlds": {
|
||||
"version": "1.240.0",
|
||||
"resolved": "https://registry.npmjs.org/tlds/-/tlds-1.240.0.tgz",
|
||||
"integrity": "sha512-1OYJQenswGZSOdRw7Bql5Qu7uf75b+F3HFBXbqnG/ifHa0fev1XcG+3pJf3pA/KC6RtHQzfKgIf1vkMlMG7mtQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tlds": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
|
||||
@@ -4253,9 +4525,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ts-node": {
|
||||
"version": "10.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
||||
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
|
||||
"version": "10.9.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
|
||||
"integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@cspotcode/source-map-support": "^0.8.0",
|
||||
@@ -4327,9 +4599,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
||||
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
|
||||
"version": "5.3.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
|
||||
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@@ -4339,6 +4611,12 @@
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/uc.micro": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
|
||||
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/unbzip2-stream": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
||||
@@ -4356,9 +4634,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.25.3",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz",
|
||||
"integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==",
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
@@ -4398,6 +4676,24 @@
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf7": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/utf7/-/utf7-1.0.2.tgz",
|
||||
"integrity": "sha512-qQrPtYLLLl12NF4DrM9CvfkxkYI97xOb5dsnGZHE3teFr0tWiEZ9UdgMPczv24vl708cYMpe6mGXGHrotIp3Bw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"semver": "~5.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf7/node_modules/semver": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||
"integrity": "sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
@@ -4703,9 +4999,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz",
|
||||
"integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
|
||||
"integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
|
||||
@@ -1,33 +1,35 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.14.0",
|
||||
"version": "0.17.2",
|
||||
"description": "Unofficial Youtube client for Roku",
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.11",
|
||||
"@types/crypto-js": "^4.1.2",
|
||||
"@types/fs-extra": "^11.0.2",
|
||||
"@types/node": "^20.8.4",
|
||||
"@types/xml2js": "^0.4.12",
|
||||
"@rokucommunity/bslint": "^0.8.13",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.10.4",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "^0.65.8",
|
||||
"brighterscript-formatter": "^1.6.34",
|
||||
"brighterscript": "0.65.13",
|
||||
"brighterscript-formatter": "^1.6.36",
|
||||
"convert-svg-to-png": "^0.6.4",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"crypto-js": "^4.1.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"express": "^4.18.2",
|
||||
"fs-extra": "^11.1.1",
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^10.3.10",
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^1.1.8",
|
||||
"json5": "^2.2.3",
|
||||
"roku-deploy": "^3.10.3",
|
||||
"rooibos-roku": "^5.7.0",
|
||||
"mailparser": "^3.6.5",
|
||||
"roku-deploy": "^3.11.1",
|
||||
"rooibos-roku": "^5.8.0",
|
||||
"semver": "^7.5.4",
|
||||
"shelljs": "^0.8.5",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.2.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.3.3",
|
||||
"xml2js": "^0.6.2",
|
||||
"yaml": "^2.3.2"
|
||||
"yaml": "^2.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.14.0",
|
||||
"version": "0.17.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-app",
|
||||
"version": "0.14.0"
|
||||
"version": "0.17.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.14.0",
|
||||
"version": "0.17.2",
|
||||
"description": "Unofficial Youtube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf build/playlet-app",
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
import "LoadingMessages.bs"
|
||||
|
||||
function Init() as void
|
||||
m.top.backgroundColor = "0x242424FF"
|
||||
m.top.backgroundURI = ""
|
||||
|
||||
m.loadingIndicator = m.top.findNode("LoadingIndicator")
|
||||
m.loadingIndicator.visible = true
|
||||
m.global.addFields({
|
||||
loadingIndicator: m.loadingIndicator
|
||||
})
|
||||
|
||||
m.loadingIndicator.visible = true
|
||||
m.loadingIndicator.message = GetLoadingMessage()
|
||||
|
||||
m.playletLibUrls = GetPlayletLibUrls()
|
||||
m.playletLibUrlIndex = 0
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
function GetLoadingMessage() as string
|
||||
messages = GetLoadingMessagesFromCache()
|
||||
if messages = invalid or messages.count() = 0
|
||||
messages = [
|
||||
"Now loading Playlet...",
|
||||
"One moment please...",
|
||||
"Downloading the internet...",
|
||||
"Unclogging the tubes...",
|
||||
"Warming up the flux capacitor...",
|
||||
"Loading, ehm, stuff...",
|
||||
"Restoring quantum entanglement...",
|
||||
"Searching for kitten videos...",
|
||||
"One Mississippi... two Mississippi...",
|
||||
"Checking the TV's extended warranty...",
|
||||
"Deleting system32...",
|
||||
"Updating: 3 hours 32 minutes remaining...",
|
||||
]
|
||||
end if
|
||||
index = Rnd(messages.count()) - 1
|
||||
return messages[index]
|
||||
end function
|
||||
|
||||
function GetLoadingMessagesFromCache() as object
|
||||
messagesFile = ReadAsciiFile("cachefs:/loading_messages_v1.json")
|
||||
if messagesFile = invalid or messagesFile = ""
|
||||
return invalid
|
||||
end if
|
||||
return ParseJson(messagesFile)
|
||||
end function
|
||||
@@ -14,12 +14,10 @@ function PositionSpinner()
|
||||
centerx = (1280 - m.busyspinner.poster.width) / 2
|
||||
centery = (720 - m.busyspinner.poster.height) / 2
|
||||
m.busyspinner.translation = [centerx, centery]
|
||||
m.busyspinner.visible = true
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnVisibleChange()
|
||||
m.busyspinner.visible = m.top.visible
|
||||
if m.busyspinner.visible
|
||||
m.busyspinner.control = "start"
|
||||
else
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<component name="LoadingIndicator" extends="Group">
|
||||
<interface>
|
||||
<field id="message" type="string" alias="messageLabel.text" />
|
||||
</interface>
|
||||
<children>
|
||||
<Rectangle
|
||||
width="1280"
|
||||
@@ -9,6 +12,16 @@
|
||||
id="busySpinner"
|
||||
inheritParentOpacity="false"
|
||||
spinInterval="1" />
|
||||
<Label
|
||||
id="messageLabel"
|
||||
inheritParentOpacity="false"
|
||||
width="1280"
|
||||
height="50"
|
||||
horizAlign="center"
|
||||
vertAlign="center"
|
||||
translation="[0,450]">
|
||||
<Font role="font" uri="font:SystemFontFile" size="28" />
|
||||
</Label>
|
||||
</Rectangle>
|
||||
</children>
|
||||
</component>
|
||||
@@ -2,8 +2,8 @@ title=Playlet
|
||||
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=14
|
||||
build_version=00000
|
||||
minor_version=17
|
||||
build_version=00002
|
||||
|
||||
ui_resolutions=hd
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function ShowErrorDialog(message as object, bulletText as object, bottomMessage as object)
|
||||
' TODO:P2 a null check on StandardMessageDialog, only available on 10.0 and later
|
||||
dialog = CreateObject("roSGNode", "StandardMessageDialog")
|
||||
dialog.message = message
|
||||
dialog.bulletText = bulletText
|
||||
@@ -19,5 +20,7 @@ function OnButtonSelected()
|
||||
end function
|
||||
|
||||
function OnDialogClosed()
|
||||
' TODO:P1 throw an exception to cause a crash report to be generated
|
||||
' Should include which playlet lib failed to load
|
||||
m.top.getScene().exitChannel = true
|
||||
end function
|
||||
@@ -1,5 +1,5 @@
|
||||
' Playlet (App to play videos from an Invidious server on Roku TVs)
|
||||
' Copyright (C) 2022 Brahim Hadriche
|
||||
' Copyright (C) 2023 Brahim Hadriche
|
||||
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU Affero General Public License as published by
|
||||
@@ -28,16 +28,16 @@ function Main(args as object) as void
|
||||
scene.ObserveField("exitChannel", port)
|
||||
scene.launchArgs = args
|
||||
|
||||
' These vars are needed to pass certification.
|
||||
' The actual work is done in Playlet Lib
|
||||
' bs:disable-next-line LINT1005
|
||||
contentId = args.contentId
|
||||
' bs:disable-next-line LINT1005
|
||||
mediaType = args.mediaType
|
||||
|
||||
' Do not signal app launch complete here, we're doing it over at Playlet Lib
|
||||
' This is needed to pass cetification
|
||||
if false
|
||||
' These vars are needed to pass certification.
|
||||
' The actual work is done in Playlet Lib
|
||||
' bs:disable-next-line LINT1005
|
||||
contentId = args.contentId
|
||||
' bs:disable-next-line LINT1005
|
||||
mediaType = args.mediaType
|
||||
|
||||
' Do not signal app launch complete here, we're doing it over at Playlet Lib
|
||||
' This is needed to pass cetification
|
||||
scene.signalBeacon("AppLaunchComplete")
|
||||
end if
|
||||
|
||||
@@ -85,10 +85,3 @@ function Main(args as object) as void
|
||||
end while
|
||||
|
||||
end function
|
||||
|
||||
function ClearPlayletLibUrlsIfNeeded(launchArgs as object) as void
|
||||
if launchArgs = invalid or launchArgs.clearPlayletLibUrls = invalid
|
||||
return
|
||||
end if
|
||||
DeleteRegistryKey("playlet_lib_urls", "Playlet")
|
||||
end function
|
||||
@@ -20,3 +20,10 @@ function GetPlayletLibUrlsFromRegistry() as object
|
||||
urls = ParseJson(urlsJson)
|
||||
return urls
|
||||
end function
|
||||
|
||||
function ClearPlayletLibUrlsIfNeeded(launchArgs as object) as void
|
||||
if launchArgs = invalid or launchArgs.clearPlayletLibUrls = invalid
|
||||
return
|
||||
end if
|
||||
DeleteRegistryKey("playlet_lib_urls", "Playlet")
|
||||
end function
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.14.0",
|
||||
"version": "0.17.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-lib",
|
||||
"version": "0.14.0"
|
||||
"version": "0.17.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.14.0",
|
||||
"version": "0.17.2",
|
||||
"description": "Unofficial Youtube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf build/playlet-lib",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/components/Navigation/LongPress.bs"
|
||||
import "pkg:/components/PlayQueue/PlayQueueViewUtils.bs"
|
||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
@@ -10,6 +12,7 @@ function Init()
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
InitializeLongPress(["options"])
|
||||
NodeSetFocus(m.top.root, true)
|
||||
end function
|
||||
|
||||
@@ -78,27 +81,50 @@ function GetRootScreen(screenName as string) as object
|
||||
end function
|
||||
|
||||
function onKeyEvent(key as string, press as boolean) as boolean
|
||||
if not press
|
||||
return false
|
||||
end if
|
||||
if key = "options"
|
||||
VideoUtils.ToggleVideoPictureInPicture()
|
||||
if LongPressHandler(key, press)
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = OPTIONS_LONG_PRESS_KEY and press
|
||||
LogInfo("Opening PlayQueueView")
|
||||
PlayQueueViewUtils.Open(m.top.playQueue, m.top)
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "options" and not press
|
||||
if VideoUtils.ToggleVideoPictureInPicture()
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if not press
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "play"
|
||||
VideoUtils.TogglePause()
|
||||
if VideoUtils.TogglePause()
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = "pause"
|
||||
VideoUtils.PauseVideo()
|
||||
if VideoUtils.PauseVideo()
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = "playonly"
|
||||
VideoUtils.ResumeVideo()
|
||||
if VideoUtils.ResumeVideo()
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
if VideoUtils.IsVideoPlayerOpen() and not VideoUtils.IsVideoPlayerFullScreen()
|
||||
if VideoUtils.ToggleVideoPictureInPicture()
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
dialog = DialogUtils.ShowDialogButtons("Do you want to exit Playlet?", "Exit", ["Exit", "Cancel"])
|
||||
dialog.observeField("buttonSelected", FuncName(OnExitDialog), ["buttonSelected"])
|
||||
return true
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<interface>
|
||||
<field id="root" type="node" />
|
||||
<field id="stack" type="node" />
|
||||
<field id="playQueue" type="node" />
|
||||
<function name="PushScreen" />
|
||||
<function name="PopScreen" />
|
||||
<function name="FocusTopScreen" />
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
import "SubscribeTask.bs"
|
||||
|
||||
function Init()
|
||||
m.container = m.top.findNode("container")
|
||||
@@ -11,10 +16,12 @@ function Init()
|
||||
m.banner = m.top.findNode("banner")
|
||||
m.thumbnail = m.top.findNode("thumbnail")
|
||||
m.authorLabel = m.top.findNode("authorLabel")
|
||||
m.subscribeButton = m.top.findNode("subscribeButton")
|
||||
m.rowList = m.top.FindNode("rowList")
|
||||
m.rowList.focusable = true
|
||||
m.rowList.screen = m.top
|
||||
|
||||
m.banner.ObserveField("loadStatus", FuncName(OnBannerLoadStatus))
|
||||
DisposableObserveFieldScoped(m.banner, "loadStatus", FuncName(OnBannerLoadStatus))
|
||||
m.author = ""
|
||||
m.authorId = ""
|
||||
|
||||
@@ -23,6 +30,17 @@ end function
|
||||
|
||||
function OnNodeready()
|
||||
m.rowList@.BindNode(invalid)
|
||||
|
||||
SetNavigation(m.rowList, "up", m.subscribeButton)
|
||||
SetNavigation(m.subscribeButton, "down", m.rowList)
|
||||
|
||||
m.subscribeButton.text = "Subscribe"
|
||||
DisposableObserveFieldScoped(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
|
||||
|
||||
SetSubscribeButtonVisibility()
|
||||
DisposableObserveFieldScoped(m.invidious, "authToken", FuncName(SetSubscribeButtonVisibility))
|
||||
OnSubscriptionChanged()
|
||||
DisposableObserveFieldScoped(m.invidious, "subscriptions", FuncName(OnSubscriptionChanged))
|
||||
end function
|
||||
|
||||
function OnFocusChange() as void
|
||||
@@ -36,6 +54,7 @@ end function
|
||||
function OnContentSet() as void
|
||||
content = m.top.content
|
||||
if content = invalid
|
||||
m.top.authorId = ""
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -55,6 +74,8 @@ function OnContentSet() as void
|
||||
|
||||
authorId = ValidString(content.authorId)
|
||||
author = ValidString(content._author)
|
||||
m.top.authorId = authorId
|
||||
|
||||
if (authorId <> m.authorId or author <> m.author) and IsArray(content.tabs)
|
||||
m.authorId = authorId
|
||||
m.author = author
|
||||
@@ -78,6 +99,10 @@ function CreateChannelFeeds(authorId as string, author as string, tabs as object
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
if press = false
|
||||
return false
|
||||
end if
|
||||
@@ -91,6 +116,29 @@ end function
|
||||
|
||||
function Close()
|
||||
m.appController@.PopScreen(invalid)
|
||||
m.top.dispose = true
|
||||
end function
|
||||
|
||||
function OnDispose()
|
||||
m.rowList.dispose = true
|
||||
DisposeObservers()
|
||||
if m.subscribeTask <> invalid
|
||||
m.subscribeTask.cancel = true
|
||||
m.subscribeTask = invalid
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnSubscribeButtonSelected()
|
||||
if m.subscribeTask <> invalid
|
||||
m.subscribeTask.cancel = true
|
||||
end if
|
||||
|
||||
isSubbed = IsSubscribed()
|
||||
m.subscribeTask = StartAsyncTask(SubscribeTask, {
|
||||
invidious: m.invidious,
|
||||
ucid: m.authorId,
|
||||
subscribe: not isSubbed
|
||||
})
|
||||
end function
|
||||
|
||||
function OnBannerLoadStatus() as void
|
||||
@@ -159,10 +207,51 @@ function CreateChannelFeed(title as string, endpoint as string, ucid as string,
|
||||
end function
|
||||
|
||||
function GetContextMenuOptionsForItem(video as object) as object
|
||||
content = m.top.content
|
||||
if content = invalid or StringUtils.IsNullOrEmpty(content.authorId)
|
||||
if StringUtils.IsNullOrEmpty(m.top.authorId)
|
||||
return []
|
||||
end if
|
||||
return m.bookmarks@.GetMenuForChannel(m.top.content)
|
||||
end function
|
||||
|
||||
return m.bookmarks@.GetMenuForChannel(content)
|
||||
function IsLoggedIn() as boolean
|
||||
return m.invidious.authToken <> invalid
|
||||
end function
|
||||
|
||||
function IsSubscribed() as boolean
|
||||
authorId = m.top.authorId
|
||||
if StringUtils.IsNullOrEmpty(authorId)
|
||||
return false
|
||||
end if
|
||||
|
||||
subscriptions = m.invidious.subscriptions
|
||||
if subscriptions = invalid
|
||||
return false
|
||||
end if
|
||||
if not subscriptions.DoesExist(authorId)
|
||||
return false
|
||||
end if
|
||||
return subscriptions[authorId]
|
||||
end function
|
||||
|
||||
function OnAuthorIdChange()
|
||||
SetSubscribeButtonVisibility()
|
||||
OnSubscriptionChanged()
|
||||
end function
|
||||
|
||||
function SetSubscribeButtonVisibility()
|
||||
isLogged = IsLoggedIn()
|
||||
m.subscribeButton.visible = isLogged and not StringUtils.IsNullOrEmpty(m.top.authorId)
|
||||
m.subscribeButton.focusable = m.subscribeButton.visible
|
||||
if not m.subscribeButton.visible and m.subscribeButton.hasFocus()
|
||||
NodeSetFocus(m.rowList, true)
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnSubscriptionChanged()
|
||||
isSubbed = IsSubscribed()
|
||||
if isSubbed
|
||||
m.subscribeButton.text = "Unsubscribe"
|
||||
else
|
||||
m.subscribeButton.text = "Subscribe"
|
||||
end if
|
||||
end function
|
||||
@@ -1,6 +1,7 @@
|
||||
<component name="ChannelView" extends="Group" includes="AutoBind,Focus,ContextMenuProvider">
|
||||
<component name="ChannelView" extends="Group" includes="AutoBind,Focus,ContextMenuProvider,Disposable">
|
||||
<interface>
|
||||
<field id="content" type="node" onChange="OnContentSet" />
|
||||
<field id="authorId" type="string" onChange="OnAuthorIdChange" />
|
||||
<field id="appController" type="node" bind="/AppController" />
|
||||
<field id="invidious" type="node" bind="/Invidious" />
|
||||
<field id="bookmarks" type="node" bind="/Bookmarks" />
|
||||
@@ -37,6 +38,14 @@
|
||||
font="font:MediumBoldSystemFont" />
|
||||
</Poster>
|
||||
|
||||
<Button
|
||||
id="subscribeButton"
|
||||
iconUri=""
|
||||
focusedIconUri=""
|
||||
showFocusFootprint="true"
|
||||
minWidth="200"
|
||||
translation="[930,64]" />
|
||||
|
||||
<VideoRowList
|
||||
itemComponentName="RowCell"
|
||||
id="rowList"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||
|
||||
@asynctask
|
||||
function SubscribeTask(input as object) as object
|
||||
invidiousNode = input.invidious
|
||||
ucid = input.ucid
|
||||
subscribe = input.subscribe
|
||||
|
||||
if m.top.cancel
|
||||
return invalid
|
||||
end if
|
||||
|
||||
service = new Invidious.InvidiousService(invidiousNode)
|
||||
|
||||
if subscribe
|
||||
response = service.Subscribe(ucid)
|
||||
else
|
||||
response = service.Unsubscribe(ucid)
|
||||
end if
|
||||
|
||||
if not response.IsSuccess()
|
||||
error = response.ErrorMessage()
|
||||
LogError("Failed to subscribe/unsubscribe to channel:", error)
|
||||
return {
|
||||
success: false,
|
||||
error: error
|
||||
}
|
||||
end if
|
||||
|
||||
invidiousNode.refreshSubscribtions = true
|
||||
|
||||
return {
|
||||
success: true
|
||||
}
|
||||
end function
|
||||
@@ -7,17 +7,27 @@ function UpdateMaskSize()
|
||||
width = m.top.width
|
||||
height = m.top.height
|
||||
|
||||
m.top.maskSize = [width * GetScaleFactor(), height * GetScaleFactor()]
|
||||
m.top.maskSize = [width * GetUIScaleFactor(), height * GetUIScaleFactor()]
|
||||
end function
|
||||
|
||||
' MaskGroup component do not scale with with UI resolution
|
||||
function GetScaleFactor() as float
|
||||
if m.scaleFactor <> invalid
|
||||
return m.scaleFactor
|
||||
function GetUIScaleFactor() as float
|
||||
if m.uiScaleFactor <> invalid
|
||||
return m.uiScaleFactor
|
||||
end if
|
||||
|
||||
if m.global.uiScaleFactor <> invalid
|
||||
return m.global.uiScaleFactor
|
||||
end if
|
||||
|
||||
deviceInfo = CreateObject("roDeviceInfo")
|
||||
uiResolutionWidth = deviceInfo.GetUIResolution().width
|
||||
' divide by 1280 because we have ui_resolutions=hd in manifest
|
||||
m.scaleFactor = uiResolutionWidth / 1280
|
||||
return m.scaleFactor
|
||||
m.uiScaleFactor = uiResolutionWidth / 1280
|
||||
|
||||
if not m.global.hasField("uiScaleFactor")
|
||||
m.global.addField("uiScaleFactor", "float", false)
|
||||
end if
|
||||
m.global.uiScaleFactor = m.uiScaleFactor
|
||||
return m.uiScaleFactor
|
||||
end function
|
||||
@@ -1,23 +1,23 @@
|
||||
<component name="ChannelContentNode" extends="ContentNode">
|
||||
<interface>
|
||||
<function name="LoadChannel" />
|
||||
|
||||
<field id="type" type="string" value="channel" />
|
||||
<field id="loadState" type="string" />
|
||||
<function name="LoadChannel" />
|
||||
<!-- index in a feed -->
|
||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||
<field id="HDItemWidth" type="float" value="196" />
|
||||
<!-- NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation -->
|
||||
<field id="_author" type="string" />
|
||||
<field id="authorId" type="string" />
|
||||
<field id="banner" type="string" />
|
||||
<field id="channelHandle" type="string" />
|
||||
<field id="description" type="string" />
|
||||
<field id="subCount" type="integer" />
|
||||
<field id="subCountText" type="string" />
|
||||
<field id="tabs" type="array" />
|
||||
<field id="thumbnail" type="string" />
|
||||
<field id="videoCount" type="integer" />
|
||||
<field id="videoCountText" type="string" />
|
||||
<field id="thumbnail" type="string" />
|
||||
<field id="banner" type="string" />
|
||||
<field id="tabs" type="array" />
|
||||
|
||||
<field id="HDItemWidth" type="float" value="196" />
|
||||
</interface>
|
||||
</component>
|
||||
@@ -4,7 +4,7 @@
|
||||
<field id="loadState" type="string" />
|
||||
<!-- index in a feed -->
|
||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||
<!--
|
||||
<!--
|
||||
For some strange reason, the "author" field can only be set once.
|
||||
If you try to set it again, it will not be updated, with type mismatch warning:
|
||||
|
||||
@@ -22,17 +22,19 @@
|
||||
Although we use the field "author" in other components, this is the only place where we modify it after
|
||||
we set it for the first time (because a saved Playlist belongs to the Invidious user at first, but then
|
||||
we can query it's original owner)
|
||||
|
||||
The issue happens on PlaylistContentNode and ChannelContentNode, but not VideoContentNode.
|
||||
-->
|
||||
<field id="_author" type="string" />
|
||||
<field id="authorId" type="string" />
|
||||
<field id="playlistId" type="string" />
|
||||
<field id="thumbnail" type="uri" />
|
||||
<field id="thumbnailBackground" type="uri" />
|
||||
<field id="updated" type="integer" />
|
||||
<field id="updatedText" type="string" />
|
||||
<field id="videoCount" type="integer" value="-1" />
|
||||
<field id="videoCountText" type="string" />
|
||||
<field id="viewCount" type="integer" />
|
||||
<field id="viewCountText" type="string" />
|
||||
<field id="updated" type="integer" />
|
||||
<field id="updatedText" type="string" />
|
||||
</interface>
|
||||
</component>
|
||||
@@ -1,14 +1,13 @@
|
||||
<component name="VideoContentNode" extends="ContentNode">
|
||||
<interface>
|
||||
<field id="type" type="string" value="video" />
|
||||
|
||||
<field id="author" type="string" />
|
||||
<field id="authorId" type="string" />
|
||||
<field id="hlsUrl" type="uri" />
|
||||
<!-- index in a playlist -->
|
||||
<field id="index" type="integer" value="-1" />
|
||||
<!-- index in a feed -->
|
||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||
|
||||
<field id="author" type="string" />
|
||||
<field id="authorId" type="string" />
|
||||
<field id="isUpcoming" type="boolean" />
|
||||
<field id="lengthSeconds" type="integer" />
|
||||
<field id="lengthText" type="string" />
|
||||
|
||||
@@ -16,6 +16,7 @@ function MainSceneContainerChanged()
|
||||
HideLoadingScreen()
|
||||
InitEcpArgs()
|
||||
m.scene.signalBeacon("AppLaunchComplete")
|
||||
CopyLoadingMessagesToCache()
|
||||
end function
|
||||
|
||||
function StartWebServer()
|
||||
|
||||
@@ -17,6 +17,7 @@ function MainSceneContainerChanged()
|
||||
HideLoadingScreen()
|
||||
InitEcpArgs()
|
||||
m.scene.signalBeacon("AppLaunchComplete")
|
||||
CopyLoadingMessagesToCache()
|
||||
end function
|
||||
|
||||
function StartWebServer()
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<ApplicationInfo id="ApplicationInfo" />
|
||||
<Preferences id="Preferences" />
|
||||
<Bookmarks id="Bookmarks" />
|
||||
<SearchHistory id="SearchHistory" />
|
||||
<Invidious id="Invidious" />
|
||||
<PlayletWebServer id="WebServer" port="8888" />
|
||||
</AppController>
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
<children>
|
||||
<!-- Logger should remain the first child, to make sure it is initialized first in the scene -->
|
||||
<Logger id="Logger" />
|
||||
<AppController id="AppController" root="bind:./AppRoot" stack="bind:./Stack">
|
||||
<AppController id="AppController"
|
||||
root="bind:./AppRoot"
|
||||
stack="bind:./Stack"
|
||||
playQueue="bind:./PlayQueue">
|
||||
<Group id="Stack">
|
||||
<AppRoot id="AppRoot">
|
||||
<NavBar id="NavBar" focusIndex="1" appController="bind:/AppController">
|
||||
@@ -47,10 +50,14 @@
|
||||
|
||||
<!-- No render nodes -->
|
||||
<PlayQueue id="PlayQueue"
|
||||
invidious="bind:../Invidious" />
|
||||
invidious="bind:../Invidious"
|
||||
notifications="bind:../Notifications"
|
||||
preferences="bind:../Preferences" />
|
||||
<ApplicationInfo id="ApplicationInfo" />
|
||||
<Preferences id="Preferences" />
|
||||
<Bookmarks id="Bookmarks" />
|
||||
<SearchHistory id="SearchHistory"
|
||||
preferences="bind:../Preferences" />
|
||||
|
||||
<Invidious id="Invidious"
|
||||
webServer="bind:../WebServer"
|
||||
|
||||
@@ -7,13 +7,19 @@ function InitializeBindings()
|
||||
childProps: {
|
||||
"AppController": {
|
||||
"root": "./AppRoot",
|
||||
"stack": "./Stack"
|
||||
"stack": "./Stack",
|
||||
"playQueue": "./PlayQueue"
|
||||
},
|
||||
"NavBar": {
|
||||
"appController": "/AppController"
|
||||
},
|
||||
"PlayQueue": {
|
||||
"invidious": "../Invidious"
|
||||
"invidious": "../Invidious",
|
||||
"notifications": "../Notifications",
|
||||
"preferences": "../Preferences"
|
||||
},
|
||||
"SearchHistory": {
|
||||
"preferences": "../Preferences"
|
||||
},
|
||||
"Invidious": {
|
||||
"webServer": "../WebServer",
|
||||
|
||||
@@ -47,6 +47,18 @@ function PopulateButtons() as void
|
||||
m.top.focusable = buttons.Count() > 0
|
||||
|
||||
m.top.focusIndex = m.top.focusIndex
|
||||
|
||||
CenterButtons()
|
||||
end function
|
||||
|
||||
function CenterButtons()
|
||||
parent = m.buttonGroup.getParent()
|
||||
parentWidth = parent.width
|
||||
parentHeight = parent.height
|
||||
|
||||
rect = m.buttonGroup.boundingRect()
|
||||
|
||||
m.buttonGroup.translation = [parentWidth / 2 - rect.width / 2, parentHeight / 2 - rect.height / 2]
|
||||
end function
|
||||
|
||||
function onKeyEvent(key as string, press as boolean) as boolean
|
||||
|
||||
@@ -1,41 +1,79 @@
|
||||
const LONG_PRESS_KEY = "OK_LONG_PRESS"
|
||||
const OK_LONG_PRESS_KEY = "OK_LONG_PRESS"
|
||||
const OPTIONS_LONG_PRESS_KEY = "OPTIONS_LONG_PRESS"
|
||||
|
||||
function InitializeLongPress(keys as object, duration = 1.0 as float)
|
||||
longPressKeyMap = {
|
||||
"OK": OK_LONG_PRESS_KEY,
|
||||
"options": OPTIONS_LONG_PRESS_KEY
|
||||
}
|
||||
m._longPressKeyMap = {}
|
||||
for each key in keys
|
||||
m._longPressKeyMap[key] = longPressKeyMap[key]
|
||||
end for
|
||||
|
||||
#if DEBUG
|
||||
' This is for testing long press using the VSCode extension.
|
||||
' Using the keyboard:
|
||||
' - press K to simulate an "OK" long press on the remote.
|
||||
' - press O to simulate an "options" long press on the remote.
|
||||
simulatedLongPressKeyMap = {
|
||||
"OK": "Lit_k",
|
||||
"options": "Lit_o"
|
||||
}
|
||||
|
||||
m._simulatedLongPressKeyMap = {}
|
||||
for each key in keys
|
||||
m._simulatedLongPressKeyMap[simulatedLongPressKeyMap[key]] = key
|
||||
end for
|
||||
#end if
|
||||
|
||||
function InitializeLongPressTimer(duration = 1.0 as float)
|
||||
m._longPressTimer = CreateObject("roSGNode", "Timer")
|
||||
m._longPressTimer.duration = duration
|
||||
m._longPressFired = false
|
||||
m._pressState = {}
|
||||
|
||||
m._longPressTimer.ObserveField("fire", FuncName(LongPressTimerFired))
|
||||
end function
|
||||
|
||||
function LongPressHandler(key as string, press as boolean) as boolean
|
||||
#if DEBUG
|
||||
if key = "Lit_l"
|
||||
LogInfo("Simulating long press using key:", key, "press:", press)
|
||||
if m._simulatedLongPressKeyMap.DoesExist(key)
|
||||
subtype = m.top.subtype()
|
||||
simulatedKey = m._simulatedLongPressKeyMap[key]
|
||||
LogInfo(`[${subtype}] Simulating`, simulatedKey, "long press using key:", key, "press:", press)
|
||||
longPressKey = m._longPressKeyMap[simulatedKey]
|
||||
m._longPressFired = true
|
||||
return OnkeyEvent(LONG_PRESS_KEY, press)
|
||||
return OnkeyEvent(longPressKey, press)
|
||||
end if
|
||||
#end if
|
||||
if key = "OK" and press
|
||||
|
||||
isLongPressKey = m._longPressKeyMap.DoesExist(key)
|
||||
if not isLongPressKey
|
||||
return false
|
||||
end if
|
||||
|
||||
if press
|
||||
m._longPressTimer.control = "stop"
|
||||
m._longPressTimer.control = "start"
|
||||
m._longPressFired = false
|
||||
m._okPressed = true
|
||||
m._longPressKey = key
|
||||
m._pressState[key] = true
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "OK" and not press
|
||||
if not press
|
||||
m._longPressTimer.control = "stop"
|
||||
if m._longPressFired = true
|
||||
m._longPressFired = false
|
||||
m._okPressed = false
|
||||
m._pressState[key] = false
|
||||
return true
|
||||
end if
|
||||
' This case is for handling a dialog: The dialog will be dismissed with the OK down event,
|
||||
' and we would trigger the action with the OK up event. The action should only happen if
|
||||
' we detected both down and up events.
|
||||
wasOkPressed = m._okPressed
|
||||
m._okPressed = false
|
||||
if wasOkPressed <> true
|
||||
wasPressed = m._pressState[key]
|
||||
m._pressState[key] = false
|
||||
if wasPressed <> true
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
@@ -43,7 +81,11 @@ function LongPressHandler(key as string, press as boolean) as boolean
|
||||
return false
|
||||
end function
|
||||
|
||||
function LongPressTimerFired()
|
||||
function LongPressTimerFired() as void
|
||||
m._longPressFired = true
|
||||
OnkeyEvent(LONG_PRESS_KEY, true)
|
||||
if StringUtils.IsNullOrEmpty(m._longPressKey) or not m._longPressKeyMap.DoesExist(m._longPressKey)
|
||||
return
|
||||
end if
|
||||
|
||||
OnkeyEvent(m._longPressKeyMap[m._longPressKey], true)
|
||||
end function
|
||||
@@ -0,0 +1,5 @@
|
||||
<component name="ContentNodeReference" extends="ContentNode">
|
||||
<interface>
|
||||
<field id="refNode" type="node" />
|
||||
</interface>
|
||||
</component>
|
||||
@@ -0,0 +1,41 @@
|
||||
' NodeByRef: these functions provides the ability to "wrap" a node in
|
||||
' another node, so it can be passed by reference. This is useful for
|
||||
' when a node is required to be a child of multiple nodes at once,
|
||||
' which is not possible.
|
||||
' Instead, the node is wrapped, passed around, and unwrapped when needed.
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
namespace NodeByRef
|
||||
|
||||
function Wrap(node as object) as object
|
||||
if node = invalid
|
||||
return invalid
|
||||
end if
|
||||
|
||||
if node.refNode <> invalid
|
||||
return node
|
||||
end if
|
||||
|
||||
ref = CreateObject("roSGNode", "ContentNodeReference")
|
||||
ref.refNode = node
|
||||
if not StringUtils.IsNullOrEmpty(node.id)
|
||||
ref.id = node.id + "-ref"
|
||||
end if
|
||||
return ref
|
||||
end function
|
||||
|
||||
function Unwrap(node as object) as object
|
||||
if node = invalid
|
||||
return invalid
|
||||
end if
|
||||
|
||||
loopGuard = 0
|
||||
while node.refNode <> invalid and loopGuard < 10
|
||||
node = node.refNode
|
||||
loopGuard += 1
|
||||
end while
|
||||
|
||||
return node
|
||||
end function
|
||||
|
||||
end namespace
|
||||
@@ -0,0 +1,67 @@
|
||||
import "pkg:/components/NodeByRef/NodeByRef.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
' TODO:P2 a lot of shared logic with the SponsorBlock notification, should be refactored into a common notification
|
||||
function Init()
|
||||
m.translationAnimation = m.top.findNode("translationAnimation")
|
||||
m.translationAnimationInterpolator = m.top.findNode("translationAnimationInterpolator")
|
||||
m.animationTimer = m.top.findNode("animationTimer")
|
||||
|
||||
m.top.translation = [1280, 20]
|
||||
m.translationAnimation.observeField("state", FuncName(OnAnimationState))
|
||||
m.animationTimer.observeField("fire", FuncName(OnAnimationTimer))
|
||||
end function
|
||||
|
||||
function OnContentSet() as void
|
||||
content = m.top.content
|
||||
content = NodeByRef.Unwrap(content)
|
||||
if content = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
if not StringUtils.IsNullOrEmpty(content.thumbnail)
|
||||
m.top.thumbnail = content.thumbnail
|
||||
else
|
||||
m.top.thumbnail = "pkg:/images/thumbnail-missing.jpg"
|
||||
end if
|
||||
|
||||
m.top.line1 = content.title
|
||||
end function
|
||||
|
||||
function OnShow()
|
||||
AnimateIn()
|
||||
end function
|
||||
|
||||
function OnAnimationTimer()
|
||||
AnimateOut()
|
||||
end function
|
||||
|
||||
function AnimateIn()
|
||||
m.translationAnimation.unobserveField("state")
|
||||
m.animationTimer.control = "stop"
|
||||
m.animationTimer.control = "start"
|
||||
m.translationAnimation.observeField("state", FuncName(OnAnimationState))
|
||||
|
||||
Animate(false)
|
||||
end function
|
||||
|
||||
function AnimateOut()
|
||||
Animate(true)
|
||||
end function
|
||||
|
||||
function Animate(reverse as boolean) as void
|
||||
' We are already animating in the requested direction
|
||||
if m.translationAnimationInterpolator.reverse = reverse and m.translationAnimation.control <> "none"
|
||||
return
|
||||
end if
|
||||
|
||||
m.translationAnimationInterpolator.reverse = reverse
|
||||
m.translationAnimation.control = "start"
|
||||
end function
|
||||
|
||||
function OnAnimationState()
|
||||
if m.translationAnimation.state = "stopped" and m.translationAnimationInterpolator.reverse = true
|
||||
m.top.getParent().removeChild(m.top)
|
||||
end if
|
||||
end function
|
||||
@@ -0,0 +1,64 @@
|
||||
<component name="PlayQueueNotification" extends="Group">
|
||||
<interface>
|
||||
<field id="content" type="node" onChange="OnContentSet" />
|
||||
<field id="thumbnail" type="uri" alias="thumbnailPoster.uri" />
|
||||
<field id="line1" type="string" alias="line1Label.text" />
|
||||
<field id="show" type="boolean" alwaysNotify="true" onChange="OnShow" />
|
||||
</interface>
|
||||
<children>
|
||||
<Poster
|
||||
width="500"
|
||||
height="144"
|
||||
opacity="0.9"
|
||||
uri="pkg:/images/white.9.png">
|
||||
|
||||
<Poster
|
||||
id="thumbnailPoster"
|
||||
loadDisplayMode="scaleToZoom"
|
||||
width="170"
|
||||
height="106"
|
||||
failedBitmapUri="pkg:/images/thumbnail-missing.jpg"
|
||||
translation="[10,10]">
|
||||
</Poster>
|
||||
|
||||
<LayoutGroup
|
||||
itemSpacings="[10]"
|
||||
translation="[190,10]">
|
||||
<Label
|
||||
width="300"
|
||||
font="font:SmallestBoldSystemFont"
|
||||
horizAlign="center"
|
||||
color="0x262626ff"
|
||||
text="Added to queue">
|
||||
<Font role="font" uri="font:BoldSystemFontFile" size="22" />
|
||||
</Label>
|
||||
<Label
|
||||
id="line1Label"
|
||||
width="300"
|
||||
font="font:SmallestSystemFont"
|
||||
maxLines="3"
|
||||
color="0x262626ff"
|
||||
wrap="true" />
|
||||
</LayoutGroup>
|
||||
<Label
|
||||
width="480"
|
||||
font="font:SmallestSystemFont"
|
||||
color="0x262626ff"
|
||||
text="Press and hold Options (*) to open the queue"
|
||||
translation="[10,120]" />
|
||||
</Poster>
|
||||
<Animation
|
||||
id="translationAnimation"
|
||||
duration="0.3"
|
||||
optional="true">
|
||||
<Vector2DFieldInterpolator
|
||||
id="translationAnimationInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
keyValue="[ [1280.0, 20.0], [1020.0, 20.0], [760.0, 20.0] ]"
|
||||
fieldToInterp="PlayQueueNotification.translation" />
|
||||
</Animation>
|
||||
<Timer
|
||||
id="animationTimer"
|
||||
duration="3" />
|
||||
</children>
|
||||
</component>
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace PlayQueue
|
||||
const NOTIFICATION_NODE_ID = "PlayQueueNotification"
|
||||
|
||||
function ShowNotifcation(notifications as object, contentNode as object) as void
|
||||
notification = notifications.findNode(NOTIFICATION_NODE_ID)
|
||||
if notification = invalid
|
||||
notification = notifications.createChild("PlayQueueNotification")
|
||||
notification.id = NOTIFICATION_NODE_ID
|
||||
end if
|
||||
notification.content = contentNode
|
||||
notification.show = true
|
||||
end function
|
||||
|
||||
function RemoveNotifcation(notifications as object) as void
|
||||
notification = notifications.findNode(NOTIFICATION_NODE_ID)
|
||||
if notification <> invalid
|
||||
notifications.RemoveChild(notification)
|
||||
end if
|
||||
end function
|
||||
|
||||
function SetVisible(notifications as object, visible as boolean)
|
||||
notification = notifications.findNode(NOTIFICATION_NODE_ID)
|
||||
if notification <> invalid
|
||||
notification.visible = visible
|
||||
end if
|
||||
end function
|
||||
|
||||
end namespace
|
||||
@@ -1,5 +1,7 @@
|
||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/components/NodeByRef/NodeByRef.bs"
|
||||
import "pkg:/components/PlaylistView/PlaylistContentTask.bs"
|
||||
import "pkg:/components/PlayQueue/Notifications/PlayQueueNotificationUtils.bs"
|
||||
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
@@ -8,49 +10,74 @@ import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
' TODO:P1 prevent adding duplicates of the same video/playlist
|
||||
function Init()
|
||||
m.pendingLoadTasks = {}
|
||||
' TODO:P1 prevent adding duplicates of the same video/playlist
|
||||
m.queue = CreateObject("roArray", 0, true)
|
||||
m.content = m.top.findNode("Content")
|
||||
m.top.content = m.content
|
||||
m.content.addField("index", "integer", false)
|
||||
m.content.index = m.top.index
|
||||
end function
|
||||
|
||||
function Play(node as object, playlistIndex as integer)
|
||||
m.top.index += 1
|
||||
m.top.playlistIndex = playlistIndex
|
||||
|
||||
if m.top.index >= m.queue.Count()
|
||||
m.queue.push(node)
|
||||
m.top.index = m.queue.Count() - 1
|
||||
node = WrapWithIndexField(node)
|
||||
if m.top.index >= m.content.getChildCount()
|
||||
m.content.appendChild(node)
|
||||
m.top.index = m.content.getChildCount() - 1
|
||||
else
|
||||
ArrayUtils.Insert(m.queue, node, m.top.index)
|
||||
m.content.insertChild(node, m.top.index)
|
||||
end if
|
||||
|
||||
PlayItemAtCurrentIndex()
|
||||
end function
|
||||
|
||||
function AddToQueue(node as object)
|
||||
m.queue.push(node)
|
||||
node = WrapWithIndexField(node)
|
||||
m.content.appendChild(node)
|
||||
queueNotifications = m.top.preferences["misc.queue_notifications"]
|
||||
if queueNotifications
|
||||
PlayQueue.ShowNotifcation(m.top.notifications, node)
|
||||
end if
|
||||
end function
|
||||
|
||||
' TODO:P1 better model of the queue (Now playing, etc)
|
||||
function WrapWithIndexField(node as object) as object
|
||||
node = NodeByRef.Wrap(node)
|
||||
if not node.hasField("index")
|
||||
node.addField("index", "integer", false)
|
||||
end if
|
||||
node.index = m.top.index
|
||||
return node
|
||||
end function
|
||||
|
||||
' TODO:P0 better model of the queue (Now playing, etc)
|
||||
function GetQueue(unused as dynamic) as object
|
||||
queueNodes = m.content.getChildren(-1, 0)
|
||||
items = []
|
||||
for each item in m.queue
|
||||
if item.type = "video"
|
||||
for each node in queueNodes
|
||||
node = NodeByRef.Unwrap(node)
|
||||
if node = invalid
|
||||
continue for
|
||||
end if
|
||||
|
||||
nodeType = node.type
|
||||
if nodeType = "video"
|
||||
items.push({
|
||||
type: item.type,
|
||||
videoId: item.videoId,
|
||||
title: item.title,
|
||||
author: item.author,
|
||||
thumbnail: item.thumbnail
|
||||
type: nodeType,
|
||||
videoId: node.videoId,
|
||||
title: node.title,
|
||||
author: node.author,
|
||||
thumbnail: node.thumbnail
|
||||
})
|
||||
else if item.type = "playlist"
|
||||
else if node.type = "playlist"
|
||||
items.push({
|
||||
type: item.type,
|
||||
playlistId: item.playlistId,
|
||||
title: item.title,
|
||||
thumbnail: item.thumbnail,
|
||||
videoCountText: item.videoCountText
|
||||
type: nodeType,
|
||||
playlistId: node.playlistId,
|
||||
title: node.title,
|
||||
thumbnail: node.thumbnail,
|
||||
videoCountText: node.videoCountText
|
||||
})
|
||||
end if
|
||||
end for
|
||||
@@ -63,21 +90,24 @@ function GetQueue(unused as dynamic) as object
|
||||
end function
|
||||
|
||||
function Clear(unused as dynamic)
|
||||
m.queue.Clear()
|
||||
m.content.removeChildrenIndex(m.content.getChildCount(), 0)
|
||||
m.top.index = -1
|
||||
m.top.playlistIndex = -1
|
||||
end function
|
||||
|
||||
function PlayNextItem(unused as dynamic) as boolean
|
||||
if m.queue.Count() = 0
|
||||
childCount = m.content.getChildCount()
|
||||
if childCount = 0
|
||||
return false
|
||||
end if
|
||||
|
||||
if m.top.index <> -1
|
||||
if m.top.index >= m.queue.Count()
|
||||
index = m.top.index
|
||||
if index <> -1
|
||||
if index >= childCount
|
||||
return false
|
||||
end if
|
||||
node = m.queue[m.top.index]
|
||||
node = m.content.getChild(index)
|
||||
node = NodeByRef.Unwrap(node)
|
||||
if node.type = "playlist"
|
||||
m.top.playlistIndex += 1
|
||||
if PlayPlaylistAtCurrentIndex(node)
|
||||
@@ -88,15 +118,22 @@ function PlayNextItem(unused as dynamic) as boolean
|
||||
|
||||
m.top.index += 1
|
||||
m.top.playlistIndex = -1
|
||||
if m.top.index >= m.queue.Count()
|
||||
if m.top.index >= childCount
|
||||
return false
|
||||
end if
|
||||
|
||||
return PlayItemAtCurrentIndex()
|
||||
end function
|
||||
|
||||
function PlayItemAtIndex(index as integer) as boolean
|
||||
m.top.index = index
|
||||
m.top.playlistIndex = -1
|
||||
return PlayItemAtCurrentIndex()
|
||||
end function
|
||||
|
||||
function PlayItemAtCurrentIndex() as boolean
|
||||
node = m.queue[m.top.index]
|
||||
node = m.content.getChild(m.top.index)
|
||||
node = NodeByRef.Unwrap(node)
|
||||
if node = invalid
|
||||
return false
|
||||
end if
|
||||
@@ -113,17 +150,18 @@ function PlayItemAtCurrentIndex() as boolean
|
||||
end function
|
||||
|
||||
function PlayPlaylistAtCurrentIndex(playlist as object) as boolean
|
||||
playlist = NodeByRef.Unwrap(playlist)
|
||||
if playlist.videoCount < 0
|
||||
LoadPlaylist(playlist)
|
||||
return true
|
||||
end if
|
||||
index = m.top.playlistIndex
|
||||
if index < 0 or index >= playlist.videoCount
|
||||
playlistIndex = m.top.playlistIndex
|
||||
if playlistIndex < 0 or playlistIndex >= playlist.videoCount
|
||||
return false
|
||||
end if
|
||||
|
||||
if index < playlist.getChildCount()
|
||||
child = playlist.getChild(index)
|
||||
if playlistIndex < playlist.getChildCount()
|
||||
child = playlist.getChild(playlistIndex)
|
||||
VideoUtils.PlayVideo(child)
|
||||
return true
|
||||
end if
|
||||
@@ -172,3 +210,12 @@ function OnPlaylistContentTaskResult(output as object) as void
|
||||
|
||||
PlayPlaylistAtCurrentIndex(playlist)
|
||||
end function
|
||||
|
||||
function OnIndexChange()
|
||||
index = m.top.index
|
||||
m.content.index = index
|
||||
children = m.top.content.getChildren(-1, 0)
|
||||
for each child in children
|
||||
child.index = index
|
||||
end for
|
||||
end function
|
||||
@@ -1,13 +1,19 @@
|
||||
<component name="PlayQueue" extends="Node">
|
||||
<interface>
|
||||
<field id="queue" type="array" />
|
||||
<field id="index" type="integer" value="-1" />
|
||||
<field id="content" type="node" />
|
||||
<field id="index" type="integer" value="-1" onChange="OnIndexChange" />
|
||||
<field id="playlistIndex" type="integer" value="-1" />
|
||||
<field id="invidious" type="node" />
|
||||
<field id="notifications" type="node" />
|
||||
<field id="preferences" type="node" />
|
||||
<function name="Play" />
|
||||
<function name="AddToQueue" />
|
||||
<function name="GetQueue" />
|
||||
<function name="Clear" />
|
||||
<function name="PlayNextItem" />
|
||||
<function name="PlayItemAtIndex" />
|
||||
</interface>
|
||||
<children>
|
||||
<ContentNode id="Content" />
|
||||
</children>
|
||||
</component>
|
||||
@@ -0,0 +1,83 @@
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
m.queueList = m.top.findNode("queueList")
|
||||
m.queueLabel = m.top.findNode("queueLabel")
|
||||
m.clearButton = m.top.findNode("clearButton")
|
||||
m.showAnimation = m.top.findNode("showAnimation")
|
||||
|
||||
m.clearButton.ObserveField("buttonSelected", FuncName(OnClearButtonSelected))
|
||||
m.queueList.ObserveField("itemSelected", FuncName(OnItemSelected))
|
||||
|
||||
SetNavigation(m.queueList, "up", m.clearButton)
|
||||
SetNavigation(m.clearButton, "down", m.queueList)
|
||||
end function
|
||||
|
||||
function Show(unsued as dynamic)
|
||||
m.showAnimation.control = "start"
|
||||
end function
|
||||
|
||||
function OnFocusChange() as void
|
||||
if not m.top.focus
|
||||
return
|
||||
end if
|
||||
NodeSetFocus(m.queueList, true)
|
||||
end function
|
||||
|
||||
function OnContentSet() as void
|
||||
content = m.top.content
|
||||
if content = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
if not content.isSameNode(m.queueList.content)
|
||||
m.queueList.content = content
|
||||
end if
|
||||
|
||||
index = content.index
|
||||
if IsInt(index) and index <> -1
|
||||
m.queueLabel.text = `Queue (${index + 1}/${content.getChildCount()})`
|
||||
else
|
||||
m.queueLabel.text = `Queue (${content.getChildCount()})`
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
if press = false
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
return false
|
||||
end function
|
||||
|
||||
function Close()
|
||||
m.top.appController@.PopScreen(invalid)
|
||||
end function
|
||||
|
||||
function OnClearButtonSelected()
|
||||
m.top.playQueue@.Clear(invalid)
|
||||
end function
|
||||
|
||||
function OnItemSelected() as void
|
||||
content = m.queueList.content
|
||||
if content = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
index = m.queueList.itemSelected
|
||||
if index < 0 or index >= content.getChildCount()
|
||||
return
|
||||
end if
|
||||
|
||||
m.top.playQueue@.PlayItemAtIndex(index)
|
||||
end function
|
||||
@@ -0,0 +1,64 @@
|
||||
<component name="PlayQueueView" extends="Group" includes="Focus">
|
||||
<interface>
|
||||
<field id="content" type="node" onChange="OnContentSet" />
|
||||
<field id="jumpToItem" type="integer" alias="queueList.jumpToItem" />
|
||||
<field id="playQueue" type="node" />
|
||||
<field id="appController" type="node" />
|
||||
<function name="Show" />
|
||||
</interface>
|
||||
|
||||
<children>
|
||||
<Rectangle
|
||||
id="background"
|
||||
width="1280"
|
||||
height="720"
|
||||
color="#000000"
|
||||
opacity="0" />
|
||||
<Rectangle
|
||||
id="container"
|
||||
width="470"
|
||||
height="720"
|
||||
translation="[-470,0]"
|
||||
color="0x242424">
|
||||
<Label
|
||||
id="queueLabel"
|
||||
width="270"
|
||||
height="52"
|
||||
text="Queue"
|
||||
vertAlign="center"
|
||||
font="font:MediumBoldSystemFont"
|
||||
translation="[20,20]" />
|
||||
<Button
|
||||
id="clearButton"
|
||||
minWidth="150"
|
||||
height="52"
|
||||
text="Clear"
|
||||
showFocusFootprint="true"
|
||||
translation="[295,15]" />
|
||||
<MarkupGrid
|
||||
id="queueList"
|
||||
itemComponentName="PlayQueueViewCell"
|
||||
itemSize="[432,90]"
|
||||
itemSpacing="[0,15]"
|
||||
numColumns="1"
|
||||
numRows="6"
|
||||
vertFocusAnimationStyle="floatingFocus"
|
||||
translation="[20,90]" />
|
||||
</Rectangle>
|
||||
|
||||
<Animation id="showAnimation"
|
||||
duration="0.3"
|
||||
optional="true">
|
||||
<FloatFieldInterpolator
|
||||
id="fadeInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
keyValue="[0.0, 0.4, 0.8]"
|
||||
fieldToInterp="background.opacity" />
|
||||
<Vector2DFieldInterpolator
|
||||
id="translationInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
keyValue="[[-470,0], [-235,0], [0,0]]"
|
||||
fieldToInterp="container.translation" />
|
||||
</Animation>
|
||||
</children>
|
||||
</component>
|
||||
@@ -0,0 +1,75 @@
|
||||
import "pkg:/components/NodeByRef/NodeByRef.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/TimeUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
m.durationRect = m.top.FindNode("durationRect")
|
||||
m.durationLabel = m.top.FindNode("durationLabel")
|
||||
end function
|
||||
|
||||
function OnContentSet() as void
|
||||
content = m.top.itemContent
|
||||
content = NodeByRef.Unwrap(content)
|
||||
if content = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
m.top.title = content.title
|
||||
m.top.thumbnailUri = content.thumbnail
|
||||
|
||||
contentType = ValidString(content.type)
|
||||
if contentType = "video" and ValidInt(content.lengthSeconds) <> 0
|
||||
SetDurationText(content.lengthText)
|
||||
m.top.durationRectVisible = true
|
||||
else if contentType = "playlist" and not StringUtils.IsNullOrEmpty(content.videoCountText)
|
||||
SetDurationText(content.videoCountText)
|
||||
m.top.durationRectVisible = true
|
||||
else
|
||||
m.top.durationRectVisible = false
|
||||
end if
|
||||
|
||||
SetHighlight()
|
||||
end function
|
||||
|
||||
function SetDurationText(text as string) as void
|
||||
m.top.duration = text
|
||||
|
||||
label = m.durationLabel
|
||||
rect = m.durationRect
|
||||
|
||||
if label = invalid or rect = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
rectParent = rect.getParent()
|
||||
size = label.localBoundingRect()
|
||||
|
||||
rect.width = size.width + 16
|
||||
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||
end function
|
||||
|
||||
function SetHighlight() as void
|
||||
content = m.top.itemContent
|
||||
|
||||
playQueueContent = content.getParent()
|
||||
if playQueueContent = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
playQueue = playQueueContent.getParent()
|
||||
if playQueue = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
playQueueIndex = playQueue.index
|
||||
index = m.top.index
|
||||
|
||||
if playQueueIndex = index
|
||||
m.top.thumbnailBlendColor = "#FFFFFFFF"
|
||||
m.top.highlightUri = "pkg:/images/focus_grid.9.png"
|
||||
else
|
||||
m.top.thumbnailBlendColor = "#606060FF"
|
||||
m.top.highlightUri = ""
|
||||
end if
|
||||
end function
|
||||
@@ -0,0 +1,50 @@
|
||||
<component name="PlayQueueViewCell" extends="Group">
|
||||
<interface>
|
||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||
<field id="index" type="integer" />
|
||||
<field id="title" type="string" alias="titleLabel.text" />
|
||||
<field id="thumbnailUri" type="uri" alias="thumbnailPoster.uri" />
|
||||
<field id="thumbnailBlendColor" type="color" alias="thumbnailPoster.blendColor" />
|
||||
<field id="highlightUri" type="uri" alias="highlightPoster.uri" />
|
||||
<field id="duration" type="string" alias="durationLabel.text" />
|
||||
<field id="durationRectVisible" type="boolean" alias="durationRect.visible" />
|
||||
</interface>
|
||||
<children>
|
||||
<Poster
|
||||
id="thumbnailPoster"
|
||||
loadDisplayMode="scaleToZoom"
|
||||
width="160"
|
||||
height="90"
|
||||
failedBitmapUri="pkg:/images/thumbnail-missing.jpg"
|
||||
translation="[2,2]">
|
||||
<Rectangle
|
||||
id="durationRect"
|
||||
width="60"
|
||||
height="26"
|
||||
color="0x000000"
|
||||
opacity="0.8"
|
||||
translation="[100, 58]">
|
||||
<Label
|
||||
height="26"
|
||||
id="durationLabel"
|
||||
horizAlign="center"
|
||||
vertAlign="center"
|
||||
font="font:SmallestSystemFont"
|
||||
translation="[8, 0]" />
|
||||
</Rectangle>
|
||||
</Poster>
|
||||
<Poster
|
||||
id="highlightPoster"
|
||||
blendColor="0xFF0000"
|
||||
width="164"
|
||||
height="94" />
|
||||
|
||||
<Label
|
||||
id="titleLabel"
|
||||
width="260"
|
||||
font="font:SmallestBoldSystemFont"
|
||||
maxLines="3"
|
||||
wrap="true"
|
||||
translation="[172,2]" />
|
||||
</children>
|
||||
</component>
|
||||
@@ -0,0 +1,23 @@
|
||||
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||
|
||||
namespace PlayQueueViewUtils
|
||||
|
||||
function Open(playQueue as object, appController as object) as object
|
||||
playQueueView = CreateObject("roSGNode", "PlayQueueView")
|
||||
playQueueView.appController = appController
|
||||
playQueueView.playQueue = playQueue
|
||||
appController@.PushScreen(playQueueView)
|
||||
|
||||
content = playQueue.content
|
||||
index = playQueue.index
|
||||
|
||||
playQueueView.content = content
|
||||
if index > -1 and index < content.GetChildCount()
|
||||
playQueueView.jumpToItem = index
|
||||
end if
|
||||
|
||||
playQueueView@.Show(invalid)
|
||||
return playQueueView
|
||||
end function
|
||||
|
||||
end namespace
|
||||
@@ -24,7 +24,7 @@ end function
|
||||
|
||||
function OnNodeReady()
|
||||
m.list.ObserveField("itemFocused", FuncName(OnItemFocused))
|
||||
InitializeLongPressTimer()
|
||||
InitializeLongPress(["OK"])
|
||||
end function
|
||||
|
||||
function OnFocusChange() as void
|
||||
@@ -53,7 +53,9 @@ function OnContentSet() as void
|
||||
m.background.uri = content.thumbnailBackground
|
||||
|
||||
itemFocused = m.list.itemFocused
|
||||
m.list.content = content
|
||||
if not content.isSameNode(m.list.content)
|
||||
m.list.content = content
|
||||
end if
|
||||
if itemFocused > -1 and content.getChildCount() > itemFocused
|
||||
m.list.jumpToItem = itemFocused
|
||||
end if
|
||||
@@ -65,7 +67,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = LONG_PRESS_KEY and press
|
||||
if key = OK_LONG_PRESS_KEY and press
|
||||
OnItemLongPressed(m.list.itemFocused)
|
||||
return true
|
||||
end if
|
||||
@@ -89,6 +91,7 @@ end function
|
||||
function Close()
|
||||
if m.playlistLoadTask <> invalid
|
||||
m.playlistLoadTask.cancel = true
|
||||
m.playlistLoadTask = invalid
|
||||
end if
|
||||
|
||||
m.appController@.PopScreen(invalid)
|
||||
@@ -137,6 +140,9 @@ function OnItemLongPressed(index as integer) as void
|
||||
|
||||
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]
|
||||
ContextMenuUtils.Open(contextMenuProviders, m.appController, video)
|
||||
end function
|
||||
|
||||
@@ -39,5 +39,5 @@ function SetDurationText(text as string) as void
|
||||
size = label.localBoundingRect()
|
||||
|
||||
rect.width = size.width + 16
|
||||
rect.translation = [rectParent.width - rect.width, 72]
|
||||
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||
end function
|
||||
@@ -1,16 +1,32 @@
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
|
||||
function Init()
|
||||
m.displayNames = {
|
||||
"version": "Playlet Version",
|
||||
"lib_version": "Playlet Library Version",
|
||||
"lib_version_latest": "Playlet Library Latest Version",
|
||||
"lib_url": "Playlet Library URL",
|
||||
"lib_url_type": "Playlet Library URL Type",
|
||||
"git_commit_hash": "Playlet Git Commit Hash",
|
||||
"lib_git_commit_hash": "Playlet Library Git Commit Hash",
|
||||
"id": "App ID"
|
||||
}
|
||||
' TODO:P2 Add tooltip to each field with description of what it means
|
||||
m.displayNames = [{
|
||||
key: "app_version",
|
||||
displayText: "Playlet App Version"
|
||||
}, {
|
||||
key: "lib_version",
|
||||
displayText: "Playlet Library Version"
|
||||
}, {
|
||||
key: "lib_version_latest",
|
||||
displayText: "Playlet Library Latest Version"
|
||||
}, {
|
||||
key: "lib_url",
|
||||
displayText: "Playlet Library URL"
|
||||
}, {
|
||||
key: "lib_url_type",
|
||||
displayText: "Playlet Library URL Type"
|
||||
}, {
|
||||
key: "app_git_commit_hash",
|
||||
displayText: "Playlet App Git Commit Hash"
|
||||
}, {
|
||||
key: "lib_git_commit_hash",
|
||||
displayText: "Playlet Library Git Commit Hash"
|
||||
}, {
|
||||
key: "id",
|
||||
displayText: "App ID"
|
||||
}]
|
||||
|
||||
m.keyValueList = m.top.findNode("KeyValueListContent")
|
||||
end function
|
||||
@@ -35,8 +51,8 @@ function UpdateKeyValueList()
|
||||
m.keyValueList.removeChildIndex(0)
|
||||
end while
|
||||
|
||||
for each item in m.appInfo
|
||||
value = `${m.displayNames[item]}: ${m.appInfo[item]}`
|
||||
for each item in m.displayNames
|
||||
value = `${item.displayText}: ${m.appInfo[item.key]}`
|
||||
contentNode = m.keyValueList.createChild("ContentNode")
|
||||
contentNode.title = value
|
||||
end for
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/components/Screens/SearchScreen/SearchSuggestionsTask.bs"
|
||||
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
import "pkg:/source/services/SearchHistory.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/LoadingScreen.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/UrlUtils.bs"
|
||||
|
||||
function Init()
|
||||
m.top.focusable = true
|
||||
@@ -99,7 +100,8 @@ function OnTextChange() as void
|
||||
|
||||
m.searchSuggestionsTask = StartAsyncTask(SearchSuggestionsTask, {
|
||||
q: m.keyboard.text,
|
||||
invidious: m.invidious
|
||||
invidious: m.invidious,
|
||||
preferences: m.preferences
|
||||
}, OnSearchSuggestionsTaskResults)
|
||||
end function
|
||||
|
||||
@@ -155,7 +157,7 @@ end function
|
||||
function OnSearchButtonSelected()
|
||||
selected = m.suggestions.buttonSelected
|
||||
text = m.suggestions.buttons[selected]
|
||||
SearchHistory.Save(text)
|
||||
SearchHistoryUtils.Save(m.preferences, text)
|
||||
Search(text)
|
||||
end function
|
||||
|
||||
@@ -219,11 +221,9 @@ function Search(text as string)
|
||||
if IsString(value) and value.len() > 0
|
||||
feedSource.queryParams[filter] = value
|
||||
else if IsArray(value) and value.Count() > 0
|
||||
' TODO:P1 this is http client implementation details leaking
|
||||
' We need a declarative way to set array types
|
||||
feedSource.queryParams[filter] = {
|
||||
value: value,
|
||||
__arrayType: HttpClient.QueryParamArrayType.CommaSeparated
|
||||
arrayType: UrlUtils.QueryParamArrayType.CommaSeparated
|
||||
}
|
||||
end if
|
||||
end for
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<field id="navBar" type="node" bind="/NavBar" />
|
||||
<field id="invidious" type="node" bind="/Invidious" />
|
||||
<field id="appController" type="node" bind="/AppController" />
|
||||
<field id="preferences" type="node" bind="/Preferences" />
|
||||
<field id="filters" type="assocarray" />
|
||||
</interface>
|
||||
<children>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||
import "pkg:/source/services/SearchHistory.bs"
|
||||
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||
|
||||
@asynctask
|
||||
function SearchSuggestionsTask(input as object) as object
|
||||
q = input.q
|
||||
invidiousNode = input.invidious
|
||||
preferencesNode = input.preferences
|
||||
|
||||
service = new Invidious.InvidiousService(invidiousNode)
|
||||
|
||||
@@ -18,7 +19,7 @@ function SearchSuggestionsTask(input as object) as object
|
||||
return invalid
|
||||
end if
|
||||
|
||||
history = SearchHistory.GetSaved(q)
|
||||
history = SearchHistoryUtils.GetSaved(preferencesNode, q)
|
||||
|
||||
if searchSuggestsions <> invalid
|
||||
history = MergeSearchSuggestions(history, searchSuggestsions.suggestions)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/source/services/SearchHistory.bs"
|
||||
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
|
||||
function Init()
|
||||
@@ -21,6 +21,6 @@ function BindPreference(preferences as object, key as string)
|
||||
end function
|
||||
|
||||
function OnButtonSelected()
|
||||
SearchHistory.Clear()
|
||||
SearchHistoryUtils.Clear()
|
||||
DialogUtils.ShowDialog("Search history cleared.", "Success")
|
||||
end function
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||
import "pkg:/source/services/HttpClient.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
@@ -29,6 +30,7 @@ function PrepareTests() as object
|
||||
content.AppendChild(CreateTestNode("Fetch video details", CanFetchVideoDetails))
|
||||
content.AppendChild(CreateTestNode("Fetch video comments", CanFetchVideoComments))
|
||||
content.AppendChild(CreateTestNode("Fetch video captions", CanFetchVideoCaptions))
|
||||
content.AppendChild(CreateTestNode("Fetch video thumbnails", CanFetchVideoThumbails))
|
||||
return content
|
||||
end function
|
||||
|
||||
@@ -105,14 +107,21 @@ function IsReachable(instance as string, testNode as object) as void
|
||||
return
|
||||
end if
|
||||
|
||||
name = json.software?.name
|
||||
if not IsString(name)
|
||||
software = json.software
|
||||
if software = invalid
|
||||
testNode.state = "failed"
|
||||
testNode.details = `Invalid json from ${url} (couldn't read software.name)`
|
||||
testNode.details = `Invalid json from ${url} (couldn't read $.software)`
|
||||
return
|
||||
end if
|
||||
|
||||
version = json.software?.version
|
||||
name = software.name
|
||||
if not IsString(name)
|
||||
testNode.state = "failed"
|
||||
testNode.details = `Invalid json from ${url} (couldn't read $.software.name)`
|
||||
return
|
||||
end if
|
||||
|
||||
version = software.version
|
||||
if not IsString(version)
|
||||
testNode.state = "failed"
|
||||
testNode.details = `Invalid json from ${url} (couldn't read software.version)`
|
||||
@@ -244,3 +253,61 @@ function CanFetchVideoCaptions(instance as string, testNode as object) as void
|
||||
testNode.details = ErrorUtils.Format(e)
|
||||
end try
|
||||
end function
|
||||
|
||||
function CanFetchVideoThumbails(instance as string, testNode as object) as void
|
||||
try
|
||||
videoId = "jNQXAC9IVRw"
|
||||
url = `${instance}${Invidious.VIDEOS_ENDPOINT}/${videoId}`
|
||||
response = HttpClient.Get(url).NoCache().Await()
|
||||
|
||||
if not response.IsSuccess()
|
||||
testNode.state = "failed"
|
||||
testNode.details = response.ErrorMessage()
|
||||
return
|
||||
end if
|
||||
|
||||
json = response.Json()
|
||||
if json = invalid
|
||||
testNode.state = "failed"
|
||||
testNode.details = `Invalid json from ${url}`
|
||||
return
|
||||
end if
|
||||
|
||||
videoThumbnails = json.videoThumbnails
|
||||
if not IsArray(videoThumbnails) or videoThumbnails.Count() = 0
|
||||
testNode.state = "failed"
|
||||
testNode.details = `No thumbnails found in json from ${url}`
|
||||
return
|
||||
end if
|
||||
|
||||
contentNode = InvidiousContent.ToVideoContentNode(invalid, json, instance)
|
||||
thumbnail = contentNode.thumbnail
|
||||
if StringUtils.IsNullOrEmpty(thumbnail)
|
||||
testNode.state = "failed"
|
||||
testNode.details = `No thumbnail found in json from ${url}`
|
||||
return
|
||||
end if
|
||||
|
||||
' Note: we could do a HEAD request, but Invidious returns 200 even for invalid thumbnails
|
||||
' To make sure we don't get a 200 for an invalid thumbnail, we do a GET request instead
|
||||
response = HttpClient.Get(thumbnail).NoCache().Await()
|
||||
if not response.IsSuccess()
|
||||
testNode.state = "failed"
|
||||
testNode.details = `${thumbnail} is not reachable\n${response.ErrorMessage(false)}`
|
||||
return
|
||||
end if
|
||||
|
||||
contentType = response.Headers()["Content-Type"]
|
||||
if StringUtils.IsNullOrEmpty(contentType) or not contentType.StartsWith("image/")
|
||||
testNode.state = "failed"
|
||||
testNode.details = `Invalid thumbnail data ${thumbnail} (Content-Type is not image/*)`
|
||||
return
|
||||
end if
|
||||
|
||||
testNode.state = "passed"
|
||||
testNode.details = `The instance can fetch video thumbnail for id "${videoId}" (${thumbnail})`
|
||||
catch e
|
||||
testNode.state = "failed"
|
||||
testNode.details = ErrorUtils.Format(e)
|
||||
end try
|
||||
end function
|
||||
@@ -1,6 +1,7 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpUtils.bs"
|
||||
import "pkg:/source/services/XmlObject.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/UrlUtils.bs"
|
||||
|
||||
class DashManifest
|
||||
|
||||
@@ -349,7 +350,7 @@ class DashManifest
|
||||
|
||||
function ParseAudioLanguage(url as string) as object
|
||||
result = { lang: "", acont: "" }
|
||||
queryParams = m.utils.ParseUrlQueryComponents(url)
|
||||
queryParams = UrlUtils.ParseQueryComponents(url)
|
||||
if StringUtils.IsNullOrEmpty(queryParams["xtags"])
|
||||
return result
|
||||
end if
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import "InvidiousService.bs"
|
||||
import "InvidiousSubscriptionsTask.bs"
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
|
||||
function Init()
|
||||
m.top.apiDefinitions = ParseJson(ReadAsciiFile("libpkg:/config/invidious_video_api.yaml"))
|
||||
@@ -17,3 +19,18 @@ end function
|
||||
function SetAuthToken(token as string, instance as string, username as dynamic)
|
||||
m.service.SetAuthToken(token, instance, username)
|
||||
end function
|
||||
|
||||
function OnAuthTokenChange() as void
|
||||
m.top.refreshSubscribtions = true
|
||||
end function
|
||||
|
||||
function GetSubscriptions() as void
|
||||
if m.subscriptionsTask <> invalid
|
||||
m.subscriptionsTask.cancel = true
|
||||
end if
|
||||
if m.top.authToken = invalid
|
||||
m.top.subscriptions = invalid
|
||||
return
|
||||
end if
|
||||
m.subscriptionsTask = StartAsyncTask(InvidiousSubscriptionsTask, { invidious: m.top })
|
||||
end function
|
||||
@@ -4,8 +4,10 @@
|
||||
<field id="preferences" type="node" />
|
||||
<field id="webServer" type="node" />
|
||||
|
||||
<field id="authToken" type="assocarray" />
|
||||
<field id="authToken" type="assocarray" onChange="OnAuthTokenChange" />
|
||||
<field id="apiDefinitions" type="assocarray" />
|
||||
<field id="refreshSubscribtions" type="boolean" alwaysNotify="true" onChange="GetSubscriptions" />
|
||||
<field id="subscriptions" type="assocarray" />
|
||||
|
||||
<function name="GetCurrentInstance" />
|
||||
<function name="GetAuthorizeTokenLink" />
|
||||
|
||||
@@ -22,8 +22,10 @@ namespace Invidious
|
||||
|
||||
const SEARCH_SUGGEST_ENDPOINT = "/api/v1/search/suggestions"
|
||||
|
||||
const AUTH_SCOPES = "GET:feed,GET:playlists*,POST:tokens/register,POST:tokens/unregister,POST:history*"
|
||||
const AUTH_SCOPES = "GET:feed,GET:playlists*,POST:tokens/*,POST:history*,:subscriptions*"
|
||||
|
||||
const AUTH_PLAYLISTS = "/api/v1/auth/playlists"
|
||||
const AUTH_SUBSCRIPTIONS = "/api/v1/auth/subscriptions"
|
||||
const AUTH_TOKENS_UNREGISTER = "/api/v1/auth/tokens/unregister"
|
||||
const AUTH_TOKENS_REGISTER = "/api/v1/auth/tokens/register"
|
||||
|
||||
@@ -86,7 +88,7 @@ namespace Invidious
|
||||
url = `${authToken.instance}${Invidious.HISTORY_ENDPOINT}/${videoId}`
|
||||
request = HttpClient.Post(url, "")
|
||||
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
||||
request.SendAndForget()
|
||||
request.Await()
|
||||
end function
|
||||
|
||||
function SearchSuggestions(q as string, cancellation = invalid as object) as object
|
||||
@@ -96,11 +98,7 @@ namespace Invidious
|
||||
request = HttpClient.Get(url)
|
||||
request.QueryParams(m.DefaultQueryParams())
|
||||
request.QueryParam("q", q)
|
||||
' 5 hours cache. Videos should expire in 6 hours, but since we don't
|
||||
' have the exact expiration time, we'll use 5 hours. Invidious currently
|
||||
' Does a fresh fetch if the cache is older than 10 minutes.
|
||||
' https://github.com/iv-org/invidious/blob/069e91d2a609b1df94bdfbb693335969b2a281d8/src/invidious/videos.cr#L349
|
||||
request.CacheSeconds(60 * 60 * 5)
|
||||
request.CacheSeconds(60 * 60 * 24)
|
||||
|
||||
request.Cancellation(cancellation)
|
||||
|
||||
@@ -114,7 +112,11 @@ namespace Invidious
|
||||
|
||||
request = HttpClient.Get(url)
|
||||
request.QueryParams(m.DefaultQueryParams())
|
||||
request.CacheSeconds(60 * 60 * 6)' 6 hours
|
||||
' 5 hours cache. Videos should expire in 6 hours, but since we don't
|
||||
' have the exact expiration time, we'll use 5 hours. Invidious currently
|
||||
' Does a fresh fetch if the cache is older than 10 minutes.
|
||||
' https://github.com/iv-org/invidious/blob/069e91d2a609b1df94bdfbb693335969b2a281d8/src/invidious/videos.cr#L349
|
||||
request.CacheSeconds(60 * 60 * 5)
|
||||
request.Cancellation(cancellation)
|
||||
|
||||
return request.Await()
|
||||
@@ -147,6 +149,7 @@ namespace Invidious
|
||||
request.QueryParams(m.DefaultQueryParams())
|
||||
request.Cancellation(cancellation)
|
||||
request.CacheSeconds(60 * 60 * 24)' 24 hours
|
||||
request.TryCount(3)
|
||||
|
||||
return request.Await()
|
||||
end function
|
||||
@@ -229,12 +232,8 @@ namespace Invidious
|
||||
else
|
||||
request.QueryParam(queryParamKey, queryParam.default)
|
||||
end if
|
||||
else if IsArray(queryParam.default)
|
||||
if queryParam.arrayType = "repeat"
|
||||
request.QueryParamArray(queryParamKey, queryParam.default, HttpClient.QueryParamArrayType.Repeated)
|
||||
else if queryParam.arrayType = "comma-separated"
|
||||
request.QueryParamArray(queryParamKey, queryParam.default, HttpClient.QueryParamArrayType.CommaSeparated)
|
||||
end if
|
||||
else if IsArray(queryParam.default) and queryParam.arrayType <> invalid
|
||||
request.QueryParamArray(queryParamKey, queryParam.default, queryParam.arrayType)
|
||||
else
|
||||
request.QueryParam(queryParamKey, queryParam.default)
|
||||
end if
|
||||
@@ -248,6 +247,12 @@ namespace Invidious
|
||||
request.CacheSeconds(endpoint.cacheSeconds)
|
||||
end if
|
||||
|
||||
if feedSource.tryCount <> invalid
|
||||
request.TryCount(feedSource.tryCount)
|
||||
else if endpoint.tryCount <> invalid
|
||||
request.TryCount(endpoint.tryCount)
|
||||
end if
|
||||
|
||||
if feedSource.queryParams <> invalid
|
||||
request.QueryParams(feedSource.queryParams)
|
||||
end if
|
||||
@@ -370,16 +375,28 @@ namespace Invidious
|
||||
function AuthFeedHandler(m as object, feedSource as object, response as object) as object
|
||||
m.DeleteExpiredToken(response)
|
||||
|
||||
if response.StatusCode() = 200
|
||||
json = response.Json()
|
||||
videos = []
|
||||
videos.Append(json.notifications)
|
||||
videos.Append(json.videos)
|
||||
return {
|
||||
items: videos
|
||||
}
|
||||
if response.StatusCode() <> 200
|
||||
return invalid
|
||||
end if
|
||||
return invalid
|
||||
|
||||
json = response.Json()
|
||||
if json = invalid
|
||||
return invalid
|
||||
end if
|
||||
|
||||
videos = []
|
||||
|
||||
if IsArray(json.notifications)
|
||||
videos.Append(json.notifications)
|
||||
end if
|
||||
|
||||
if IsArray(json.videos)
|
||||
videos.Append(json.videos)
|
||||
end if
|
||||
|
||||
return {
|
||||
items: videos
|
||||
}
|
||||
end function
|
||||
|
||||
function DeleteExpiredToken(response as object)
|
||||
@@ -461,7 +478,7 @@ namespace Invidious
|
||||
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
||||
request.Header("Content-Type", "application/json")
|
||||
|
||||
request.SendAndForget()
|
||||
request.Await()
|
||||
end function
|
||||
|
||||
function GetAuthorizeTokenLink() as dynamic
|
||||
@@ -481,6 +498,47 @@ namespace Invidious
|
||||
return `${invidiousHost}/authorize_token?scopes=${scope}&callback_url=${callbackUrl}&expire=${expire}`
|
||||
end function
|
||||
|
||||
function GetSubscriptions(cancellation = invalid as object) as object
|
||||
authToken = m.node.authToken
|
||||
if authToken = invalid
|
||||
return invalid
|
||||
end if
|
||||
|
||||
url = `${authToken.instance}${Invidious.AUTH_SUBSCRIPTIONS}`
|
||||
request = HttpClient.Get(url)
|
||||
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
||||
request.Cancellation(cancellation)
|
||||
|
||||
return request.Await()
|
||||
end function
|
||||
|
||||
function Subscribe(channelId as string, cancellation = invalid as object) as object
|
||||
authToken = m.node.authToken
|
||||
if authToken = invalid
|
||||
return invalid
|
||||
end if
|
||||
|
||||
url = `${authToken.instance}${Invidious.AUTH_SUBSCRIPTIONS}/${channelId}`
|
||||
request = HttpClient.Post(url, "")
|
||||
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
||||
request.Cancellation(cancellation)
|
||||
|
||||
return request.Await()
|
||||
end function
|
||||
|
||||
function Unsubscribe(channelId as string, cancellation = invalid as object) as object
|
||||
authToken = m.node.authToken
|
||||
if authToken = invalid
|
||||
return invalid
|
||||
end if
|
||||
|
||||
url = `${authToken.instance}${Invidious.AUTH_SUBSCRIPTIONS}/${channelId}`
|
||||
request = HttpClient.Delete(url)
|
||||
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
||||
request.Cancellation(cancellation)
|
||||
|
||||
return request.Await()
|
||||
end function
|
||||
end class
|
||||
|
||||
end namespace
|
||||
@@ -0,0 +1,42 @@
|
||||
import "InvidiousService.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
|
||||
@asynctask
|
||||
function InvidiousSubscriptionsTask(input as object) as object
|
||||
invidiousNode = input.invidious
|
||||
|
||||
service = new Invidious.InvidiousService(invidiousNode)
|
||||
|
||||
response = service.GetSubscriptions(m.top.cancellation)
|
||||
|
||||
if m.top.cancel
|
||||
return invalid
|
||||
end if
|
||||
|
||||
subscriptions = response.Json()
|
||||
|
||||
if not response.IsSuccess() or subscriptions = invalid
|
||||
error = response.ErrorMessage()
|
||||
LogError("Error getting subscriptions:", error)
|
||||
|
||||
return {
|
||||
success: false,
|
||||
error: response.ErrorMessage()
|
||||
}
|
||||
end if
|
||||
|
||||
if m.top.cancel
|
||||
return invalid
|
||||
end if
|
||||
|
||||
subscriptionsDict = {}
|
||||
for each subscription in subscriptions
|
||||
subscriptionsDict[subscription.authorId] = true
|
||||
end for
|
||||
|
||||
invidiousNode.subscriptions = subscriptionsDict
|
||||
|
||||
return {
|
||||
success: true
|
||||
}
|
||||
end function
|
||||
@@ -35,15 +35,12 @@ namespace InvidiousContent
|
||||
|
||||
SetIfExists(node, "author", item, "author")
|
||||
SetIfExists(node, "authorId", item, "authorId")
|
||||
SetIfExists(node, "hlsUrl", item, "hlsUrl")
|
||||
SetIfExists(node, "lengthSeconds", item, "lengthSeconds")
|
||||
node.lengthText = TimeUtils.GetFormattedTime(item.lengthSeconds)
|
||||
node.liveNow = VideoIsLive(item)
|
||||
VideoSetPremiereTimestampText(node, item)
|
||||
SetIfExists(node, "publishedText", item, "publishedText")
|
||||
if not StringUtils.IsNullOrEmpty(instance)
|
||||
node.thumbnail = VideoGetThumbnail(item, instance) ?? "pkg:/images/thumbnail-missing.jpg"
|
||||
end if
|
||||
VideoSetThumbnail(node, item, instance)
|
||||
SetIfExists(node, "title", item, "title")
|
||||
SetIfExists(node, "timestamp", item, "timestamp")
|
||||
SetIfExists(node, "videoId", item, "videoId")
|
||||
@@ -128,10 +125,11 @@ namespace InvidiousContent
|
||||
end if
|
||||
end function
|
||||
|
||||
function VideoGetThumbnail(videoItem as object, instance as dynamic, quality = "medium" as string) as dynamic
|
||||
function VideoSetThumbnail(node as object, videoItem as object, instance as dynamic, quality = "medium" as string) as boolean
|
||||
videoThumbnails = videoItem.videoThumbnails
|
||||
if videoThumbnails = invalid or videoThumbnails.Count() = 0
|
||||
return invalid
|
||||
node.thumbnail = "pkg:/images/thumbnail-missing.jpg"
|
||||
return false
|
||||
end if
|
||||
url = invalid
|
||||
for each thumbnail in videoThumbnails
|
||||
@@ -143,10 +141,14 @@ namespace InvidiousContent
|
||||
if url = invalid
|
||||
url = videoThumbnails[0].url
|
||||
end if
|
||||
if url.startsWith("/") and not StringUtils.IsNullOrEmpty(instance)
|
||||
if url.startsWith("/")
|
||||
if StringUtils.IsNullOrEmpty(instance)
|
||||
return false
|
||||
end if
|
||||
url = instance + url
|
||||
end if
|
||||
return url
|
||||
node.thumbnail = url
|
||||
return true
|
||||
end function
|
||||
|
||||
function VideoIsLive(videoItem as object) as boolean
|
||||
@@ -208,7 +210,9 @@ namespace InvidiousContent
|
||||
end if
|
||||
thumbnail = thumbnailUrl
|
||||
else if playlistItem.videos <> invalid and playlistItem.videos.Count() > 0 and playlistItem.videos[0].index = 0
|
||||
thumbnail = VideoGetThumbnail(playlistItem.videos[0], instance, quality)
|
||||
if VideoSetThumbnail(node, playlistItem.videos[0], instance, quality)
|
||||
return
|
||||
end if
|
||||
else if node.getChildCount() > 0
|
||||
thumbnail = node.getChild(0).thumbnail
|
||||
end if
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
OnSearchHistoryPreference()
|
||||
m.preferences.observeFieldScoped("search_history.enabled", FuncName(OnSearchHistoryPreference))
|
||||
end function
|
||||
|
||||
function OnSearchHistoryPreference() as void
|
||||
seachHistoryEnabled = m.preferences["search_history.enabled"]
|
||||
if seachHistoryEnabled
|
||||
return
|
||||
end if
|
||||
SearchHistoryUtils.Clear()
|
||||
end function
|
||||
@@ -0,0 +1,5 @@
|
||||
<component name="SearchHistory" extends="Node" includes="AutoBind">
|
||||
<interface>
|
||||
<field id="preferences" type="node" />
|
||||
</interface>
|
||||
</component>
|
||||
@@ -2,9 +2,14 @@ import "pkg:/source/utils/ArrayUtils.bs"
|
||||
import "pkg:/source/utils/RegistryUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
namespace SearchHistory
|
||||
function Save(q as string, maxItems = 10 as integer)
|
||||
history = GetAllSaved()
|
||||
namespace SearchHistoryUtils
|
||||
function Save(preferencesNode as object, q as string, maxItems = 10 as integer) as void
|
||||
seachHistoryEnabled = preferencesNode["search_history.enabled"]
|
||||
if not seachHistoryEnabled
|
||||
return
|
||||
end if
|
||||
|
||||
history = GetAllSaved(preferencesNode)
|
||||
index = ArrayUtils.IndexOfString(history, q)
|
||||
if index <> -1
|
||||
history.Delete(index)
|
||||
@@ -21,8 +26,8 @@ namespace SearchHistory
|
||||
RegistryUtils.Write(RegistryUtils.SEARCH_HISTORY, history)
|
||||
end function
|
||||
|
||||
function GetSaved(q as string) as object
|
||||
history = GetAllSaved()
|
||||
function GetSaved(preferencesNode as object, q as string) as object
|
||||
history = GetAllSaved(preferencesNode)
|
||||
if history.count() = 0
|
||||
return []
|
||||
end if
|
||||
@@ -39,7 +44,12 @@ namespace SearchHistory
|
||||
return result
|
||||
end function
|
||||
|
||||
function GetAllSaved() as object
|
||||
function GetAllSaved(preferencesNode as object) as object
|
||||
seachHistoryEnabled = preferencesNode["search_history.enabled"]
|
||||
if not seachHistoryEnabled
|
||||
return []
|
||||
end if
|
||||
|
||||
history = RegistryUtils.Read(RegistryUtils.SEARCH_HISTORY)
|
||||
if history = invalid
|
||||
return []
|
||||
@@ -47,7 +57,6 @@ namespace SearchHistory
|
||||
return ParseJson(history)
|
||||
end function
|
||||
|
||||
|
||||
function Clear()
|
||||
RegistryUtils.Delete(RegistryUtils.SEARCH_HISTORY)
|
||||
end function
|
||||
@@ -84,7 +84,7 @@ namespace SponsorBlock
|
||||
end if
|
||||
|
||||
url = `${m.sponsorBlockConfig.serverAddress}${SponsorBlock.VIEWED_SEGMENT_ENDPOINT}?UUID=${segmentId}`
|
||||
HttpClient.Post(url, "").SendAndForget()
|
||||
HttpClient.Post(url, "").Await()
|
||||
end function
|
||||
|
||||
function GenerateProgressBarBackground(segments as object, lengthSeconds as integer, path as string)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
m.animation = m.top.findNode("loadingAnimation")
|
||||
' TODO:P2 make component disposable, and stop animation when component is disposed
|
||||
m.top.observeField("visible", FuncName(OnVisibleChanged))
|
||||
OnVisibleChanged()
|
||||
end function
|
||||
@@ -11,10 +11,10 @@ function OnVisibleChanged()
|
||||
end function
|
||||
|
||||
function OnIndexSet()
|
||||
m.animation.delay = (m.top.index mod 5) * 0.2
|
||||
m.top.animationDelay = (m.top.index mod 5) * 0.2
|
||||
Animate()
|
||||
end function
|
||||
|
||||
function Animate()
|
||||
m.animation.control = m.top.visible ? "start" : "stop"
|
||||
m.top.animationControl = m.top.visible ? "start" : "stop"
|
||||
end function
|
||||
@@ -3,6 +3,8 @@
|
||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||
<field id="index" type="integer" onChange="OnIndexSet" />
|
||||
<field id="type" type="string" value="loading" />
|
||||
<field id="animationDelay" type="time" alias="loadingAnimation.delay" />
|
||||
<field id="animationControl" type="string" alias="loadingAnimation.control" />
|
||||
</interface>
|
||||
<children>
|
||||
<Rectangle
|
||||
|
||||
@@ -37,5 +37,5 @@ function SetVideoCount(videoCountText as string)
|
||||
size = label.localBoundingRect()
|
||||
|
||||
rect.width = size.width + 16
|
||||
rect.translation = [rectParent.width - rect.width, 162]
|
||||
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||
end function
|
||||
@@ -1,40 +1,49 @@
|
||||
function Init()
|
||||
m.videoRowCell = m.top.findNode("VideoRowCell")
|
||||
m.playlistRowCell = m.top.findNode("PlaylistRowCell")
|
||||
m.channelRowCell = m.top.findNode("ChannelRowCell")
|
||||
m.loadingRowCell = m.top.findNode("LoadingRowCell")
|
||||
m.actionRowCell = m.top.findNode("ActionRowCell")
|
||||
m.cells = [m.videoRowCell, m.playlistRowCell, m.channelRowCell, m.loadingRowCell, m.actionRowCell]
|
||||
end function
|
||||
|
||||
' Note: we use aliases and not references to sub cells that we initialize on Init() because
|
||||
' of a rare bug / race condition where the cells are not initialized
|
||||
function OnContentSet() as void
|
||||
content = m.top.itemContent
|
||||
|
||||
visibleProperties = {
|
||||
"video": "videoRowCellVisible",
|
||||
"playlist": "playlistRowCellVisible",
|
||||
"channel": "channelRowCellVisible",
|
||||
"loading": "loadingRowCellVisible",
|
||||
"action": "actionRowCellVisible"
|
||||
}
|
||||
|
||||
contentProperties = {
|
||||
"video": "videoRowCellItemContent",
|
||||
"playlist": "playlistRowCellItemContent",
|
||||
"channel": "channelRowCellItemContent",
|
||||
"loading": "loadingRowCellItemContent",
|
||||
"action": "actionRowCellItemContent"
|
||||
}
|
||||
|
||||
if content = invalid
|
||||
for each cell in m.cells
|
||||
cell.visible = false
|
||||
for each key in visibleProperties
|
||||
m.top[visibleProperties[key]] = false
|
||||
end for
|
||||
m.loadingRowCell.visible = true
|
||||
m.top.loadingRowCellVisible = true
|
||||
return
|
||||
end if
|
||||
|
||||
m.top.type = content.type
|
||||
|
||||
visibleSet = false
|
||||
for each cell in m.cells
|
||||
shouldBeVisible = content.type = cell.type
|
||||
cell.visible = shouldBeVisible
|
||||
for each key in visibleProperties
|
||||
shouldBeVisible = content.type = key
|
||||
m.top[visibleProperties[key]] = shouldBeVisible
|
||||
if shouldBeVisible
|
||||
cell.itemContent = content
|
||||
m.top[contentProperties[key]] = content
|
||||
visibleSet = true
|
||||
end if
|
||||
end for
|
||||
|
||||
if not visibleSet
|
||||
m.loadingRowCell.visible = true
|
||||
m.top.loadingRowCellVisible = true
|
||||
end if
|
||||
|
||||
if m.loadingRowCell.visible
|
||||
m.loadingRowCell.index = m.top.index
|
||||
if m.top.loadingRowCellVisible
|
||||
m.top.loadingRowCellIndex = m.top.index
|
||||
end if
|
||||
end function
|
||||
@@ -3,6 +3,20 @@
|
||||
<field id="type" type="string" />
|
||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||
<field id="index" type="integer" />
|
||||
|
||||
<field id="videoRowCellVisible" type="boolean" alias="VideoRowCell.visible" />
|
||||
<field id="playlistRowCellVisible" type="boolean" alias="PlaylistRowCell.visible" />
|
||||
<field id="channelRowCellVisible" type="boolean" alias="ChannelRowCell.visible" />
|
||||
<field id="loadingRowCellVisible" type="boolean" alias="LoadingRowCell.visible" />
|
||||
<field id="actionRowCellVisible" type="boolean" alias="ActionRowCell.visible" />
|
||||
|
||||
<field id="videoRowCellItemContent" type="node" alias="VideoRowCell.itemContent" />
|
||||
<field id="playlistRowCellItemContent" type="node" alias="PlaylistRowCell.itemContent" />
|
||||
<field id="channelRowCellItemContent" type="node" alias="ChannelRowCell.itemContent" />
|
||||
<field id="loadingRowCellItemContent" type="node" alias="LoadingRowCell.itemContent" />
|
||||
<field id="actionRowCellItemContent" type="node" alias="ActionRowCell.itemContent" />
|
||||
|
||||
<field id="loadingRowCellIndex" type="integer" alias="LoadingRowCell.index" />
|
||||
</interface>
|
||||
<children>
|
||||
<VideoRowCell id="VideoRowCell" />
|
||||
|
||||
@@ -7,6 +7,7 @@ function Init()
|
||||
end function
|
||||
|
||||
function FindChildren()
|
||||
' TODO:P2 use component properties with alias instead of FindNode
|
||||
m.titleLabel = m.top.FindNode("titleLabel")
|
||||
m.authorLabel = m.top.FindNode("authorLabel")
|
||||
m.viewCountDateLabel = m.top.FindNode("viewCountDateLabel")
|
||||
@@ -17,8 +18,6 @@ function FindChildren()
|
||||
m.thumbnail = m.top.FindNode("thumbnail")
|
||||
end function
|
||||
|
||||
' TODO:P1 premeres in x hours is not displayed correctly, and ends up failing with an error
|
||||
' Need to try not a live event, but a video
|
||||
function OnContentSet() as void
|
||||
content = m.top.itemContent
|
||||
|
||||
@@ -73,6 +72,6 @@ function SetDurationText(text as string)
|
||||
size = label.localBoundingRect()
|
||||
|
||||
rect.width = size.width + 16
|
||||
rect.translation = [rectParent.width - rect.width, 162]
|
||||
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||
end function
|
||||
|
||||
@@ -1,30 +1,33 @@
|
||||
import "pkg:/components/ChannelView/ChannelUtils.bs"
|
||||
import "pkg:/components/ContextMenu/ContextMenuUtils.bs"
|
||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/components/Navigation/LongPress.bs"
|
||||
import "pkg:/components/PlaylistView/PlaylistUtils.bs"
|
||||
import "pkg:/components/VideoFeed/VideoRowListContentTask.bs"
|
||||
import "pkg:/components/VideoFeed/VideoRowListRowContentTask.bs"
|
||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
' TODO:P1 add the option to remove a row if it does not have any content
|
||||
' E.g. NBC News does not return any related chnanels
|
||||
' The "Continue Watching" feed source might return nothing. In this case,
|
||||
' it should be removed.
|
||||
function Init()
|
||||
m.pendingLoadTasks = {}
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
m.top.ObserveField("itemFocused", FuncName(OnItemFocused))
|
||||
m.top.ObserveField("rowItemFocused", FuncName(OnRowItemFocused))
|
||||
m.top.observeField("focusedChild", FuncName(OnFocusedChildChange))
|
||||
m.top.ObserveField("visible", FuncName(OnVisibilityChange))
|
||||
DisposableObserveField(m.top, "itemFocused", FuncName(OnItemFocused))
|
||||
DisposableObserveField(m.top, "rowItemFocused", FuncName(OnRowItemFocused))
|
||||
DisposableObserveField(m.top, "focusedChild", FuncName(OnFocusedChildChange))
|
||||
DisposableObserveField(m.top, "visible", FuncName(OnVisibilityChange))
|
||||
|
||||
m.invidious.ObserveFieldScoped("authToken", FuncName(OnAuthTokenChange))
|
||||
InitializeLongPressTimer()
|
||||
' TODO:P1 Reload when subscriptions change
|
||||
DisposableObserveFieldScoped(m.invidious, "authToken", FuncName(OnAuthTokenChange))
|
||||
InitializeLongPress(["OK"])
|
||||
end function
|
||||
|
||||
function OnFocusedChildChange() as void
|
||||
@@ -300,7 +303,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = LONG_PRESS_KEY and press
|
||||
if key = OK_LONG_PRESS_KEY and press
|
||||
OnRowItemLongPressed(m.top.rowItemFocused)
|
||||
return true
|
||||
end if
|
||||
@@ -311,3 +314,11 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
end if
|
||||
return false
|
||||
end function
|
||||
|
||||
function OnDispose()
|
||||
CancelCurrentTasks()
|
||||
DisposeObservers()
|
||||
m.top.screen = invalid
|
||||
m.top.content = invalid
|
||||
m.top.itemComponentName = invalid
|
||||
end function
|
||||
@@ -1,4 +1,4 @@
|
||||
<component name="VideoRowList" extends="RowList" includes="AutoBind,ContextMenuProvider">
|
||||
<component name="VideoRowList" extends="RowList" includes="AutoBind,ContextMenuProvider,Disposable">
|
||||
<interface>
|
||||
<field id="appController" type="node" bind="/AppController" />
|
||||
<field id="invidious" type="node" bind="/Invidious" />
|
||||
|
||||
@@ -154,20 +154,34 @@ function VideoRowListRowContentTask(input as object) as object
|
||||
end function
|
||||
|
||||
function RemovePlaceHolderItems(contentNode as object)
|
||||
childCount = contentNode.getChildCount()
|
||||
removeIndex = childCount
|
||||
removeCount = 0
|
||||
|
||||
index = childCount - 1
|
||||
isLoading = true
|
||||
while isLoading and contentNode.getChildCount() > 0
|
||||
lastIndex = contentNode.getChildCount() - 1
|
||||
child = contentNode.getChild(lastIndex)
|
||||
isLoading = IsString(child.type) and child.type = "loading"
|
||||
if isLoading = true
|
||||
contentNode.removeChildIndex(lastIndex)
|
||||
while isLoading and index >= 0
|
||||
child = contentNode.getChild(index)
|
||||
isLoading = ValidString(child.type) = "loading"
|
||||
if not isLoading
|
||||
exit while
|
||||
end if
|
||||
removeCount += 1
|
||||
removeIndex -= 1
|
||||
index -= 1
|
||||
end while
|
||||
|
||||
if removeCount > 0
|
||||
contentNode.removeChildrenIndex(removeCount, removeIndex)
|
||||
end if
|
||||
end function
|
||||
|
||||
function HandleFeedLoadErrorDialog(error as object, rowList as object)
|
||||
function HandleFeedLoadErrorDialog(error as object, rowList as object) as void
|
||||
error = ErrorUtils.Format(error)
|
||||
LogError(error)
|
||||
rowList.onError = error
|
||||
if rowList.hasField("dispose") and rowList.dispose
|
||||
return
|
||||
end if
|
||||
DialogUtils.ShowDialog(error, "Failed to load feed", true)
|
||||
end function
|
||||
@@ -4,6 +4,8 @@ function Init()
|
||||
' We keep in memory the last videos we watched, to avoid a loop
|
||||
' Sometimes recommended videos point to each other, and we're stuck watching
|
||||
' The same 2 videos over and over again
|
||||
|
||||
' TODO:P1 get rid of `watchedVideos` and use the PlayQueue instead
|
||||
m.watchedVideos = new RingBuffer(100)
|
||||
end function
|
||||
|
||||
|
||||
@@ -185,8 +185,20 @@ function OnVideoPlayerStateChange() as void
|
||||
end if
|
||||
|
||||
if state = "finished"
|
||||
metadata = content?.metadata
|
||||
if not PlayNext(metadata?.recommendedVideos)
|
||||
if content = invalid
|
||||
m.container@.watchedVideosClear(invalid)
|
||||
VideoUtils.CloseVideo()
|
||||
return
|
||||
end if
|
||||
|
||||
metadata = content.metadata
|
||||
if metadata = invalid
|
||||
m.container@.watchedVideosClear(invalid)
|
||||
VideoUtils.CloseVideo()
|
||||
return
|
||||
end if
|
||||
|
||||
if not PlayNext(metadata.recommendedVideos)
|
||||
m.container@.watchedVideosClear(invalid)
|
||||
VideoUtils.CloseVideo()
|
||||
end if
|
||||
@@ -221,6 +233,7 @@ function PlayNext(recommendedVideos as object) as boolean
|
||||
return PlayNextRecommendedVideo(recommendedVideos)
|
||||
end function
|
||||
|
||||
' TODO:P2 move this to the play queue
|
||||
function PlayNextRecommendedVideo(recommendedVideos as object) as boolean
|
||||
if m.preferences["playback.autoplay"] <> true
|
||||
return false
|
||||
@@ -231,14 +244,18 @@ function PlayNextRecommendedVideo(recommendedVideos as object) as boolean
|
||||
end if
|
||||
|
||||
for each metadata in recommendedVideos
|
||||
videoId = metadata?.videoId
|
||||
if metadata = invalid
|
||||
continue for
|
||||
end if
|
||||
videoId = metadata.videoId
|
||||
if videoId = invalid
|
||||
continue for
|
||||
end if
|
||||
if not m.container@.watchedVideosContain(videoId)
|
||||
LogInfo(`Playing next recommended video (${videoId})`)
|
||||
node = InvidiousContent.ToVideoContentNode(invalid, metadata, invalid)
|
||||
VideoUtils.PlayVideo(node)
|
||||
instance = m.invidious@.GetCurrentInstance(invalid)
|
||||
node = InvidiousContent.ToVideoContentNode(invalid, metadata, instance)
|
||||
m.playQueue@.Play(node, -1)
|
||||
return true
|
||||
end if
|
||||
end for
|
||||
|
||||
@@ -85,32 +85,37 @@ namespace VideoUtils
|
||||
return GetVideoPlayer() <> invalid
|
||||
end function
|
||||
|
||||
function PauseVideo() as void
|
||||
function PauseVideo() as boolean
|
||||
player = GetVideoPlayer()
|
||||
if player = invalid
|
||||
return
|
||||
return false
|
||||
end if
|
||||
player.control = "pause"
|
||||
return true
|
||||
end function
|
||||
|
||||
function ResumeVideo() as void
|
||||
function ResumeVideo() as boolean
|
||||
player = GetVideoPlayer()
|
||||
if player = invalid
|
||||
return
|
||||
return false
|
||||
end if
|
||||
player.control = "resume"
|
||||
return true
|
||||
end function
|
||||
|
||||
function TogglePause() as void
|
||||
function TogglePause() as boolean
|
||||
player = GetVideoPlayer()
|
||||
if player = invalid
|
||||
return
|
||||
return false
|
||||
end if
|
||||
if player.state = "playing"
|
||||
player.control = "pause"
|
||||
return true
|
||||
else if player.state = "paused"
|
||||
player.control = "resume"
|
||||
return true
|
||||
end if
|
||||
return false
|
||||
end function
|
||||
|
||||
end namespace
|
||||
|
||||
@@ -53,26 +53,37 @@ namespace Http
|
||||
response = context.response
|
||||
invidiousNode = context.server.task.invidious
|
||||
|
||||
feedSource = request.query["feed-source"]
|
||||
if feedSource = invalid
|
||||
response.Default(400, "Expected feed-source")
|
||||
return true
|
||||
end if
|
||||
|
||||
token = invidiousNode.authToken
|
||||
if token = invalid
|
||||
response.Default(403, "No token, not logged in")
|
||||
return true
|
||||
end if
|
||||
|
||||
feedSource = request.query["feed-source"]
|
||||
if feedSource = invalid
|
||||
response.Default(400, "Expected feed-source")
|
||||
return true
|
||||
end if
|
||||
|
||||
feedSource = ParseJson(feedSource)
|
||||
if feedSource = invalid
|
||||
response.Default(400, "Expected valid JSON for feed-source")
|
||||
return true
|
||||
end if
|
||||
|
||||
invService = new Invidious.InvidiousService(invidiousNode)
|
||||
invResponse = invService.MakeRequest(feedSource, feedSource.state?.queryParams)
|
||||
|
||||
additionalQueryParams = invalid
|
||||
if feedSource.state <> invalid and feedSource.state.queryParams <> invalid
|
||||
additionalQueryParams = feedSource.state.queryParams
|
||||
end if
|
||||
|
||||
invResponse = invService.MakeRequest(feedSource, additionalQueryParams)
|
||||
if not invResponse.success
|
||||
response.Default(500, `Failed to make request: ${invResponse.error}`)
|
||||
return true
|
||||
end if
|
||||
|
||||
response.Json(invResponse.result)
|
||||
return true
|
||||
end function)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import "pkg:/source/services/SearchHistory.bs"
|
||||
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
@@ -9,13 +9,18 @@ namespace Http
|
||||
|
||||
m.Get("/api/search-history", function(context as object) as boolean
|
||||
response = context.response
|
||||
response.Json(SearchHistory.GetAllSaved())
|
||||
task = context.server.task
|
||||
preferences = task.preferences
|
||||
|
||||
response.Json(SearchHistoryUtils.GetAllSaved(preferences))
|
||||
return true
|
||||
end function)
|
||||
|
||||
m.Put("/api/search-history", function(context as object) as boolean
|
||||
request = context.request
|
||||
response = context.response
|
||||
task = context.server.task
|
||||
preferences = task.preferences
|
||||
|
||||
payload = request.Json()
|
||||
if payload = invalid
|
||||
@@ -29,15 +34,15 @@ namespace Http
|
||||
return true
|
||||
end if
|
||||
|
||||
SearchHistory.Save(query)
|
||||
response.Json(SearchHistory.GetAllSaved())
|
||||
SearchHistoryUtils.Save(preferences, query)
|
||||
response.Json(SearchHistoryUtils.GetAllSaved(preferences))
|
||||
return true
|
||||
end function)
|
||||
|
||||
m.Delete("/api/search-history", function(context as object) as boolean
|
||||
response = context.response
|
||||
|
||||
SearchHistory.Clear()
|
||||
SearchHistoryUtils.Clear()
|
||||
response.Default(204, "OK")
|
||||
return true
|
||||
end function)
|
||||
|
||||
@@ -54,9 +54,9 @@ function SetupRoutes(server as object)
|
||||
server.UseRouter(new Http.HttpStaticFilesRouter("/debug/libpkg", "libpkg:/", etags, options))
|
||||
options = { showDirectories: true, showHidden: true, fsCheck: true, staticFiles: true }
|
||||
server.UseRouter(new Http.HttpStaticFilesRouter("/debug/pkg", "pkg:/", etags, options))
|
||||
options = { showDirectories: true, showHidden: true }
|
||||
options = { showDirectories: true, showHidden: true, fsCheck: true }
|
||||
server.UseRouter(new Http.HttpStaticFilesRouter("/debug/tmp", "tmp:/", etags, options))
|
||||
options = { showDirectories: true, showHidden: true }
|
||||
options = { showDirectories: true, showHidden: true, fsCheck: true }
|
||||
server.UseRouter(new Http.HttpStaticFilesRouter("/debug/cachefs", "cachefs:/", etags, options))
|
||||
options = { showDirectories: true, showHidden: true, fsCheck: true, staticFiles: true }
|
||||
server.UseRouter(new Http.HttpStaticFilesRouter("/debug/common", "common:/", etags, options))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "HttpRequestState.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
import "pkg:/source/utils/UrlUtils.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
@@ -202,7 +203,7 @@ namespace Http
|
||||
split = m.route.Instr("?")
|
||||
if split <> -1
|
||||
m.route = m.route.Left(split)
|
||||
m.query = utils.ParseUrlQueryComponents(m.uri)
|
||||
m.query = UrlUtils.ParseQueryComponents(m.uri)
|
||||
else
|
||||
m.query = {}
|
||||
end if
|
||||
|
||||
@@ -3,39 +3,6 @@ import "pkg:/source/utils/Types.bs"
|
||||
namespace Http
|
||||
|
||||
class Utils
|
||||
|
||||
function ParseUrlQueryComponents(url as string) as object
|
||||
query = {}
|
||||
index = Instr(0, url, "?")
|
||||
url = Mid(url, index + 1)
|
||||
components = url.split("&")
|
||||
for each component in components
|
||||
key = component
|
||||
value = ""
|
||||
hasValue = false
|
||||
if Instr(0, component, "=")
|
||||
keyValue = component.split("=")
|
||||
key = keyValue[0]
|
||||
value = keyValue[1].DecodeUriComponent()
|
||||
hasValue = true
|
||||
end if
|
||||
|
||||
if query.DoesExist(key) and hasValue
|
||||
oldValue = query[key]
|
||||
if GetInterface(oldValue, "ifArray") = invalid
|
||||
oldValue = [oldValue]
|
||||
end if
|
||||
oldValue.push(value.DecodeUriComponent())
|
||||
value = oldValue
|
||||
end if
|
||||
|
||||
if key <> ""
|
||||
query[key] = value
|
||||
end if
|
||||
end for
|
||||
return query
|
||||
end function
|
||||
|
||||
function MimeType(uri = "" as string) as string
|
||||
map = m.MimeTypes
|
||||
if map = invalid
|
||||
@@ -50,22 +17,22 @@ namespace Http
|
||||
end if
|
||||
end function
|
||||
|
||||
function GetExtension(fn as string) as string
|
||||
l = fn.tokenize(".")
|
||||
if l.count() > 0
|
||||
return l.GetTail()
|
||||
function GetExtension(filename as string) as string
|
||||
parts = filename.tokenize(".")
|
||||
if parts.count() > 0
|
||||
return parts.GetTail()
|
||||
else
|
||||
return ""
|
||||
end if
|
||||
end function
|
||||
|
||||
function HttpTitle(code = 0 as integer) as string
|
||||
hcm = m.HttpTitles
|
||||
if hcm = invalid
|
||||
hcm = ParseJson(ReadAsciiFile("libpkg:/config/http-codes.json5"))
|
||||
m.HttpTitles = hcm
|
||||
map = m.httpCodesMap
|
||||
if map = invalid
|
||||
map = ParseJson(ReadAsciiFile("libpkg:/config/http-codes.json5"))
|
||||
m.httpCodesMap = map
|
||||
end if
|
||||
return ValidString(hcm[`${code}`])
|
||||
return ValidString(map[`${code}`])
|
||||
end function
|
||||
|
||||
end class
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<component name="Disposable" extends="Group">
|
||||
<interface>
|
||||
<field id="dispose" type="boolean" alwaysNotify="true" onChange="OnDispose" />
|
||||
</interface>
|
||||
</component>
|
||||
@@ -13,7 +13,7 @@ trending:
|
||||
default: GetUserCountryCode
|
||||
fields:
|
||||
type: []
|
||||
arrayType: "comma-separated"
|
||||
arrayType: "CommaSeparated"
|
||||
default:
|
||||
- title
|
||||
- videoId
|
||||
@@ -33,7 +33,7 @@ popular:
|
||||
queryParams:
|
||||
fields:
|
||||
type: []
|
||||
arrayType: "comma-separated"
|
||||
arrayType: "CommaSeparated"
|
||||
default:
|
||||
- title
|
||||
- videoId
|
||||
@@ -77,7 +77,7 @@ search:
|
||||
- playlist
|
||||
- channel
|
||||
- all
|
||||
arrayType: comma-separated
|
||||
arrayType: CommaSeparated
|
||||
default:
|
||||
- video
|
||||
- playlist
|
||||
@@ -94,7 +94,7 @@ search:
|
||||
- 360
|
||||
- location
|
||||
- hdr
|
||||
arrayType: comma-separated
|
||||
arrayType: CommaSeparated
|
||||
region:
|
||||
type: "#ISO3166"
|
||||
default: GetUserCountryCode
|
||||
@@ -142,6 +142,7 @@ channel_info:
|
||||
url: /api/v1/channels/{ucid}
|
||||
responseHandler: ChannelInfoHandler
|
||||
cacheSeconds: 259200 # 3 days
|
||||
tryCount: 3
|
||||
|
||||
# Channel endpoints
|
||||
channel_videos:
|
||||
@@ -149,6 +150,7 @@ channel_videos:
|
||||
url: /api/v1/channels/{ucid}/videos
|
||||
responseHandler: ChannelVideosHandler
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
queryParams:
|
||||
sort_by:
|
||||
# defaults to newest
|
||||
@@ -162,6 +164,7 @@ channel_playlists:
|
||||
url: /api/v1/channels/{ucid}/playlists
|
||||
responseHandler: ChannelPlaylistsHandler
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
queryParams:
|
||||
sort_by:
|
||||
required: false
|
||||
@@ -175,21 +178,27 @@ channel_shorts:
|
||||
url: /api/v1/channels/{ucid}/shorts
|
||||
responseHandler: ChannelVideosHandler
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
|
||||
channel_streams:
|
||||
title: Channel streams
|
||||
url: /api/v1/channels/{ucid}/streams
|
||||
responseHandler: ChannelVideosHandler
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
|
||||
channel_podcasts:
|
||||
title: Channel podcasts
|
||||
url: /api/v1/channels/{ucid}/podcasts
|
||||
responseHandler: ChannelPlaylistsHandler
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
|
||||
# TODO:P1 related channels are no longer working
|
||||
# https://github.com/iv-org/invidious/issues/4275
|
||||
channel_channels:
|
||||
title: Related channels
|
||||
url: /api/v1/channels/{ucid}/channels
|
||||
responseHandler: ChannelRelatedChannelsHandler
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
@@ -0,0 +1,14 @@
|
||||
[
|
||||
"Now loading Playlet...",
|
||||
"One moment please...",
|
||||
"Downloading the internet...",
|
||||
"Unclogging the tubes...",
|
||||
"Warming up the flux capacitor...",
|
||||
"Loading, ehm, stuff...",
|
||||
"Restoring quantum entanglement...",
|
||||
"Searching for kitten videos...",
|
||||
"One Mississippi... two Mississippi...",
|
||||
"Checking the TV's extended warranty...",
|
||||
"Deleting system32...",
|
||||
"Updating: 3 hours 32 minutes remaining...",
|
||||
]
|
||||
@@ -98,6 +98,13 @@
|
||||
key: "search_history",
|
||||
description: "Search history preferences",
|
||||
children: [
|
||||
{
|
||||
displayText: "Enable search history",
|
||||
key: "search_history.enabled",
|
||||
description: "Enable search history",
|
||||
type: "boolean",
|
||||
defaultValue: true,
|
||||
},
|
||||
{
|
||||
displayText: "Clear Search History",
|
||||
key: "search_history.clear_search_history",
|
||||
@@ -114,4 +121,18 @@
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
displayText: "Miscellaneous",
|
||||
key: "misc",
|
||||
description: "Misc. preferences",
|
||||
children: [
|
||||
{
|
||||
displayText: "Queue notifications",
|
||||
key: "misc.queue_notifications",
|
||||
description: "Show a notification when a video is added to the queue",
|
||||
type: "boolean",
|
||||
defaultValue: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 277 B |
@@ -3,9 +3,9 @@
|
||||
outputs: [
|
||||
{
|
||||
outputFilePath: 'images/icons/home.png',
|
||||
outputHash: '2c223d1197313eac54d31fc47d5a3ea7',
|
||||
width: 128,
|
||||
height: 128,
|
||||
outputHash: '55f237e441ea693c152fbf0fd52a98d2',
|
||||
width: 48,
|
||||
height: 48,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 940 B |
@@ -3,9 +3,9 @@
|
||||
outputs: [
|
||||
{
|
||||
outputFilePath: 'images/icons/info.png',
|
||||
outputHash: '46ec11a1a70386f7c9df8b6f60228f06',
|
||||
width: 128,
|
||||
height: 128,
|
||||
outputHash: '4362586ae18f53144b5921d318634d31',
|
||||
width: 48,
|
||||
height: 48,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 369 B |
@@ -3,9 +3,9 @@
|
||||
outputs: [
|
||||
{
|
||||
outputFilePath: 'images/icons/phone.png',
|
||||
outputHash: '6fbf881854e38acf3ba15febc88604aa',
|
||||
width: 128,
|
||||
height: 128,
|
||||
outputHash: '0492b3133fc6475224bae712e1129471',
|
||||
width: 48,
|
||||
height: 48,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 730 B |
@@ -3,9 +3,9 @@
|
||||
outputs: [
|
||||
{
|
||||
outputFilePath: 'images/icons/search.png',
|
||||
outputHash: '53e68de417adaddb44ae0194a18cf287',
|
||||
width: 128,
|
||||
height: 128,
|
||||
outputHash: 'da7de20ee8700756ff8ab6c806682853',
|
||||
width: 48,
|
||||
height: 48,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 687 B |
@@ -1,5 +1,41 @@
|
||||
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="style-scope yt-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
|
||||
<g class="style-scope yt-icon">
|
||||
<path fill="#FFFFFF" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,8c-2.21,0-4,1.79-4,4s1.79,4,4,4s4-1.79,4-4 S14.21,8,12,8L12,8z M13.22,3l0.55,2.2l0.13,0.51l0.5,0.18c0.61,0.23,1.19,0.56,1.72,0.98l0.4,0.32l0.5-0.14l2.17-0.62l1.22,2.11 l-1.63,1.59l-0.37,0.36l0.08,0.51c0.05,0.32,0.08,0.64,0.08,0.98s-0.03,0.66-0.08,0.98l-0.08,0.51l0.37,0.36l1.63,1.59l-1.22,2.11 l-2.17-0.62l-0.5-0.14l-0.4,0.32c-0.53,0.43-1.11,0.76-1.72,0.98l-0.5,0.18l-0.13,0.51L13.22,21h-2.44l-0.55-2.2l-0.13-0.51 l-0.5-0.18C9,17.88,8.42,17.55,7.88,17.12l-0.4-0.32l-0.5,0.14l-2.17,0.62L3.6,15.44l1.63-1.59l0.37-0.36l-0.08-0.51 C5.47,12.66,5.44,12.33,5.44,12s0.03-0.66,0.08-0.98l0.08-0.51l-0.37-0.36L3.6,8.56l1.22-2.11l2.17,0.62l0.5,0.14l0.4-0.32 C8.42,6.45,9,6.12,9.61,5.9l0.5-0.18l0.13-0.51L10.78,3H13.22 M14,2h-4L9.26,4.96c-0.73,0.27-1.4,0.66-2,1.14L4.34,5.27l-2,3.46 l2.19,2.13C4.47,11.23,4.44,11.61,4.44,12s0.03,0.77,0.09,1.14l-2.19,2.13l2,3.46l2.92-0.83c0.6,0.48,1.27,0.87,2,1.14L10,22h4 l0.74-2.96c0.73-0.27,1.4-0.66,2-1.14l2.92,0.83l2-3.46l-2.19-2.13c0.06-0.37,0.09-0.75,0.09-1.14s-0.03-0.77-0.09-1.14l2.19-2.13 l-2-3.46L16.74,6.1c-0.6-0.48-1.27-0.87-2-1.14L14,2L14,2z" class="style-scope yt-icon"></path>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
class="style-scope yt-icon"
|
||||
style="pointer-events: none; display: block; width: 100%; height: 100%;"
|
||||
version="1.1"
|
||||
id="svg6"
|
||||
sodipodi:docname="settings.svg"
|
||||
inkscape:version="1.2.1 (9c6d41e4, 2022-07-14)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs10" />
|
||||
<sodipodi:namedview
|
||||
id="namedview8"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="13.686545"
|
||||
inkscape:cx="4.8587864"
|
||||
inkscape:cy="9.4618472"
|
||||
inkscape:window-width="1440"
|
||||
inkscape:window-height="741"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg6" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.109841;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="m 15.714836,21.162285 c -0.04775,-0.04749 -0.527468,-0.542802 -1.065938,-1.100714 l -0.979041,-1.014393 -0.401626,0.07171 c -0.798456,0.142554 -1.580726,0.147794 -2.503447,0.01686 -0.364348,-0.05169 -0.444733,-0.05071 -0.504209,0.0063 -0.03895,0.03725 -0.5144649,0.526951 -1.0567701,1.088029 C 8.4680071,20.991356 8.203688,21.246191 8.162186,21.234332 8.081135,21.211112 5.9341972,19.95012 5.9128502,19.913146 c -0.00993,-0.0172 0.016734,-0.142872 0.059234,-0.279317 0.042496,-0.136422 0.2299991,-0.793515 0.4166734,-1.46018 L 6.7281551,16.961524 6.4320785,16.592865 C 5.862289,15.883396 5.5132974,15.266256 5.1993639,14.412999 L 5.0846579,14.101224 3.5992283,13.719846 C 2.7822408,13.510091 2.1094745,13.329756 2.1041891,13.319102 2.0919131,13.294362 2.0925311,10.757317 2.104804,10.708556 2.109834,10.688526 2.7786769,10.50587 3.5910878,10.302655 L 5.0682014,9.9331788 5.2345008,9.49992 C 5.5668964,8.6339312 5.8969037,8.0666765 6.4513094,7.4083326 L 6.7557649,7.046799 6.324366,5.5632096 5.892967,4.0796189 7.0480999,3.4126974 l 1.1551364,-0.666923 1.03413,1.0724325 c 0.5687708,0.5898369 1.0572367,1.0875367 1.0854787,1.1059973 0.02829,0.018417 0.21134,0.00474 0.406889,-0.030492 0.790829,-0.1424909 1.589383,-0.157455 2.38967,-0.044773 0.239703,0.033751 0.467774,0.062471 0.506828,0.063827 0.05368,0.0019 0.310948,-0.2443599 1.058958,-1.0138065 0.543376,-0.5589475 1.017625,-1.0497633 1.053889,-1.0907012 0.06474,-0.073076 0.08731,-0.062128 1.218007,0.5894222 l 1.152073,0.6638555 -0.414336,1.4812102 -0.414341,1.4812129 0.332573,0.4139806 c 0.457518,0.5695045 0.878631,1.3000551 1.134089,1.9672118 l 0.184326,0.4815741 1.492081,0.3814192 1.492073,0.381423 -0.0011,1.331172 c -9.6e-4,1.018585 -0.01526,1.334289 -0.06085,1.344453 -0.03215,0.0084 -0.699811,0.174229 -1.482307,0.370848 l -1.422738,0.357586 -0.184484,0.459619 c -0.347827,0.866592 -0.697041,1.456493 -1.234554,2.085471 -0.128966,0.150781 -0.241407,0.300395 -0.249955,0.332304 -0.0086,0.03194 0.176103,0.715813 0.410391,1.519776 l 0.425965,1.461751 -1.157043,0.667928 -1.157041,0.66793 z M 14.817887,15.430457 C 16.1088,14.392165 16.715634,12.590505 16.315859,10.983087 16.194833,10.496685 16.090431,10.239913 15.829488,9.7876861 15.227049,8.7438292 14.328202,8.05216 13.161621,7.7349075 12.310631,7.5034832 11.465346,7.5225017 10.621102,7.7920677 10.222996,7.9191817 9.5504789,8.2883743 9.212051,8.5655933 8.6840063,8.9981312 8.1829691,9.6573062 7.9340178,10.246988 c -0.1411802,0.334411 -0.2932223,0.906302 -0.337672,1.270119 -0.075243,0.615864 0.032489,1.443823 0.2696245,2.072115 0.1544825,0.409292 0.5523051,1.06528 0.8335102,1.374421 0.9394316,1.03272 2.2157115,1.545738 3.6158285,1.453426 0.931821,-0.06141 1.75658,-0.386598 2.502582,-0.986616 z"
|
||||
id="path1194" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -1,11 +1,11 @@
|
||||
{
|
||||
inputHash: '11d4a0bfa1ae239216088d825851ec4a',
|
||||
inputHash: '4a523fd829e2c489df85d5db106889a2',
|
||||
outputs: [
|
||||
{
|
||||
outputFilePath: 'images/icons/settings.png',
|
||||
outputHash: '62165b3f7bb781f5ed20a6aea6386152',
|
||||
width: 128,
|
||||
height: 128,
|
||||
outputHash: '07b98411ee36a3ccf3004e727d53d4f8',
|
||||
width: 48,
|
||||
height: 48,
|
||||
},
|
||||
],
|
||||
}
|
||||