Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
@@ -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 ci
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v5
|
||||||
|
with:
|
||||||
|
commit-message: "update dependencies"
|
||||||
|
branch: shore/update-deps
|
||||||
|
title: "[shore] update dependencies"
|
||||||
|
body: "Weekly pull request to update dependencies."
|
||||||
@@ -5,6 +5,55 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.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
|
## [0.14.0] - 2023-10-25
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -62,14 +62,25 @@ More under [Screenshots](./docs/screenshots/README.md)
|
|||||||
### Customize Invidious instance
|
### Customize Invidious instance
|
||||||
|
|
||||||
1. Open settings in Playlet
|
1. Open settings in Playlet
|
||||||
1. Scan QR Code with Phone
|
1. Select Invidious -> Instance
|
||||||
1. Change the Invidious instance
|
1. Set a custom instance, or choose a public one hosted by volunteers (from https://api.invidious.io/)
|
||||||
1. You can also do this from the settings tab
|
1. Optionally, Select `Test instance` to make sure it works
|
||||||
|
1. Hit save
|
||||||
|
|
||||||
|
> ℹ️ **Note**: If you are logged in when you change the instance, you will remain logged in to the old instance. In this case, Playlet will use the old instance to retrieve your subscriptions and your playlists, but will use the new instance for everything else. After switching to a new instance, you can log out and log in again to use your profile on the new instance.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
For everything related to Playlet app development, please see the [documentation](./docs/README.md)
|
For everything related to Playlet app development, please see the [documentation](./docs/README.md)
|
||||||
|
|
||||||
|
## Analytics and reporting
|
||||||
|
|
||||||
|
We do not collect any usage data, anonymous or not. But Roku does, and you can find the data made available to Playlet in the [Wiki](https://github.com/iBicha/playlet/wiki).
|
||||||
|
Most software in the wild collect some data to make sure things work, and to prioritize features.
|
||||||
|
Because we don't do that, we wouldn't know if people using Playlet are facing issues, unless these issues get reported.
|
||||||
|
Playlet could run on variaty of devices, with different capabilities and screen sizes, and different Invidious instances.
|
||||||
|
That's why it's important to report any issues you encouter using Playlet, otherwise it's unlikely that they get addressed.
|
||||||
|
|
||||||
## Why Playlet
|
## Why Playlet
|
||||||
|
|
||||||
```none
|
```none
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ That's pretty much it.
|
|||||||
There are a few reasons we made this separation:
|
There are a few reasons we made this separation:
|
||||||
|
|
||||||
- Playlet relies on [Invidious](https://github.com/iv-org/invidious). Invidious tries to keep up with Youtube making changes to their platform, but sometimes, a breaking change happens that requires Playlet to react quickly. Releasing through the Roku Channel store can take days, or a week. During this time, Playlet would be not functional, and that's not acceptable.
|
- Playlet relies on [Invidious](https://github.com/iv-org/invidious). Invidious tries to keep up with Youtube making changes to their platform, but sometimes, a breaking change happens that requires Playlet to react quickly. Releasing through the Roku Channel store can take days, or a week. During this time, Playlet would be not functional, and that's not acceptable.
|
||||||
- The ability to roll back: Sometimes an app breaking bug gets released. Allowing users to choose a seperate version is a flexible way to keep things working. Although right now rollbacks are behind a - hidden by default - developer menu, the reasoning still stands.
|
- The ability to roll back: Sometimes an app breaking bug gets released. Allowing users to choose a seperate version is a flexible way to keep things working. For example, it's possible to choose a different verrsion from the developer settings in the web app.
|
||||||
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very conveninct and less of a hassle, than going through the Roku Channel store.
|
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very conveninct and less of a hassle, than going through the Roku Channel store.
|
||||||
- I've had instances where I was trying to pass the certfication for Playlet to publish it. One of the criterias is to pass a some automated tests. But the tests were failing because their system could not connect to their Roku test devices (connection keeps timing out). My only option was to keep trying over and over until it worked.
|
- I've had instances where I was trying to pass the certfication for Playlet to publish it. One of the criterias is to pass a some automated tests. But the tests were failing because their system could not connect to their Roku test devices (connection keeps timing out). My only option was to keep trying over and over until it worked.
|
||||||
- It might sound that Playlet Lib is just a workaround for the Roku Channel release process. But phrased differently, Roku Channel release process is not good enough of what we need for Playlet.
|
- It might sound that Playlet Lib is just a workaround for the Roku Channel release process. But phrased differently, Roku Channel release process is not good enough of what we need for Playlet.
|
||||||
@@ -185,11 +185,11 @@ Since Component Libraries are simply zip files hosted at some https endpoint, Gi
|
|||||||
|
|
||||||
### Dev library hosted by VS Code Extension
|
### 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:
|
> 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.
|
> Please restart Playlet.
|
||||||
> If the problem persist, contact Playlet authors.
|
> If the problem persist, contact Playlet authors.
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
|||||||
|
|
||||||
info:
|
info:
|
||||||
title: Playlet Web API
|
title: Playlet Web API
|
||||||
version: 0.14.0
|
version: 0.17.0
|
||||||
description:
|
description:
|
||||||
Playlet Web API is a RESTful API for controlling the Playlet app on
|
Playlet Web API is a RESTful API for controlling the Playlet app on
|
||||||
Roku devices. The API is intended to be used by the Playlet web app, but can
|
Roku devices. The API is intended to be used by the Playlet web app, but can
|
||||||
@@ -538,6 +538,7 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
sponsorblock.show_notifications:
|
sponsorblock.show_notifications:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
# TODO:P1 add the rest of properties
|
||||||
PlayQueueObject:
|
PlayQueueObject:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -1,39 +1,41 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.11",
|
"@rokucommunity/bslint": "^0.8.12",
|
||||||
"@types/crypto-js": "^4.1.2",
|
"@types/crypto-js": "^4.2.1",
|
||||||
"@types/fs-extra": "^11.0.2",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/node": "^20.8.4",
|
"@types/node": "^20.9.0",
|
||||||
"@types/xml2js": "^0.4.12",
|
"@types/xml2js": "^0.4.14",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "^0.65.8",
|
"brighterscript": "^0.65.9",
|
||||||
"brighterscript-formatter": "^1.6.34",
|
"brighterscript-formatter": "^1.6.35",
|
||||||
"convert-svg-to-png": "^0.6.4",
|
"convert-svg-to-png": "^0.6.4",
|
||||||
"cross-fetch": "^4.0.0",
|
"cross-fetch": "^4.0.0",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.2.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"glob": "^10.3.10",
|
"glob": "^10.3.10",
|
||||||
|
"imap": "^0.8.19",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"roku-deploy": "^3.10.3",
|
"mailparser": "^3.6.5",
|
||||||
"rooibos-roku": "^5.7.0",
|
"roku-deploy": "^3.10.4",
|
||||||
|
"rooibos-roku": "^5.8.0",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"xml2js": "^0.6.2",
|
"xml2js": "^0.6.2",
|
||||||
"yaml": "^2.3.2"
|
"yaml": "^2.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18"
|
"node": "18"
|
||||||
@@ -274,9 +276,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@rokucommunity/bslint": {
|
"node_modules/@rokucommunity/bslint": {
|
||||||
"version": "0.8.11",
|
"version": "0.8.12",
|
||||||
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.11.tgz",
|
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.12.tgz",
|
||||||
"integrity": "sha512-PKtYRngih4oybTN7IEZ4aQp2Bm6a1P4GyKo+F6eJkUmzbCN2glVXvWq+REHBinqEAYyL/3YiSsD4brFWCVPHcw==",
|
"integrity": "sha512-0kU6sHpjEq51f54ajzscxzLT5Tq7SjF8FPszr7pRMSmUHHIDmTu5e1vDu8gS5UzWM+RGhXHqa3EXXt789B6sdQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
@@ -305,6 +307,19 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@selderee/plugin-htmlparser2": {
|
||||||
|
"version": "0.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz",
|
||||||
|
"integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"domhandler": "^5.0.3",
|
||||||
|
"selderee": "^0.11.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@tsconfig/node10": {
|
"node_modules/@tsconfig/node10": {
|
||||||
"version": "1.0.9",
|
"version": "1.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||||
@@ -330,15 +345,15 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/crypto-js": {
|
"node_modules/@types/crypto-js": {
|
||||||
"version": "4.1.2",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.1.tgz",
|
||||||
"integrity": "sha512-t33RNmTu5ufG/sorROIafiCVJMx3jz95bXUMoPAZcUD14fxMXnuTzqzXZoxpR0tNx2xpw11Dlmem9vGCsrSOfA==",
|
"integrity": "sha512-FSPGd9+OcSok3RsM0UZ/9fcvMOXJ1ENE/ZbLfOPlBWj7BgXtEAM8VYfTtT760GiLbQIMoVozwVuisjvsVwqYWw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/fs-extra": {
|
"node_modules/@types/fs-extra": {
|
||||||
"version": "11.0.2",
|
"version": "11.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz",
|
||||||
"integrity": "sha512-c0hrgAOVYr21EX8J0jBMXGLMgJqVf/v6yxi0dLaJboW9aQPh16Id+z6w2Tx1hm+piJOLv8xPfVKZCLfjPw/IMQ==",
|
"integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/jsonfile": "*",
|
"@types/jsonfile": "*",
|
||||||
@@ -355,18 +370,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.8.4",
|
"version": "20.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz",
|
||||||
"integrity": "sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==",
|
"integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.25.1"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/xml2js": {
|
"node_modules/@types/xml2js": {
|
||||||
"version": "0.4.12",
|
"version": "0.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.12.tgz",
|
"resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.14.tgz",
|
||||||
"integrity": "sha512-CZPpQKBZ8db66EP5hCjwvYrLThgZvnyZrPXK2W+UI1oOaWezGt34iOaUCX4Jah2X8+rQqjvl9VKEIT8TR1I0rA==",
|
"integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
@@ -713,9 +728,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brighterscript": {
|
"node_modules/brighterscript": {
|
||||||
"version": "0.65.8",
|
"version": "0.65.9",
|
||||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.8.tgz",
|
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.9.tgz",
|
||||||
"integrity": "sha512-mqarSnGCl/VSTRj1oY9wRMZJV9s8dH+rZZ2P1yE7d1nZQucVpAIGICW83G9AJHQYUDjrGsKHn5UfAfaZaE1KCA==",
|
"integrity": "sha512-cjJmftkY+2A5HrGIbmRz2fylywEwj3+Y/EXeSx4TJsEvOW0/M61G5gHRdGyqPF/TMEGlPHGlTBAmPdOMi85+xw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rokucommunity/bslib": "^0.1.1",
|
"@rokucommunity/bslib": "^0.1.1",
|
||||||
@@ -741,7 +756,7 @@
|
|||||||
"parse-ms": "^2.1.0",
|
"parse-ms": "^2.1.0",
|
||||||
"readline": "^1.3.0",
|
"readline": "^1.3.0",
|
||||||
"require-relative": "^0.8.7",
|
"require-relative": "^0.8.7",
|
||||||
"roku-deploy": "^3.10.3",
|
"roku-deploy": "^3.10.4",
|
||||||
"serialize-error": "^7.0.1",
|
"serialize-error": "^7.0.1",
|
||||||
"source-map": "^0.7.4",
|
"source-map": "^0.7.4",
|
||||||
"vscode-languageserver": "7.0.0",
|
"vscode-languageserver": "7.0.0",
|
||||||
@@ -756,12 +771,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brighterscript-formatter": {
|
"node_modules/brighterscript-formatter": {
|
||||||
"version": "1.6.34",
|
"version": "1.6.35",
|
||||||
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.34.tgz",
|
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.35.tgz",
|
||||||
"integrity": "sha512-qGjoiIVrbvgit4RkSF4iNZKFCaavzQG/7G9ZgJs87rBHeCOvqBy+e264cD/KwDnhg4kMdvty45zZ+Um8Oeo2UQ==",
|
"integrity": "sha512-OtExVLvgfZ7QlBDFpNqDUZQiSbO8sNO1l0wEfkspYJzPbhbhKYL2NEEL9OSTzUJYCrO/I8ZL7bo57ZGNQlcNBQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brighterscript": "^0.65.8",
|
"brighterscript": "^0.65.9",
|
||||||
"glob-all": "^3.3.0",
|
"glob-all": "^3.3.0",
|
||||||
"jsonc-parser": "^3.0.0",
|
"jsonc-parser": "^3.0.0",
|
||||||
"source-map": "^0.7.3",
|
"source-map": "^0.7.3",
|
||||||
@@ -1519,9 +1534,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/crypto-js": {
|
"node_modules/crypto-js": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||||
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==",
|
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/css-select": {
|
"node_modules/css-select": {
|
||||||
@@ -1574,9 +1589,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/dayjs": {
|
"node_modules/dayjs": {
|
||||||
"version": "1.11.8",
|
"version": "1.11.10",
|
||||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
|
||||||
"integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==",
|
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/debounce-promise": {
|
"node_modules/debounce-promise": {
|
||||||
@@ -1603,6 +1618,15 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/deepmerge": {
|
||||||
|
"version": "4.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||||
|
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/delayed-stream": {
|
"node_modules/delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
@@ -1761,6 +1785,15 @@
|
|||||||
"iconv-lite": "^0.6.2"
|
"iconv-lite": "^0.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/encoding-japanese": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/encoding-japanese/-/encoding-japanese-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-++P0RhebUC8MJAwJOsT93dT+5oc5oPImp1HubZpAuCZ5kTLnhuuBhKHj2jJeO/Gj93idPBWmIuQ9QWMe5rX3pQ==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/encoding/node_modules/iconv-lite": {
|
"node_modules/encoding/node_modules/iconv-lite": {
|
||||||
"version": "0.6.3",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
@@ -1942,9 +1975,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fast-glob": {
|
"node_modules/fast-glob": {
|
||||||
"version": "3.2.12",
|
"version": "3.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
|
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
|
||||||
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
|
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nodelib/fs.stat": "^2.0.2",
|
"@nodelib/fs.stat": "^2.0.2",
|
||||||
@@ -2382,6 +2415,31 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/he": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"he": "bin/he"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/html-to-text": {
|
||||||
|
"version": "9.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz",
|
||||||
|
"integrity": "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@selderee/plugin-htmlparser2": "^0.11.0",
|
||||||
|
"deepmerge": "^4.3.1",
|
||||||
|
"dom-serializer": "^2.0.0",
|
||||||
|
"htmlparser2": "^8.0.2",
|
||||||
|
"selderee": "^0.11.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/htmlparser2": {
|
"node_modules/htmlparser2": {
|
||||||
"version": "8.0.2",
|
"version": "8.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz",
|
||||||
@@ -2499,6 +2557,43 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/imap": {
|
||||||
|
"version": "0.8.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/imap/-/imap-0.8.19.tgz",
|
||||||
|
"integrity": "sha512-z5DxEA1uRnZG73UcPA4ES5NSCGnPuuouUx43OPX7KZx1yzq3N8/vx2mtXEShT5inxB3pRgnfG1hijfu7XN2YMw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"readable-stream": "1.1.x",
|
||||||
|
"utf7": ">=1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/imap/node_modules/isarray": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||||
|
"integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/imap/node_modules/readable-stream": {
|
||||||
|
"version": "1.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||||
|
"integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"core-util-is": "~1.0.0",
|
||||||
|
"inherits": "~2.0.1",
|
||||||
|
"isarray": "0.0.1",
|
||||||
|
"string_decoder": "~0.10.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/imap/node_modules/string_decoder": {
|
||||||
|
"version": "0.10.31",
|
||||||
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||||
|
"integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/immediate": {
|
"node_modules/immediate": {
|
||||||
"version": "3.0.6",
|
"version": "3.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||||
@@ -2752,6 +2847,51 @@
|
|||||||
"lcov-parse": "bin/cli.js"
|
"lcov-parse": "bin/cli.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/leac": {
|
||||||
|
"version": "0.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/leac/-/leac-0.6.0.tgz",
|
||||||
|
"integrity": "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/libbase64": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/libbase64/-/libbase64-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-l+nePcPbIG1fNlqMzrh68MLkX/gTxk/+vdvAb388Ssi7UuUN31MI44w4Yf33mM3Cm4xDfw48mdf3rkdHszLNew==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/libmime": {
|
||||||
|
"version": "5.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/libmime/-/libmime-5.2.1.tgz",
|
||||||
|
"integrity": "sha512-A0z9O4+5q+ZTj7QwNe/Juy1KARNb4WaviO4mYeFC4b8dBT2EEqK2pkM+GC8MVnkOjqhl5nYQxRgnPYRRTNmuSQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"encoding-japanese": "2.0.0",
|
||||||
|
"iconv-lite": "0.6.3",
|
||||||
|
"libbase64": "1.2.1",
|
||||||
|
"libqp": "2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/libmime/node_modules/iconv-lite": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/libqp": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/libqp/-/libqp-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-Ka0eC5LkF3IPNQHJmYBWljJsw0UvM6j+QdKRbWyCdTmYwvIDE6a7bCm0UkTAL/K+3KXK5qXT/ClcInU01OpdLg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/lie": {
|
"node_modules/lie": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
||||||
@@ -2761,6 +2901,15 @@
|
|||||||
"immediate": "~3.0.5"
|
"immediate": "~3.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/linkify-it": {
|
||||||
|
"version": "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": {
|
"node_modules/locate-path": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||||
@@ -2773,6 +2922,12 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/lodash": {
|
||||||
|
"version": "4.17.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||||
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/lodash.omit": {
|
"node_modules/lodash.omit": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
|
||||||
@@ -2824,6 +2979,70 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/mailparser": {
|
||||||
|
"version": "3.6.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": {
|
"node_modules/make-error": {
|
||||||
"version": "1.3.6",
|
"version": "1.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||||
@@ -2980,6 +3199,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/nodemailer": {
|
||||||
|
"version": "6.9.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": {
|
"node_modules/normalize-path": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||||
@@ -3159,6 +3387,19 @@
|
|||||||
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/parseley": {
|
||||||
|
"version": "0.12.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz",
|
||||||
|
"integrity": "sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"leac": "^0.6.0",
|
||||||
|
"peberminta": "^0.9.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/parseurl": {
|
"node_modules/parseurl": {
|
||||||
"version": "1.3.3",
|
"version": "1.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
@@ -3241,6 +3482,15 @@
|
|||||||
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
|
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/peberminta": {
|
||||||
|
"version": "0.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.9.0.tgz",
|
||||||
|
"integrity": "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/pend": {
|
"node_modules/pend": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||||
@@ -3376,9 +3626,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/punycode": {
|
"node_modules/punycode": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||||
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
|
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
@@ -3673,9 +3923,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/roku-deploy": {
|
"node_modules/roku-deploy": {
|
||||||
"version": "3.10.3",
|
"version": "3.10.4",
|
||||||
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.3.tgz",
|
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.4.tgz",
|
||||||
"integrity": "sha512-COJSQ638QklcM+8AN1nujFuzT04rTZLFuLSww35edm8w/y0l60oF/Iu7TQ46m75DwoGFzGFfomLEmA1ltQk9mA==",
|
"integrity": "sha512-Drl0c78HjZejaC0zovm4f/pJRCw0DbbBzR5Pe+ADKlMfOSJuF4UvNaejJzgbTcGXKkeztgOBvu5xxpOL7gqhWQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
@@ -3686,6 +3936,7 @@
|
|||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
"jsonc-parser": "^2.3.0",
|
"jsonc-parser": "^2.3.0",
|
||||||
"jszip": "^3.6.0",
|
"jszip": "^3.6.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"micromatch": "^4.0.4",
|
"micromatch": "^4.0.4",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"parse-ms": "^2.1.0",
|
"parse-ms": "^2.1.0",
|
||||||
@@ -3743,9 +3994,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rooibos-roku": {
|
"node_modules/rooibos-roku": {
|
||||||
"version": "5.7.0",
|
"version": "5.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.8.0.tgz",
|
||||||
"integrity": "sha512-rkEAaowZeuLbwvtBcRZ1r5ber2yeBRqjxcwya9kfYQmDJ+m2XP8pGO9j10C0eW9hx6H7ZZl+5z1oHjnjwQsmBQ==",
|
"integrity": "sha512-mPAszwOH1VdxMgSaoXQ/CgpAZ3RQ0A+d3BoxyY8axMsYS5kPO/8dL8fa7iFTGEZYA7803Ur52zlyN8GXqV5nLg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"source-map": "^0.7.3",
|
"source-map": "^0.7.3",
|
||||||
@@ -3846,6 +4097,18 @@
|
|||||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/selderee": {
|
||||||
|
"version": "0.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz",
|
||||||
|
"integrity": "sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"parseley": "^0.12.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://ko-fi.com/killymxi"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.5.4",
|
"version": "7.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||||
@@ -4021,9 +4284,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/sshpk": {
|
"node_modules/sshpk": {
|
||||||
"version": "1.17.0",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz",
|
||||||
"integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
|
"integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"asn1": "~0.2.3",
|
"asn1": "~0.2.3",
|
||||||
@@ -4213,6 +4476,15 @@
|
|||||||
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
|
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/tlds": {
|
||||||
|
"version": "1.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": {
|
"node_modules/tmp": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
|
||||||
@@ -4339,6 +4611,12 @@
|
|||||||
"node": ">=14.17"
|
"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": {
|
"node_modules/unbzip2-stream": {
|
||||||
"version": "1.4.3",
|
"version": "1.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
||||||
@@ -4356,9 +4634,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "5.25.3",
|
"version": "5.26.5",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||||
"integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==",
|
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/universalify": {
|
"node_modules/universalify": {
|
||||||
@@ -4398,6 +4676,24 @@
|
|||||||
"requires-port": "^1.0.0"
|
"requires-port": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/utf7": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/utf7/-/utf7-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-qQrPtYLLLl12NF4DrM9CvfkxkYI97xOb5dsnGZHE3teFr0tWiEZ9UdgMPczv24vl708cYMpe6mGXGHrotIp3Bw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"semver": "~5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/utf7/node_modules/semver": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/util-deprecate": {
|
"node_modules/util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
@@ -4703,9 +4999,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/yaml": {
|
"node_modules/yaml": {
|
||||||
"version": "2.3.2",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
|
||||||
"integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==",
|
"integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14"
|
"node": ">= 14"
|
||||||
|
|||||||
@@ -1,33 +1,35 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"description": "Unofficial Youtube client for Roku",
|
"description": "Unofficial Youtube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.11",
|
"@rokucommunity/bslint": "^0.8.12",
|
||||||
"@types/crypto-js": "^4.1.2",
|
"@types/crypto-js": "^4.2.1",
|
||||||
"@types/fs-extra": "^11.0.2",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/node": "^20.8.4",
|
"@types/node": "^20.9.0",
|
||||||
"@types/xml2js": "^0.4.12",
|
"@types/xml2js": "^0.4.14",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "^0.65.8",
|
"brighterscript": "^0.65.9",
|
||||||
"brighterscript-formatter": "^1.6.34",
|
"brighterscript-formatter": "^1.6.35",
|
||||||
"convert-svg-to-png": "^0.6.4",
|
"convert-svg-to-png": "^0.6.4",
|
||||||
"cross-fetch": "^4.0.0",
|
"cross-fetch": "^4.0.0",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.2.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"glob": "^10.3.10",
|
"glob": "^10.3.10",
|
||||||
|
"imap": "^0.8.19",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"roku-deploy": "^3.10.3",
|
"mailparser": "^3.6.5",
|
||||||
"rooibos-roku": "^5.7.0",
|
"roku-deploy": "^3.10.4",
|
||||||
|
"rooibos-roku": "^5.8.0",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"xml2js": "^0.6.2",
|
"xml2js": "^0.6.2",
|
||||||
"yaml": "^2.3.2"
|
"yaml": "^2.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18"
|
"node": "18"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.14.0"
|
"version": "0.17.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"description": "Unofficial Youtube client for Roku",
|
"description": "Unofficial Youtube client for Roku",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "rm -rf build/playlet-app",
|
"prebuild": "rm -rf build/playlet-app",
|
||||||
|
|||||||
@@ -14,12 +14,10 @@ function PositionSpinner()
|
|||||||
centerx = (1280 - m.busyspinner.poster.width) / 2
|
centerx = (1280 - m.busyspinner.poster.width) / 2
|
||||||
centery = (720 - m.busyspinner.poster.height) / 2
|
centery = (720 - m.busyspinner.poster.height) / 2
|
||||||
m.busyspinner.translation = [centerx, centery]
|
m.busyspinner.translation = [centerx, centery]
|
||||||
m.busyspinner.visible = true
|
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnVisibleChange()
|
function OnVisibleChange()
|
||||||
m.busyspinner.visible = m.top.visible
|
|
||||||
if m.busyspinner.visible
|
if m.busyspinner.visible
|
||||||
m.busyspinner.control = "start"
|
m.busyspinner.control = "start"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ title=Playlet
|
|||||||
|
|
||||||
# Do not update version manually, it is auto updated from package.json
|
# Do not update version manually, it is auto updated from package.json
|
||||||
major_version=0
|
major_version=0
|
||||||
minor_version=14
|
minor_version=17
|
||||||
build_version=00000
|
build_version=00000
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
function ShowErrorDialog(message as object, bulletText as object, bottomMessage as object)
|
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 = CreateObject("roSGNode", "StandardMessageDialog")
|
||||||
dialog.message = message
|
dialog.message = message
|
||||||
dialog.bulletText = bulletText
|
dialog.bulletText = bulletText
|
||||||
@@ -19,5 +20,7 @@ function OnButtonSelected()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnDialogClosed()
|
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
|
m.top.getScene().exitChannel = true
|
||||||
end function
|
end function
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
' Playlet (App to play videos from an Invidious server on Roku TVs)
|
' Playlet (App to play videos from an Invidious server on Roku TVs)
|
||||||
' Copyright (C) 2022 Brahim Hadriche
|
' Copyright (C) 2023 Brahim Hadriche
|
||||||
|
|
||||||
' This program is free software: you can redistribute it and/or modify
|
' This program is free software: you can redistribute it and/or modify
|
||||||
' it under the terms of the GNU Affero General Public License as published by
|
' it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -28,6 +28,7 @@ function Main(args as object) as void
|
|||||||
scene.ObserveField("exitChannel", port)
|
scene.ObserveField("exitChannel", port)
|
||||||
scene.launchArgs = args
|
scene.launchArgs = args
|
||||||
|
|
||||||
|
if false
|
||||||
' These vars are needed to pass certification.
|
' These vars are needed to pass certification.
|
||||||
' The actual work is done in Playlet Lib
|
' The actual work is done in Playlet Lib
|
||||||
' bs:disable-next-line LINT1005
|
' bs:disable-next-line LINT1005
|
||||||
@@ -37,7 +38,6 @@ function Main(args as object) as void
|
|||||||
|
|
||||||
' Do not signal app launch complete here, we're doing it over at Playlet Lib
|
' Do not signal app launch complete here, we're doing it over at Playlet Lib
|
||||||
' This is needed to pass cetification
|
' This is needed to pass cetification
|
||||||
if false
|
|
||||||
scene.signalBeacon("AppLaunchComplete")
|
scene.signalBeacon("AppLaunchComplete")
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -85,10 +85,3 @@ function Main(args as object) as void
|
|||||||
end while
|
end while
|
||||||
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ClearPlayletLibUrlsIfNeeded(launchArgs as object) as void
|
|
||||||
if launchArgs = invalid or launchArgs.clearPlayletLibUrls = invalid
|
|
||||||
return
|
|
||||||
end if
|
|
||||||
DeleteRegistryKey("playlet_lib_urls", "Playlet")
|
|
||||||
end function
|
|
||||||
@@ -20,3 +20,10 @@ function GetPlayletLibUrlsFromRegistry() as object
|
|||||||
urls = ParseJson(urlsJson)
|
urls = ParseJson(urlsJson)
|
||||||
return urls
|
return urls
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ClearPlayletLibUrlsIfNeeded(launchArgs as object) as void
|
||||||
|
if launchArgs = invalid or launchArgs.clearPlayletLibUrls = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
DeleteRegistryKey("playlet_lib_urls", "Playlet")
|
||||||
|
end function
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.14.0"
|
"version": "0.17.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"description": "Unofficial Youtube client for Roku",
|
"description": "Unofficial Youtube client for Roku",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "rm -rf build/playlet-lib",
|
"prebuild": "rm -rf build/playlet-lib",
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
|
import "pkg:/components/Navigation/LongPress.bs"
|
||||||
|
import "pkg:/components/PlayQueue/PlayQueueViewUtils.bs"
|
||||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
@@ -10,6 +12,7 @@ function Init()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
|
InitializeLongPress(["options"])
|
||||||
NodeSetFocus(m.top.root, true)
|
NodeSetFocus(m.top.root, true)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -78,27 +81,50 @@ function GetRootScreen(screenName as string) as object
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function onKeyEvent(key as string, press as boolean) as boolean
|
function onKeyEvent(key as string, press as boolean) as boolean
|
||||||
if not press
|
if LongPressHandler(key, press)
|
||||||
return false
|
|
||||||
end if
|
|
||||||
if key = "options"
|
|
||||||
VideoUtils.ToggleVideoPictureInPicture()
|
|
||||||
return true
|
return true
|
||||||
end if
|
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"
|
if key = "play"
|
||||||
VideoUtils.TogglePause()
|
if VideoUtils.TogglePause()
|
||||||
|
return true
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "pause"
|
if key = "pause"
|
||||||
VideoUtils.PauseVideo()
|
if VideoUtils.PauseVideo()
|
||||||
|
return true
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "playonly"
|
if key = "playonly"
|
||||||
VideoUtils.ResumeVideo()
|
if VideoUtils.ResumeVideo()
|
||||||
|
return true
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "back"
|
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 = DialogUtils.ShowDialogButtons("Do you want to exit Playlet?", "Exit", ["Exit", "Cancel"])
|
||||||
dialog.observeField("buttonSelected", FuncName(OnExitDialog), ["buttonSelected"])
|
dialog.observeField("buttonSelected", FuncName(OnExitDialog), ["buttonSelected"])
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<interface>
|
<interface>
|
||||||
<field id="root" type="node" />
|
<field id="root" type="node" />
|
||||||
<field id="stack" type="node" />
|
<field id="stack" type="node" />
|
||||||
|
<field id="playQueue" type="node" />
|
||||||
<function name="PushScreen" />
|
<function name="PushScreen" />
|
||||||
<function name="PopScreen" />
|
<function name="PopScreen" />
|
||||||
<function name="FocusTopScreen" />
|
<function name="FocusTopScreen" />
|
||||||
|
|||||||
@@ -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/FocusManagement.bs"
|
||||||
|
import "pkg:/source/utils/Logging.bs"
|
||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
import "SubscribeTask.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.container = m.top.findNode("container")
|
m.container = m.top.findNode("container")
|
||||||
@@ -11,10 +16,12 @@ function Init()
|
|||||||
m.banner = m.top.findNode("banner")
|
m.banner = m.top.findNode("banner")
|
||||||
m.thumbnail = m.top.findNode("thumbnail")
|
m.thumbnail = m.top.findNode("thumbnail")
|
||||||
m.authorLabel = m.top.findNode("authorLabel")
|
m.authorLabel = m.top.findNode("authorLabel")
|
||||||
|
m.subscribeButton = m.top.findNode("subscribeButton")
|
||||||
m.rowList = m.top.FindNode("rowList")
|
m.rowList = m.top.FindNode("rowList")
|
||||||
|
m.rowList.focusable = true
|
||||||
m.rowList.screen = m.top
|
m.rowList.screen = m.top
|
||||||
|
|
||||||
m.banner.ObserveField("loadStatus", FuncName(OnBannerLoadStatus))
|
DisposableObserveField(m.banner, "loadStatus", FuncName(OnBannerLoadStatus))
|
||||||
m.author = ""
|
m.author = ""
|
||||||
m.authorId = ""
|
m.authorId = ""
|
||||||
|
|
||||||
@@ -23,6 +30,17 @@ end function
|
|||||||
|
|
||||||
function OnNodeready()
|
function OnNodeready()
|
||||||
m.rowList@.BindNode(invalid)
|
m.rowList@.BindNode(invalid)
|
||||||
|
|
||||||
|
SetNavigation(m.rowList, "up", m.subscribeButton)
|
||||||
|
SetNavigation(m.subscribeButton, "down", m.rowList)
|
||||||
|
|
||||||
|
m.subscribeButton.text = "Subscribe"
|
||||||
|
DisposableObserveField(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
|
||||||
|
|
||||||
|
SetSubscribeButtonVisibility()
|
||||||
|
DisposableObserveFieldScoped(m.invidious, "authToken", FuncName(SetSubscribeButtonVisibility))
|
||||||
|
OnSubscriptionChanged()
|
||||||
|
DisposableObserveFieldScoped(m.invidious, "subscriptions", FuncName(OnSubscriptionChanged))
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnFocusChange() as void
|
function OnFocusChange() as void
|
||||||
@@ -36,6 +54,7 @@ end function
|
|||||||
function OnContentSet() as void
|
function OnContentSet() as void
|
||||||
content = m.top.content
|
content = m.top.content
|
||||||
if content = invalid
|
if content = invalid
|
||||||
|
m.top.authorId = ""
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -55,6 +74,8 @@ function OnContentSet() as void
|
|||||||
|
|
||||||
authorId = ValidString(content.authorId)
|
authorId = ValidString(content.authorId)
|
||||||
author = ValidString(content._author)
|
author = ValidString(content._author)
|
||||||
|
m.top.authorId = authorId
|
||||||
|
|
||||||
if (authorId <> m.authorId or author <> m.author) and IsArray(content.tabs)
|
if (authorId <> m.authorId or author <> m.author) and IsArray(content.tabs)
|
||||||
m.authorId = authorId
|
m.authorId = authorId
|
||||||
m.author = author
|
m.author = author
|
||||||
@@ -78,6 +99,10 @@ function CreateChannelFeeds(authorId as string, author as string, tabs as object
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||||
|
if NavigationKeyHandler(key, press).handled
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
if press = false
|
if press = false
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
@@ -91,6 +116,25 @@ end function
|
|||||||
|
|
||||||
function Close()
|
function Close()
|
||||||
m.appController@.PopScreen(invalid)
|
m.appController@.PopScreen(invalid)
|
||||||
|
m.top.dispose = true
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnDispose()
|
||||||
|
m.rowList.dispose = true
|
||||||
|
DisposeObservers()
|
||||||
|
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
|
end function
|
||||||
|
|
||||||
function OnBannerLoadStatus() as void
|
function OnBannerLoadStatus() as void
|
||||||
@@ -159,10 +203,51 @@ function CreateChannelFeed(title as string, endpoint as string, ucid as string,
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function GetContextMenuOptionsForItem(video as object) as object
|
function GetContextMenuOptionsForItem(video as object) as object
|
||||||
content = m.top.content
|
if StringUtils.IsNullOrEmpty(m.top.authorId)
|
||||||
if content = invalid or StringUtils.IsNullOrEmpty(content.authorId)
|
|
||||||
return []
|
return []
|
||||||
end if
|
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
|
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>
|
<interface>
|
||||||
<field id="content" type="node" onChange="OnContentSet" />
|
<field id="content" type="node" onChange="OnContentSet" />
|
||||||
|
<field id="authorId" type="string" onChange="OnAuthorIdChange" />
|
||||||
<field id="appController" type="node" bind="/AppController" />
|
<field id="appController" type="node" bind="/AppController" />
|
||||||
<field id="invidious" type="node" bind="/Invidious" />
|
<field id="invidious" type="node" bind="/Invidious" />
|
||||||
<field id="bookmarks" type="node" bind="/Bookmarks" />
|
<field id="bookmarks" type="node" bind="/Bookmarks" />
|
||||||
@@ -37,6 +38,14 @@
|
|||||||
font="font:MediumBoldSystemFont" />
|
font="font:MediumBoldSystemFont" />
|
||||||
</Poster>
|
</Poster>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
id="subscribeButton"
|
||||||
|
iconUri=""
|
||||||
|
focusedIconUri=""
|
||||||
|
showFocusFootprint="true"
|
||||||
|
minWidth="200"
|
||||||
|
translation="[930,64]" />
|
||||||
|
|
||||||
<VideoRowList
|
<VideoRowList
|
||||||
itemComponentName="RowCell"
|
itemComponentName="RowCell"
|
||||||
id="rowList"
|
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
|
width = m.top.width
|
||||||
height = m.top.height
|
height = m.top.height
|
||||||
|
|
||||||
m.top.maskSize = [width * GetScaleFactor(), height * GetScaleFactor()]
|
m.top.maskSize = [width * GetUIScaleFactor(), height * GetUIScaleFactor()]
|
||||||
end function
|
end function
|
||||||
|
|
||||||
' MaskGroup component do not scale with with UI resolution
|
' MaskGroup component do not scale with with UI resolution
|
||||||
function GetScaleFactor() as float
|
function GetUIScaleFactor() as float
|
||||||
if m.scaleFactor <> invalid
|
if m.uiScaleFactor <> invalid
|
||||||
return m.scaleFactor
|
return m.uiScaleFactor
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if m.global.uiScaleFactor <> invalid
|
||||||
|
return m.global.uiScaleFactor
|
||||||
|
end if
|
||||||
|
|
||||||
deviceInfo = CreateObject("roDeviceInfo")
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
uiResolutionWidth = deviceInfo.GetUIResolution().width
|
uiResolutionWidth = deviceInfo.GetUIResolution().width
|
||||||
' divide by 1280 because we have ui_resolutions=hd in manifest
|
' divide by 1280 because we have ui_resolutions=hd in manifest
|
||||||
m.scaleFactor = uiResolutionWidth / 1280
|
m.uiScaleFactor = uiResolutionWidth / 1280
|
||||||
return m.scaleFactor
|
|
||||||
|
if not m.global.hasField("uiScaleFactor")
|
||||||
|
m.global.addField("uiScaleFactor", "float", false)
|
||||||
|
end if
|
||||||
|
m.global.uiScaleFactor = m.uiScaleFactor
|
||||||
|
return m.uiScaleFactor
|
||||||
end function
|
end function
|
||||||
@@ -1,23 +1,23 @@
|
|||||||
<component name="ChannelContentNode" extends="ContentNode">
|
<component name="ChannelContentNode" extends="ContentNode">
|
||||||
<interface>
|
<interface>
|
||||||
|
<function name="LoadChannel" />
|
||||||
|
|
||||||
<field id="type" type="string" value="channel" />
|
<field id="type" type="string" value="channel" />
|
||||||
<field id="loadState" type="string" />
|
<field id="loadState" type="string" />
|
||||||
<function name="LoadChannel" />
|
|
||||||
<!-- index in a feed -->
|
<!-- index in a feed -->
|
||||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||||
|
<field id="HDItemWidth" type="float" value="196" />
|
||||||
<!-- NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation -->
|
<!-- NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation -->
|
||||||
<field id="_author" type="string" />
|
<field id="_author" type="string" />
|
||||||
<field id="authorId" type="string" />
|
<field id="authorId" type="string" />
|
||||||
|
<field id="banner" type="string" />
|
||||||
<field id="channelHandle" type="string" />
|
<field id="channelHandle" type="string" />
|
||||||
<field id="description" type="string" />
|
<field id="description" type="string" />
|
||||||
<field id="subCount" type="integer" />
|
<field id="subCount" type="integer" />
|
||||||
<field id="subCountText" type="string" />
|
<field id="subCountText" type="string" />
|
||||||
|
<field id="tabs" type="array" />
|
||||||
|
<field id="thumbnail" type="string" />
|
||||||
<field id="videoCount" type="integer" />
|
<field id="videoCount" type="integer" />
|
||||||
<field id="videoCountText" type="string" />
|
<field id="videoCountText" type="string" />
|
||||||
<field id="thumbnail" type="string" />
|
|
||||||
<field id="banner" type="string" />
|
|
||||||
<field id="tabs" type="array" />
|
|
||||||
|
|
||||||
<field id="HDItemWidth" type="float" value="196" />
|
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
@@ -22,17 +22,19 @@
|
|||||||
Although we use the field "author" in other components, this is the only place where we modify it after
|
Although we use the field "author" in other components, this is the only place where we modify it after
|
||||||
we set it for the first time (because a saved Playlist belongs to the Invidious user at first, but then
|
we set it for the first time (because a saved Playlist belongs to the Invidious user at first, but then
|
||||||
we can query it's original owner)
|
we can query it's original owner)
|
||||||
|
|
||||||
|
The issue happens on PlaylistContentNode and ChannelContentNode, but not VideoContentNode.
|
||||||
-->
|
-->
|
||||||
<field id="_author" type="string" />
|
<field id="_author" type="string" />
|
||||||
<field id="authorId" type="string" />
|
<field id="authorId" type="string" />
|
||||||
<field id="playlistId" type="string" />
|
<field id="playlistId" type="string" />
|
||||||
<field id="thumbnail" type="uri" />
|
<field id="thumbnail" type="uri" />
|
||||||
<field id="thumbnailBackground" type="uri" />
|
<field id="thumbnailBackground" type="uri" />
|
||||||
|
<field id="updated" type="integer" />
|
||||||
|
<field id="updatedText" type="string" />
|
||||||
<field id="videoCount" type="integer" value="-1" />
|
<field id="videoCount" type="integer" value="-1" />
|
||||||
<field id="videoCountText" type="string" />
|
<field id="videoCountText" type="string" />
|
||||||
<field id="viewCount" type="integer" />
|
<field id="viewCount" type="integer" />
|
||||||
<field id="viewCountText" type="string" />
|
<field id="viewCountText" type="string" />
|
||||||
<field id="updated" type="integer" />
|
|
||||||
<field id="updatedText" type="string" />
|
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
<component name="VideoContentNode" extends="ContentNode">
|
<component name="VideoContentNode" extends="ContentNode">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="type" type="string" value="video" />
|
<field id="type" type="string" value="video" />
|
||||||
|
|
||||||
<field id="author" type="string" />
|
|
||||||
<field id="authorId" type="string" />
|
|
||||||
<field id="hlsUrl" type="uri" />
|
|
||||||
<!-- index in a playlist -->
|
<!-- index in a playlist -->
|
||||||
<field id="index" type="integer" value="-1" />
|
<field id="index" type="integer" value="-1" />
|
||||||
<!-- index in a feed -->
|
<!-- index in a feed -->
|
||||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||||
|
|
||||||
|
<field id="author" type="string" />
|
||||||
|
<field id="authorId" type="string" />
|
||||||
<field id="isUpcoming" type="boolean" />
|
<field id="isUpcoming" type="boolean" />
|
||||||
<field id="lengthSeconds" type="integer" />
|
<field id="lengthSeconds" type="integer" />
|
||||||
<field id="lengthText" type="string" />
|
<field id="lengthText" type="string" />
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<ApplicationInfo id="ApplicationInfo" />
|
<ApplicationInfo id="ApplicationInfo" />
|
||||||
<Preferences id="Preferences" />
|
<Preferences id="Preferences" />
|
||||||
<Bookmarks id="Bookmarks" />
|
<Bookmarks id="Bookmarks" />
|
||||||
|
<SearchHistory id="SearchHistory" />
|
||||||
<Invidious id="Invidious" />
|
<Invidious id="Invidious" />
|
||||||
<PlayletWebServer id="WebServer" port="8888" />
|
<PlayletWebServer id="WebServer" port="8888" />
|
||||||
</AppController>
|
</AppController>
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
<children>
|
<children>
|
||||||
<!-- Logger should remain the first child, to make sure it is initialized first in the scene -->
|
<!-- Logger should remain the first child, to make sure it is initialized first in the scene -->
|
||||||
<Logger id="Logger" />
|
<Logger id="Logger" />
|
||||||
<AppController id="AppController" root="bind:./AppRoot" stack="bind:./Stack">
|
<AppController id="AppController"
|
||||||
|
root="bind:./AppRoot"
|
||||||
|
stack="bind:./Stack"
|
||||||
|
playQueue="bind:./PlayQueue">
|
||||||
<Group id="Stack">
|
<Group id="Stack">
|
||||||
<AppRoot id="AppRoot">
|
<AppRoot id="AppRoot">
|
||||||
<NavBar id="NavBar" focusIndex="1" appController="bind:/AppController">
|
<NavBar id="NavBar" focusIndex="1" appController="bind:/AppController">
|
||||||
@@ -47,10 +50,14 @@
|
|||||||
|
|
||||||
<!-- No render nodes -->
|
<!-- No render nodes -->
|
||||||
<PlayQueue id="PlayQueue"
|
<PlayQueue id="PlayQueue"
|
||||||
invidious="bind:../Invidious" />
|
invidious="bind:../Invidious"
|
||||||
|
notifications="bind:../Notifications"
|
||||||
|
preferences="bind:../Preferences" />
|
||||||
<ApplicationInfo id="ApplicationInfo" />
|
<ApplicationInfo id="ApplicationInfo" />
|
||||||
<Preferences id="Preferences" />
|
<Preferences id="Preferences" />
|
||||||
<Bookmarks id="Bookmarks" />
|
<Bookmarks id="Bookmarks" />
|
||||||
|
<SearchHistory id="SearchHistory"
|
||||||
|
preferences="bind:../Preferences" />
|
||||||
|
|
||||||
<Invidious id="Invidious"
|
<Invidious id="Invidious"
|
||||||
webServer="bind:../WebServer"
|
webServer="bind:../WebServer"
|
||||||
|
|||||||
@@ -7,13 +7,19 @@ function InitializeBindings()
|
|||||||
childProps: {
|
childProps: {
|
||||||
"AppController": {
|
"AppController": {
|
||||||
"root": "./AppRoot",
|
"root": "./AppRoot",
|
||||||
"stack": "./Stack"
|
"stack": "./Stack",
|
||||||
|
"playQueue": "./PlayQueue"
|
||||||
},
|
},
|
||||||
"NavBar": {
|
"NavBar": {
|
||||||
"appController": "/AppController"
|
"appController": "/AppController"
|
||||||
},
|
},
|
||||||
"PlayQueue": {
|
"PlayQueue": {
|
||||||
"invidious": "../Invidious"
|
"invidious": "../Invidious",
|
||||||
|
"notifications": "../Notifications",
|
||||||
|
"preferences": "../Preferences"
|
||||||
|
},
|
||||||
|
"SearchHistory": {
|
||||||
|
"preferences": "../Preferences"
|
||||||
},
|
},
|
||||||
"Invidious": {
|
"Invidious": {
|
||||||
"webServer": "../WebServer",
|
"webServer": "../WebServer",
|
||||||
|
|||||||
@@ -1,41 +1,79 @@
|
|||||||
const LONG_PRESS_KEY = "OK_LONG_PRESS"
|
const OK_LONG_PRESS_KEY = "OK_LONG_PRESS"
|
||||||
|
const OPTIONS_LONG_PRESS_KEY = "OPTIONS_LONG_PRESS"
|
||||||
|
|
||||||
|
function InitializeLongPress(keys as object, duration = 1.0 as float)
|
||||||
|
longPressKeyMap = {
|
||||||
|
"OK": OK_LONG_PRESS_KEY,
|
||||||
|
"options": OPTIONS_LONG_PRESS_KEY
|
||||||
|
}
|
||||||
|
m._longPressKeyMap = {}
|
||||||
|
for each key in keys
|
||||||
|
m._longPressKeyMap[key] = longPressKeyMap[key]
|
||||||
|
end for
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
' This is for testing long press using the VSCode extension.
|
||||||
|
' Using the keyboard:
|
||||||
|
' - press K to simulate an "OK" long press on the remote.
|
||||||
|
' - press O to simulate an "options" long press on the remote.
|
||||||
|
simulatedLongPressKeyMap = {
|
||||||
|
"OK": "Lit_k",
|
||||||
|
"options": "Lit_o"
|
||||||
|
}
|
||||||
|
|
||||||
|
m._simulatedLongPressKeyMap = {}
|
||||||
|
for each key in keys
|
||||||
|
m._simulatedLongPressKeyMap[simulatedLongPressKeyMap[key]] = key
|
||||||
|
end for
|
||||||
|
#end if
|
||||||
|
|
||||||
function InitializeLongPressTimer(duration = 1.0 as float)
|
|
||||||
m._longPressTimer = CreateObject("roSGNode", "Timer")
|
m._longPressTimer = CreateObject("roSGNode", "Timer")
|
||||||
m._longPressTimer.duration = duration
|
m._longPressTimer.duration = duration
|
||||||
m._longPressFired = false
|
m._longPressFired = false
|
||||||
|
m._pressState = {}
|
||||||
|
|
||||||
m._longPressTimer.ObserveField("fire", FuncName(LongPressTimerFired))
|
m._longPressTimer.ObserveField("fire", FuncName(LongPressTimerFired))
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function LongPressHandler(key as string, press as boolean) as boolean
|
function LongPressHandler(key as string, press as boolean) as boolean
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if key = "Lit_l"
|
if m._simulatedLongPressKeyMap.DoesExist(key)
|
||||||
LogInfo("Simulating long press using key:", key, "press:", press)
|
subtype = m.top.subtype()
|
||||||
|
simulatedKey = m._simulatedLongPressKeyMap[key]
|
||||||
|
LogInfo(`[${subtype}] Simulating`, simulatedKey, "long press using key:", key, "press:", press)
|
||||||
|
longPressKey = m._longPressKeyMap[simulatedKey]
|
||||||
m._longPressFired = true
|
m._longPressFired = true
|
||||||
return OnkeyEvent(LONG_PRESS_KEY, press)
|
return OnkeyEvent(longPressKey, press)
|
||||||
end if
|
end if
|
||||||
#end if
|
#end if
|
||||||
if key = "OK" and press
|
|
||||||
|
isLongPressKey = m._longPressKeyMap.DoesExist(key)
|
||||||
|
if not isLongPressKey
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
if press
|
||||||
m._longPressTimer.control = "stop"
|
m._longPressTimer.control = "stop"
|
||||||
m._longPressTimer.control = "start"
|
m._longPressTimer.control = "start"
|
||||||
m._longPressFired = false
|
m._longPressFired = false
|
||||||
m._okPressed = true
|
m._longPressKey = key
|
||||||
|
m._pressState[key] = true
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = "OK" and not press
|
if not press
|
||||||
m._longPressTimer.control = "stop"
|
m._longPressTimer.control = "stop"
|
||||||
if m._longPressFired = true
|
if m._longPressFired = true
|
||||||
m._longPressFired = false
|
m._longPressFired = false
|
||||||
m._okPressed = false
|
m._pressState[key] = false
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
' This case is for handling a dialog: The dialog will be dismissed with the OK down event,
|
' This case is for handling a dialog: The dialog will be dismissed with the OK down event,
|
||||||
' and we would trigger the action with the OK up event. The action should only happen if
|
' and we would trigger the action with the OK up event. The action should only happen if
|
||||||
' we detected both down and up events.
|
' we detected both down and up events.
|
||||||
wasOkPressed = m._okPressed
|
wasPressed = m._pressState[key]
|
||||||
m._okPressed = false
|
m._pressState[key] = false
|
||||||
if wasOkPressed <> true
|
if wasPressed <> true
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
@@ -43,7 +81,11 @@ function LongPressHandler(key as string, press as boolean) as boolean
|
|||||||
return false
|
return false
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function LongPressTimerFired()
|
function LongPressTimerFired() as void
|
||||||
m._longPressFired = true
|
m._longPressFired = true
|
||||||
OnkeyEvent(LONG_PRESS_KEY, true)
|
if StringUtils.IsNullOrEmpty(m._longPressKey) or not m._longPressKeyMap.DoesExist(m._longPressKey)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
OnkeyEvent(m._longPressKeyMap[m._longPressKey], true)
|
||||||
end function
|
end function
|
||||||
@@ -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/Dialog/DialogUtils.bs"
|
||||||
|
import "pkg:/components/NodeByRef/NodeByRef.bs"
|
||||||
import "pkg:/components/PlaylistView/PlaylistContentTask.bs"
|
import "pkg:/components/PlaylistView/PlaylistContentTask.bs"
|
||||||
|
import "pkg:/components/PlayQueue/Notifications/PlayQueueNotificationUtils.bs"
|
||||||
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
||||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
@@ -8,49 +10,74 @@ import "pkg:/source/utils/ErrorUtils.bs"
|
|||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
' TODO:P1 prevent adding duplicates of the same video/playlist
|
||||||
function Init()
|
function Init()
|
||||||
m.pendingLoadTasks = {}
|
m.pendingLoadTasks = {}
|
||||||
' TODO:P1 prevent adding duplicates of the same video/playlist
|
m.content = m.top.findNode("Content")
|
||||||
m.queue = CreateObject("roArray", 0, true)
|
m.top.content = m.content
|
||||||
|
m.content.addField("index", "integer", false)
|
||||||
|
m.content.index = m.top.index
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function Play(node as object, playlistIndex as integer)
|
function Play(node as object, playlistIndex as integer)
|
||||||
m.top.index += 1
|
m.top.index += 1
|
||||||
m.top.playlistIndex = playlistIndex
|
m.top.playlistIndex = playlistIndex
|
||||||
|
|
||||||
if m.top.index >= m.queue.Count()
|
node = WrapWithIndexField(node)
|
||||||
m.queue.push(node)
|
if m.top.index >= m.content.getChildCount()
|
||||||
m.top.index = m.queue.Count() - 1
|
m.content.appendChild(node)
|
||||||
|
m.top.index = m.content.getChildCount() - 1
|
||||||
else
|
else
|
||||||
ArrayUtils.Insert(m.queue, node, m.top.index)
|
m.content.insertChild(node, m.top.index)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
PlayItemAtCurrentIndex()
|
PlayItemAtCurrentIndex()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function AddToQueue(node as object)
|
function AddToQueue(node as object)
|
||||||
m.queue.push(node)
|
node = WrapWithIndexField(node)
|
||||||
|
m.content.appendChild(node)
|
||||||
|
queueNotifications = m.top.preferences["misc.queue_notifications"]
|
||||||
|
if queueNotifications
|
||||||
|
PlayQueue.ShowNotifcation(m.top.notifications, node)
|
||||||
|
end if
|
||||||
end function
|
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
|
function GetQueue(unused as dynamic) as object
|
||||||
|
queueNodes = m.content.getChildren(-1, 0)
|
||||||
items = []
|
items = []
|
||||||
for each item in m.queue
|
for each node in queueNodes
|
||||||
if item.type = "video"
|
node = NodeByRef.Unwrap(node)
|
||||||
|
if node = invalid
|
||||||
|
continue for
|
||||||
|
end if
|
||||||
|
|
||||||
|
nodeType = node.type
|
||||||
|
if nodeType = "video"
|
||||||
items.push({
|
items.push({
|
||||||
type: item.type,
|
type: nodeType,
|
||||||
videoId: item.videoId,
|
videoId: node.videoId,
|
||||||
title: item.title,
|
title: node.title,
|
||||||
author: item.author,
|
author: node.author,
|
||||||
thumbnail: item.thumbnail
|
thumbnail: node.thumbnail
|
||||||
})
|
})
|
||||||
else if item.type = "playlist"
|
else if node.type = "playlist"
|
||||||
items.push({
|
items.push({
|
||||||
type: item.type,
|
type: nodeType,
|
||||||
playlistId: item.playlistId,
|
playlistId: node.playlistId,
|
||||||
title: item.title,
|
title: node.title,
|
||||||
thumbnail: item.thumbnail,
|
thumbnail: node.thumbnail,
|
||||||
videoCountText: item.videoCountText
|
videoCountText: node.videoCountText
|
||||||
})
|
})
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
@@ -63,21 +90,24 @@ function GetQueue(unused as dynamic) as object
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function Clear(unused as dynamic)
|
function Clear(unused as dynamic)
|
||||||
m.queue.Clear()
|
m.content.removeChildrenIndex(m.content.getChildCount(), 0)
|
||||||
m.top.index = -1
|
m.top.index = -1
|
||||||
m.top.playlistIndex = -1
|
m.top.playlistIndex = -1
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function PlayNextItem(unused as dynamic) as boolean
|
function PlayNextItem(unused as dynamic) as boolean
|
||||||
if m.queue.Count() = 0
|
childCount = m.content.getChildCount()
|
||||||
|
if childCount = 0
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if m.top.index <> -1
|
index = m.top.index
|
||||||
if m.top.index >= m.queue.Count()
|
if index <> -1
|
||||||
|
if index >= childCount
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
node = m.queue[m.top.index]
|
node = m.content.getChild(index)
|
||||||
|
node = NodeByRef.Unwrap(node)
|
||||||
if node.type = "playlist"
|
if node.type = "playlist"
|
||||||
m.top.playlistIndex += 1
|
m.top.playlistIndex += 1
|
||||||
if PlayPlaylistAtCurrentIndex(node)
|
if PlayPlaylistAtCurrentIndex(node)
|
||||||
@@ -88,15 +118,22 @@ function PlayNextItem(unused as dynamic) as boolean
|
|||||||
|
|
||||||
m.top.index += 1
|
m.top.index += 1
|
||||||
m.top.playlistIndex = -1
|
m.top.playlistIndex = -1
|
||||||
if m.top.index >= m.queue.Count()
|
if m.top.index >= childCount
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return PlayItemAtCurrentIndex()
|
return PlayItemAtCurrentIndex()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function PlayItemAtIndex(index as integer) as boolean
|
||||||
|
m.top.index = index
|
||||||
|
m.top.playlistIndex = -1
|
||||||
|
return PlayItemAtCurrentIndex()
|
||||||
|
end function
|
||||||
|
|
||||||
function PlayItemAtCurrentIndex() as boolean
|
function PlayItemAtCurrentIndex() as boolean
|
||||||
node = m.queue[m.top.index]
|
node = m.content.getChild(m.top.index)
|
||||||
|
node = NodeByRef.Unwrap(node)
|
||||||
if node = invalid
|
if node = invalid
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
@@ -113,17 +150,18 @@ function PlayItemAtCurrentIndex() as boolean
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function PlayPlaylistAtCurrentIndex(playlist as object) as boolean
|
function PlayPlaylistAtCurrentIndex(playlist as object) as boolean
|
||||||
|
playlist = NodeByRef.Unwrap(playlist)
|
||||||
if playlist.videoCount < 0
|
if playlist.videoCount < 0
|
||||||
LoadPlaylist(playlist)
|
LoadPlaylist(playlist)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
index = m.top.playlistIndex
|
playlistIndex = m.top.playlistIndex
|
||||||
if index < 0 or index >= playlist.videoCount
|
if playlistIndex < 0 or playlistIndex >= playlist.videoCount
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if index < playlist.getChildCount()
|
if playlistIndex < playlist.getChildCount()
|
||||||
child = playlist.getChild(index)
|
child = playlist.getChild(playlistIndex)
|
||||||
VideoUtils.PlayVideo(child)
|
VideoUtils.PlayVideo(child)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
@@ -172,3 +210,12 @@ function OnPlaylistContentTaskResult(output as object) as void
|
|||||||
|
|
||||||
PlayPlaylistAtCurrentIndex(playlist)
|
PlayPlaylistAtCurrentIndex(playlist)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function OnIndexChange()
|
||||||
|
index = m.top.index
|
||||||
|
m.content.index = index
|
||||||
|
children = m.top.content.getChildren(-1, 0)
|
||||||
|
for each child in children
|
||||||
|
child.index = index
|
||||||
|
end for
|
||||||
|
end function
|
||||||
@@ -1,13 +1,19 @@
|
|||||||
<component name="PlayQueue" extends="Node">
|
<component name="PlayQueue" extends="Node">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="queue" type="array" />
|
<field id="content" type="node" />
|
||||||
<field id="index" type="integer" value="-1" />
|
<field id="index" type="integer" value="-1" onChange="OnIndexChange" />
|
||||||
<field id="playlistIndex" type="integer" value="-1" />
|
<field id="playlistIndex" type="integer" value="-1" />
|
||||||
<field id="invidious" type="node" />
|
<field id="invidious" type="node" />
|
||||||
|
<field id="notifications" type="node" />
|
||||||
|
<field id="preferences" type="node" />
|
||||||
<function name="Play" />
|
<function name="Play" />
|
||||||
<function name="AddToQueue" />
|
<function name="AddToQueue" />
|
||||||
<function name="GetQueue" />
|
<function name="GetQueue" />
|
||||||
<function name="Clear" />
|
<function name="Clear" />
|
||||||
<function name="PlayNextItem" />
|
<function name="PlayNextItem" />
|
||||||
|
<function name="PlayItemAtIndex" />
|
||||||
</interface>
|
</interface>
|
||||||
|
<children>
|
||||||
|
<ContentNode id="Content" />
|
||||||
|
</children>
|
||||||
</component>
|
</component>
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
import "pkg:/components/Navigation/Navigation.bs"
|
||||||
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.queueList = m.top.findNode("queueList")
|
||||||
|
m.queueLabel = m.top.findNode("queueLabel")
|
||||||
|
m.clearButton = m.top.findNode("clearButton")
|
||||||
|
m.showAnimation = m.top.findNode("showAnimation")
|
||||||
|
|
||||||
|
m.clearButton.ObserveField("buttonSelected", FuncName(OnClearButtonSelected))
|
||||||
|
m.queueList.ObserveField("itemSelected", FuncName(OnItemSelected))
|
||||||
|
|
||||||
|
SetNavigation(m.queueList, "up", m.clearButton)
|
||||||
|
SetNavigation(m.clearButton, "down", m.queueList)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Show(unsued as dynamic)
|
||||||
|
m.showAnimation.control = "start"
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnFocusChange() as void
|
||||||
|
if not m.top.focus
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
NodeSetFocus(m.queueList, true)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnContentSet() as void
|
||||||
|
content = m.top.content
|
||||||
|
if content = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
if not content.isSameNode(m.queueList.content)
|
||||||
|
m.queueList.content = content
|
||||||
|
end if
|
||||||
|
|
||||||
|
index = content.index
|
||||||
|
if IsInt(index) and index <> -1
|
||||||
|
m.queueLabel.text = `Queue (${index + 1}/${content.getChildCount()})`
|
||||||
|
else
|
||||||
|
m.queueLabel.text = `Queue (${content.getChildCount()})`
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||||
|
if NavigationKeyHandler(key, press).handled
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
if press = false
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = "back"
|
||||||
|
Close()
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
return false
|
||||||
|
end function
|
||||||
|
|
||||||
|
function Close()
|
||||||
|
m.top.appController@.PopScreen(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()
|
function OnNodeReady()
|
||||||
m.list.ObserveField("itemFocused", FuncName(OnItemFocused))
|
m.list.ObserveField("itemFocused", FuncName(OnItemFocused))
|
||||||
InitializeLongPressTimer()
|
InitializeLongPress(["OK"])
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnFocusChange() as void
|
function OnFocusChange() as void
|
||||||
@@ -53,7 +53,9 @@ function OnContentSet() as void
|
|||||||
m.background.uri = content.thumbnailBackground
|
m.background.uri = content.thumbnailBackground
|
||||||
|
|
||||||
itemFocused = m.list.itemFocused
|
itemFocused = m.list.itemFocused
|
||||||
|
if not content.isSameNode(m.list.content)
|
||||||
m.list.content = content
|
m.list.content = content
|
||||||
|
end if
|
||||||
if itemFocused > -1 and content.getChildCount() > itemFocused
|
if itemFocused > -1 and content.getChildCount() > itemFocused
|
||||||
m.list.jumpToItem = itemFocused
|
m.list.jumpToItem = itemFocused
|
||||||
end if
|
end if
|
||||||
@@ -65,7 +67,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = LONG_PRESS_KEY and press
|
if key = OK_LONG_PRESS_KEY and press
|
||||||
OnItemLongPressed(m.list.itemFocused)
|
OnItemLongPressed(m.list.itemFocused)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
@@ -137,6 +139,9 @@ function OnItemLongPressed(index as integer) as void
|
|||||||
|
|
||||||
LogInfo("Long press: playlist:", playlistId, "video:", videoId)
|
LogInfo("Long press: playlist:", playlistId, "video:", videoId)
|
||||||
|
|
||||||
|
' TODO:P1 handle case of opening the channel
|
||||||
|
' - Owner of a video
|
||||||
|
' - Owner of a playlist
|
||||||
contextMenuProviders = [m.top]
|
contextMenuProviders = [m.top]
|
||||||
ContextMenuUtils.Open(contextMenuProviders, m.appController, video)
|
ContextMenuUtils.Open(contextMenuProviders, m.appController, video)
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -39,5 +39,5 @@ function SetDurationText(text as string) as void
|
|||||||
size = label.localBoundingRect()
|
size = label.localBoundingRect()
|
||||||
|
|
||||||
rect.width = size.width + 16
|
rect.width = size.width + 16
|
||||||
rect.translation = [rectParent.width - rect.width, 72]
|
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||||
end function
|
end function
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import "pkg:/components/Navigation/Navigation.bs"
|
import "pkg:/components/Navigation/Navigation.bs"
|
||||||
import "pkg:/components/Screens/SearchScreen/SearchSuggestionsTask.bs"
|
import "pkg:/components/Screens/SearchScreen/SearchSuggestionsTask.bs"
|
||||||
|
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
import "pkg:/source/services/SearchHistory.bs"
|
|
||||||
import "pkg:/source/utils/ErrorUtils.bs"
|
import "pkg:/source/utils/ErrorUtils.bs"
|
||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
import "pkg:/source/utils/LoadingScreen.bs"
|
import "pkg:/source/utils/LoadingScreen.bs"
|
||||||
@@ -99,7 +99,8 @@ function OnTextChange() as void
|
|||||||
|
|
||||||
m.searchSuggestionsTask = StartAsyncTask(SearchSuggestionsTask, {
|
m.searchSuggestionsTask = StartAsyncTask(SearchSuggestionsTask, {
|
||||||
q: m.keyboard.text,
|
q: m.keyboard.text,
|
||||||
invidious: m.invidious
|
invidious: m.invidious,
|
||||||
|
preferences: m.preferences
|
||||||
}, OnSearchSuggestionsTaskResults)
|
}, OnSearchSuggestionsTaskResults)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -155,7 +156,7 @@ end function
|
|||||||
function OnSearchButtonSelected()
|
function OnSearchButtonSelected()
|
||||||
selected = m.suggestions.buttonSelected
|
selected = m.suggestions.buttonSelected
|
||||||
text = m.suggestions.buttons[selected]
|
text = m.suggestions.buttons[selected]
|
||||||
SearchHistory.Save(text)
|
SearchHistoryUtils.Save(m.preferences, text)
|
||||||
Search(text)
|
Search(text)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<field id="navBar" type="node" bind="/NavBar" />
|
<field id="navBar" type="node" bind="/NavBar" />
|
||||||
<field id="invidious" type="node" bind="/Invidious" />
|
<field id="invidious" type="node" bind="/Invidious" />
|
||||||
<field id="appController" type="node" bind="/AppController" />
|
<field id="appController" type="node" bind="/AppController" />
|
||||||
|
<field id="preferences" type="node" bind="/Preferences" />
|
||||||
<field id="filters" type="assocarray" />
|
<field id="filters" type="assocarray" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||||
import "pkg:/source/services/SearchHistory.bs"
|
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||||
|
|
||||||
@asynctask
|
@asynctask
|
||||||
function SearchSuggestionsTask(input as object) as object
|
function SearchSuggestionsTask(input as object) as object
|
||||||
q = input.q
|
q = input.q
|
||||||
invidiousNode = input.invidious
|
invidiousNode = input.invidious
|
||||||
|
preferencesNode = input.preferences
|
||||||
|
|
||||||
service = new Invidious.InvidiousService(invidiousNode)
|
service = new Invidious.InvidiousService(invidiousNode)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ function SearchSuggestionsTask(input as object) as object
|
|||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
|
|
||||||
history = SearchHistory.GetSaved(q)
|
history = SearchHistoryUtils.GetSaved(preferencesNode, q)
|
||||||
|
|
||||||
if searchSuggestsions <> invalid
|
if searchSuggestsions <> invalid
|
||||||
history = MergeSearchSuggestions(history, searchSuggestsions.suggestions)
|
history = MergeSearchSuggestions(history, searchSuggestsions.suggestions)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
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"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
@@ -21,6 +21,6 @@ function BindPreference(preferences as object, key as string)
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnButtonSelected()
|
function OnButtonSelected()
|
||||||
SearchHistory.Clear()
|
SearchHistoryUtils.Clear()
|
||||||
DialogUtils.ShowDialog("Search history cleared.", "Success")
|
DialogUtils.ShowDialog("Search history cleared.", "Success")
|
||||||
end function
|
end function
|
||||||
@@ -105,14 +105,21 @@ function IsReachable(instance as string, testNode as object) as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
name = json.software?.name
|
software = json.software
|
||||||
if not IsString(name)
|
if software = invalid
|
||||||
testNode.state = "failed"
|
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
|
return
|
||||||
end if
|
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)
|
if not IsString(version)
|
||||||
testNode.state = "failed"
|
testNode.state = "failed"
|
||||||
testNode.details = `Invalid json from ${url} (couldn't read software.version)`
|
testNode.details = `Invalid json from ${url} (couldn't read software.version)`
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import "InvidiousService.bs"
|
import "InvidiousService.bs"
|
||||||
|
import "InvidiousSubscriptionsTask.bs"
|
||||||
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.top.apiDefinitions = ParseJson(ReadAsciiFile("libpkg:/config/invidious_video_api.yaml"))
|
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)
|
function SetAuthToken(token as string, instance as string, username as dynamic)
|
||||||
m.service.SetAuthToken(token, instance, username)
|
m.service.SetAuthToken(token, instance, username)
|
||||||
end function
|
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="preferences" type="node" />
|
||||||
<field id="webServer" 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="apiDefinitions" type="assocarray" />
|
||||||
|
<field id="refreshSubscribtions" type="boolean" alwaysNotify="true" onChange="GetSubscriptions" />
|
||||||
|
<field id="subscriptions" type="assocarray" />
|
||||||
|
|
||||||
<function name="GetCurrentInstance" />
|
<function name="GetCurrentInstance" />
|
||||||
<function name="GetAuthorizeTokenLink" />
|
<function name="GetAuthorizeTokenLink" />
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ namespace Invidious
|
|||||||
|
|
||||||
const SEARCH_SUGGEST_ENDPOINT = "/api/v1/search/suggestions"
|
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_PLAYLISTS = "/api/v1/auth/playlists"
|
||||||
|
const AUTH_SUBSCRIPTIONS = "/api/v1/auth/subscriptions"
|
||||||
const AUTH_TOKENS_UNREGISTER = "/api/v1/auth/tokens/unregister"
|
const AUTH_TOKENS_UNREGISTER = "/api/v1/auth/tokens/unregister"
|
||||||
const AUTH_TOKENS_REGISTER = "/api/v1/auth/tokens/register"
|
const AUTH_TOKENS_REGISTER = "/api/v1/auth/tokens/register"
|
||||||
|
|
||||||
@@ -86,7 +88,7 @@ namespace Invidious
|
|||||||
url = `${authToken.instance}${Invidious.HISTORY_ENDPOINT}/${videoId}`
|
url = `${authToken.instance}${Invidious.HISTORY_ENDPOINT}/${videoId}`
|
||||||
request = HttpClient.Post(url, "")
|
request = HttpClient.Post(url, "")
|
||||||
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
||||||
request.SendAndForget()
|
request.Await()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function SearchSuggestions(q as string, cancellation = invalid as object) as object
|
function SearchSuggestions(q as string, cancellation = invalid as object) as object
|
||||||
@@ -147,6 +149,7 @@ namespace Invidious
|
|||||||
request.QueryParams(m.DefaultQueryParams())
|
request.QueryParams(m.DefaultQueryParams())
|
||||||
request.Cancellation(cancellation)
|
request.Cancellation(cancellation)
|
||||||
request.CacheSeconds(60 * 60 * 24)' 24 hours
|
request.CacheSeconds(60 * 60 * 24)' 24 hours
|
||||||
|
request.TryCount(3)
|
||||||
|
|
||||||
return request.Await()
|
return request.Await()
|
||||||
end function
|
end function
|
||||||
@@ -248,6 +251,12 @@ namespace Invidious
|
|||||||
request.CacheSeconds(endpoint.cacheSeconds)
|
request.CacheSeconds(endpoint.cacheSeconds)
|
||||||
end if
|
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
|
if feedSource.queryParams <> invalid
|
||||||
request.QueryParams(feedSource.queryParams)
|
request.QueryParams(feedSource.queryParams)
|
||||||
end if
|
end if
|
||||||
@@ -370,16 +379,28 @@ namespace Invidious
|
|||||||
function AuthFeedHandler(m as object, feedSource as object, response as object) as object
|
function AuthFeedHandler(m as object, feedSource as object, response as object) as object
|
||||||
m.DeleteExpiredToken(response)
|
m.DeleteExpiredToken(response)
|
||||||
|
|
||||||
if response.StatusCode() = 200
|
if response.StatusCode() <> 200
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
json = response.Json()
|
json = response.Json()
|
||||||
|
if json = invalid
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
videos = []
|
videos = []
|
||||||
|
|
||||||
|
if IsArray(json.notifications)
|
||||||
videos.Append(json.notifications)
|
videos.Append(json.notifications)
|
||||||
|
end if
|
||||||
|
|
||||||
|
if IsArray(json.videos)
|
||||||
videos.Append(json.videos)
|
videos.Append(json.videos)
|
||||||
|
end if
|
||||||
|
|
||||||
return {
|
return {
|
||||||
items: videos
|
items: videos
|
||||||
}
|
}
|
||||||
end if
|
|
||||||
return invalid
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function DeleteExpiredToken(response as object)
|
function DeleteExpiredToken(response as object)
|
||||||
@@ -461,7 +482,7 @@ namespace Invidious
|
|||||||
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
request.Headers(m.GetAuthenticationHeaders(authToken.token))
|
||||||
request.Header("Content-Type", "application/json")
|
request.Header("Content-Type", "application/json")
|
||||||
|
|
||||||
request.SendAndForget()
|
request.Await()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetAuthorizeTokenLink() as dynamic
|
function GetAuthorizeTokenLink() as dynamic
|
||||||
@@ -481,6 +502,47 @@ namespace Invidious
|
|||||||
return `${invidiousHost}/authorize_token?scopes=${scope}&callback_url=${callbackUrl}&expire=${expire}`
|
return `${invidiousHost}/authorize_token?scopes=${scope}&callback_url=${callbackUrl}&expire=${expire}`
|
||||||
end function
|
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 class
|
||||||
|
|
||||||
end namespace
|
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, "author", item, "author")
|
||||||
SetIfExists(node, "authorId", item, "authorId")
|
SetIfExists(node, "authorId", item, "authorId")
|
||||||
SetIfExists(node, "hlsUrl", item, "hlsUrl")
|
|
||||||
SetIfExists(node, "lengthSeconds", item, "lengthSeconds")
|
SetIfExists(node, "lengthSeconds", item, "lengthSeconds")
|
||||||
node.lengthText = TimeUtils.GetFormattedTime(item.lengthSeconds)
|
node.lengthText = TimeUtils.GetFormattedTime(item.lengthSeconds)
|
||||||
node.liveNow = VideoIsLive(item)
|
node.liveNow = VideoIsLive(item)
|
||||||
VideoSetPremiereTimestampText(node, item)
|
VideoSetPremiereTimestampText(node, item)
|
||||||
SetIfExists(node, "publishedText", item, "publishedText")
|
SetIfExists(node, "publishedText", item, "publishedText")
|
||||||
if not StringUtils.IsNullOrEmpty(instance)
|
VideoSetThumbnail(node, item, instance)
|
||||||
node.thumbnail = VideoGetThumbnail(item, instance) ?? "pkg:/images/thumbnail-missing.jpg"
|
|
||||||
end if
|
|
||||||
SetIfExists(node, "title", item, "title")
|
SetIfExists(node, "title", item, "title")
|
||||||
SetIfExists(node, "timestamp", item, "timestamp")
|
SetIfExists(node, "timestamp", item, "timestamp")
|
||||||
SetIfExists(node, "videoId", item, "videoId")
|
SetIfExists(node, "videoId", item, "videoId")
|
||||||
@@ -128,10 +125,11 @@ namespace InvidiousContent
|
|||||||
end if
|
end if
|
||||||
end function
|
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
|
videoThumbnails = videoItem.videoThumbnails
|
||||||
if videoThumbnails = invalid or videoThumbnails.Count() = 0
|
if videoThumbnails = invalid or videoThumbnails.Count() = 0
|
||||||
return invalid
|
node.thumbnail = "pkg:/images/thumbnail-missing.jpg"
|
||||||
|
return false
|
||||||
end if
|
end if
|
||||||
url = invalid
|
url = invalid
|
||||||
for each thumbnail in videoThumbnails
|
for each thumbnail in videoThumbnails
|
||||||
@@ -143,10 +141,14 @@ namespace InvidiousContent
|
|||||||
if url = invalid
|
if url = invalid
|
||||||
url = videoThumbnails[0].url
|
url = videoThumbnails[0].url
|
||||||
end if
|
end if
|
||||||
if url.startsWith("/") and not StringUtils.IsNullOrEmpty(instance)
|
if url.startsWith("/")
|
||||||
|
if StringUtils.IsNullOrEmpty(instance)
|
||||||
|
return false
|
||||||
|
end if
|
||||||
url = instance + url
|
url = instance + url
|
||||||
end if
|
end if
|
||||||
return url
|
node.thumbnail = url
|
||||||
|
return true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function VideoIsLive(videoItem as object) as boolean
|
function VideoIsLive(videoItem as object) as boolean
|
||||||
@@ -208,7 +210,9 @@ namespace InvidiousContent
|
|||||||
end if
|
end if
|
||||||
thumbnail = thumbnailUrl
|
thumbnail = thumbnailUrl
|
||||||
else if playlistItem.videos <> invalid and playlistItem.videos.Count() > 0 and playlistItem.videos[0].index = 0
|
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
|
else if node.getChildCount() > 0
|
||||||
thumbnail = node.getChild(0).thumbnail
|
thumbnail = node.getChild(0).thumbnail
|
||||||
end if
|
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/RegistryUtils.bs"
|
||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
|
|
||||||
namespace SearchHistory
|
namespace SearchHistoryUtils
|
||||||
function Save(q as string, maxItems = 10 as integer)
|
function Save(preferencesNode as object, q as string, maxItems = 10 as integer) as void
|
||||||
history = GetAllSaved()
|
seachHistoryEnabled = preferencesNode["search_history.enabled"]
|
||||||
|
if not seachHistoryEnabled
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
history = GetAllSaved(preferencesNode)
|
||||||
index = ArrayUtils.IndexOfString(history, q)
|
index = ArrayUtils.IndexOfString(history, q)
|
||||||
if index <> -1
|
if index <> -1
|
||||||
history.Delete(index)
|
history.Delete(index)
|
||||||
@@ -21,8 +26,8 @@ namespace SearchHistory
|
|||||||
RegistryUtils.Write(RegistryUtils.SEARCH_HISTORY, history)
|
RegistryUtils.Write(RegistryUtils.SEARCH_HISTORY, history)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetSaved(q as string) as object
|
function GetSaved(preferencesNode as object, q as string) as object
|
||||||
history = GetAllSaved()
|
history = GetAllSaved(preferencesNode)
|
||||||
if history.count() = 0
|
if history.count() = 0
|
||||||
return []
|
return []
|
||||||
end if
|
end if
|
||||||
@@ -39,7 +44,12 @@ namespace SearchHistory
|
|||||||
return result
|
return result
|
||||||
end function
|
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)
|
history = RegistryUtils.Read(RegistryUtils.SEARCH_HISTORY)
|
||||||
if history = invalid
|
if history = invalid
|
||||||
return []
|
return []
|
||||||
@@ -47,7 +57,6 @@ namespace SearchHistory
|
|||||||
return ParseJson(history)
|
return ParseJson(history)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|
||||||
function Clear()
|
function Clear()
|
||||||
RegistryUtils.Delete(RegistryUtils.SEARCH_HISTORY)
|
RegistryUtils.Delete(RegistryUtils.SEARCH_HISTORY)
|
||||||
end function
|
end function
|
||||||
@@ -84,7 +84,7 @@ namespace SponsorBlock
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
url = `${m.sponsorBlockConfig.serverAddress}${SponsorBlock.VIEWED_SEGMENT_ENDPOINT}?UUID=${segmentId}`
|
url = `${m.sponsorBlockConfig.serverAddress}${SponsorBlock.VIEWED_SEGMENT_ENDPOINT}?UUID=${segmentId}`
|
||||||
HttpClient.Post(url, "").SendAndForget()
|
HttpClient.Post(url, "").Await()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GenerateProgressBarBackground(segments as object, lengthSeconds as integer, path as string)
|
function GenerateProgressBarBackground(segments as object, lengthSeconds as integer, path as string)
|
||||||
|
|||||||
@@ -37,5 +37,5 @@ function SetVideoCount(videoCountText as string)
|
|||||||
size = label.localBoundingRect()
|
size = label.localBoundingRect()
|
||||||
|
|
||||||
rect.width = size.width + 16
|
rect.width = size.width + 16
|
||||||
rect.translation = [rectParent.width - rect.width, 162]
|
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||||
end function
|
end function
|
||||||
@@ -1,40 +1,49 @@
|
|||||||
function Init()
|
' Note: we use aliases and not references to sub cells that we initialize on Init() because
|
||||||
m.videoRowCell = m.top.findNode("VideoRowCell")
|
' of a rare bug / race condition where the cells are not initialized
|
||||||
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
|
|
||||||
|
|
||||||
function OnContentSet() as void
|
function OnContentSet() as void
|
||||||
content = m.top.itemContent
|
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
|
if content = invalid
|
||||||
for each cell in m.cells
|
for each key in visibleProperties
|
||||||
cell.visible = false
|
m.top[visibleProperties[key]] = false
|
||||||
end for
|
end for
|
||||||
m.loadingRowCell.visible = true
|
m.top.loadingRowCellVisible = true
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.top.type = content.type
|
m.top.type = content.type
|
||||||
|
|
||||||
visibleSet = false
|
visibleSet = false
|
||||||
for each cell in m.cells
|
for each key in visibleProperties
|
||||||
shouldBeVisible = content.type = cell.type
|
shouldBeVisible = content.type = key
|
||||||
cell.visible = shouldBeVisible
|
m.top[visibleProperties[key]] = shouldBeVisible
|
||||||
if shouldBeVisible
|
if shouldBeVisible
|
||||||
cell.itemContent = content
|
m.top[contentProperties[key]] = content
|
||||||
visibleSet = true
|
visibleSet = true
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
|
|
||||||
if not visibleSet
|
if not visibleSet
|
||||||
m.loadingRowCell.visible = true
|
m.top.loadingRowCellVisible = true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if m.loadingRowCell.visible
|
if m.top.loadingRowCellVisible
|
||||||
m.loadingRowCell.index = m.top.index
|
m.top.loadingRowCellIndex = m.top.index
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
@@ -3,6 +3,20 @@
|
|||||||
<field id="type" type="string" />
|
<field id="type" type="string" />
|
||||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||||
<field id="index" type="integer" />
|
<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>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<VideoRowCell id="VideoRowCell" />
|
<VideoRowCell id="VideoRowCell" />
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ function FindChildren()
|
|||||||
m.thumbnail = m.top.FindNode("thumbnail")
|
m.thumbnail = m.top.FindNode("thumbnail")
|
||||||
end function
|
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
|
function OnContentSet() as void
|
||||||
content = m.top.itemContent
|
content = m.top.itemContent
|
||||||
|
|
||||||
@@ -73,6 +71,6 @@ function SetDurationText(text as string)
|
|||||||
size = label.localBoundingRect()
|
size = label.localBoundingRect()
|
||||||
|
|
||||||
rect.width = size.width + 16
|
rect.width = size.width + 16
|
||||||
rect.translation = [rectParent.width - rect.width, 162]
|
rect.translation = [rectParent.width - rect.width, rect.translation[1]]
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import "pkg:/components/ChannelView/ChannelUtils.bs"
|
import "pkg:/components/ChannelView/ChannelUtils.bs"
|
||||||
import "pkg:/components/ContextMenu/ContextMenuUtils.bs"
|
import "pkg:/components/ContextMenu/ContextMenuUtils.bs"
|
||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
|
||||||
import "pkg:/components/Navigation/LongPress.bs"
|
import "pkg:/components/Navigation/LongPress.bs"
|
||||||
import "pkg:/components/PlaylistView/PlaylistUtils.bs"
|
import "pkg:/components/PlaylistView/PlaylistUtils.bs"
|
||||||
import "pkg:/components/VideoFeed/VideoRowListContentTask.bs"
|
import "pkg:/components/VideoFeed/VideoRowListContentTask.bs"
|
||||||
import "pkg:/components/VideoFeed/VideoRowListRowContentTask.bs"
|
import "pkg:/components/VideoFeed/VideoRowListRowContentTask.bs"
|
||||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
|
import "pkg:/source/utils/DisposableObserve.bs"
|
||||||
import "pkg:/source/utils/ErrorUtils.bs"
|
import "pkg:/source/utils/ErrorUtils.bs"
|
||||||
import "pkg:/source/utils/Logging.bs"
|
import "pkg:/source/utils/Logging.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
@@ -18,13 +18,14 @@ function Init()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNodeReady()
|
function OnNodeReady()
|
||||||
m.top.ObserveField("itemFocused", FuncName(OnItemFocused))
|
DisposableObserveField(m.top, "itemFocused", FuncName(OnItemFocused))
|
||||||
m.top.ObserveField("rowItemFocused", FuncName(OnRowItemFocused))
|
DisposableObserveField(m.top, "rowItemFocused", FuncName(OnRowItemFocused))
|
||||||
m.top.observeField("focusedChild", FuncName(OnFocusedChildChange))
|
DisposableObserveField(m.top, "focusedChild", FuncName(OnFocusedChildChange))
|
||||||
m.top.ObserveField("visible", FuncName(OnVisibilityChange))
|
DisposableObserveField(m.top, "visible", FuncName(OnVisibilityChange))
|
||||||
|
|
||||||
m.invidious.ObserveFieldScoped("authToken", FuncName(OnAuthTokenChange))
|
' TODO:P1 Reload when subscriptions change
|
||||||
InitializeLongPressTimer()
|
DisposableObserveFieldScoped(m.invidious, "authToken", FuncName(OnAuthTokenChange))
|
||||||
|
InitializeLongPress(["OK"])
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnFocusedChildChange() as void
|
function OnFocusedChildChange() as void
|
||||||
@@ -300,7 +301,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if key = LONG_PRESS_KEY and press
|
if key = OK_LONG_PRESS_KEY and press
|
||||||
OnRowItemLongPressed(m.top.rowItemFocused)
|
OnRowItemLongPressed(m.top.rowItemFocused)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
@@ -311,3 +312,8 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
|||||||
end if
|
end if
|
||||||
return false
|
return false
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function OnDispose()
|
||||||
|
CancelCurrentTasks()
|
||||||
|
DisposeObservers()
|
||||||
|
end function
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<component name="VideoRowList" extends="RowList" includes="AutoBind,ContextMenuProvider">
|
<component name="VideoRowList" extends="RowList" includes="AutoBind,ContextMenuProvider,Disposable">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="appController" type="node" bind="/AppController" />
|
<field id="appController" type="node" bind="/AppController" />
|
||||||
<field id="invidious" type="node" bind="/Invidious" />
|
<field id="invidious" type="node" bind="/Invidious" />
|
||||||
|
|||||||
@@ -154,20 +154,34 @@ function VideoRowListRowContentTask(input as object) as object
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function RemovePlaceHolderItems(contentNode as object)
|
function RemovePlaceHolderItems(contentNode as object)
|
||||||
|
childCount = contentNode.getChildCount()
|
||||||
|
removeIndex = childCount
|
||||||
|
removeCount = 0
|
||||||
|
|
||||||
|
index = childCount - 1
|
||||||
isLoading = true
|
isLoading = true
|
||||||
while isLoading and contentNode.getChildCount() > 0
|
while isLoading and index >= 0
|
||||||
lastIndex = contentNode.getChildCount() - 1
|
child = contentNode.getChild(index)
|
||||||
child = contentNode.getChild(lastIndex)
|
isLoading = ValidString(child.type) = "loading"
|
||||||
isLoading = IsString(child.type) and child.type = "loading"
|
if not isLoading
|
||||||
if isLoading = true
|
exit while
|
||||||
contentNode.removeChildIndex(lastIndex)
|
|
||||||
end if
|
end if
|
||||||
|
removeCount += 1
|
||||||
|
removeIndex -= 1
|
||||||
|
index -= 1
|
||||||
end while
|
end while
|
||||||
|
|
||||||
|
if removeCount > 0
|
||||||
|
contentNode.removeChildrenIndex(removeCount, removeIndex)
|
||||||
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function HandleFeedLoadErrorDialog(error as object, rowList as object)
|
function HandleFeedLoadErrorDialog(error as object, rowList as object) as void
|
||||||
error = ErrorUtils.Format(error)
|
error = ErrorUtils.Format(error)
|
||||||
LogError(error)
|
LogError(error)
|
||||||
rowList.onError = error
|
rowList.onError = error
|
||||||
|
if rowList.hasField("dispose") and rowList.dispose
|
||||||
|
return
|
||||||
|
end if
|
||||||
DialogUtils.ShowDialog(error, "Failed to load feed", true)
|
DialogUtils.ShowDialog(error, "Failed to load feed", true)
|
||||||
end function
|
end function
|
||||||
@@ -4,6 +4,8 @@ function Init()
|
|||||||
' We keep in memory the last videos we watched, to avoid a loop
|
' 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
|
' Sometimes recommended videos point to each other, and we're stuck watching
|
||||||
' The same 2 videos over and over again
|
' The same 2 videos over and over again
|
||||||
|
|
||||||
|
' TODO:P1 get rid of `watchedVideos` and use the PlayQueue instead
|
||||||
m.watchedVideos = new RingBuffer(100)
|
m.watchedVideos = new RingBuffer(100)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -185,8 +185,18 @@ function OnVideoPlayerStateChange() as void
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
if state = "finished"
|
if state = "finished"
|
||||||
metadata = content?.metadata
|
if content = invalid
|
||||||
if not PlayNext(metadata?.recommendedVideos)
|
m.container@.watchedVideosClear(invalid)
|
||||||
|
VideoUtils.CloseVideo()
|
||||||
|
end if
|
||||||
|
|
||||||
|
metadata = content.metadata
|
||||||
|
if metadata = invalid
|
||||||
|
m.container@.watchedVideosClear(invalid)
|
||||||
|
VideoUtils.CloseVideo()
|
||||||
|
end if
|
||||||
|
|
||||||
|
if not PlayNext(metadata.recommendedVideos)
|
||||||
m.container@.watchedVideosClear(invalid)
|
m.container@.watchedVideosClear(invalid)
|
||||||
VideoUtils.CloseVideo()
|
VideoUtils.CloseVideo()
|
||||||
end if
|
end if
|
||||||
@@ -221,6 +231,7 @@ function PlayNext(recommendedVideos as object) as boolean
|
|||||||
return PlayNextRecommendedVideo(recommendedVideos)
|
return PlayNextRecommendedVideo(recommendedVideos)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' TODO:P2 move this to the play queue
|
||||||
function PlayNextRecommendedVideo(recommendedVideos as object) as boolean
|
function PlayNextRecommendedVideo(recommendedVideos as object) as boolean
|
||||||
if m.preferences["playback.autoplay"] <> true
|
if m.preferences["playback.autoplay"] <> true
|
||||||
return false
|
return false
|
||||||
@@ -231,14 +242,18 @@ function PlayNextRecommendedVideo(recommendedVideos as object) as boolean
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
for each metadata in recommendedVideos
|
for each metadata in recommendedVideos
|
||||||
videoId = metadata?.videoId
|
if metadata = invalid
|
||||||
|
continue for
|
||||||
|
end if
|
||||||
|
videoId = metadata.videoId
|
||||||
if videoId = invalid
|
if videoId = invalid
|
||||||
continue for
|
continue for
|
||||||
end if
|
end if
|
||||||
if not m.container@.watchedVideosContain(videoId)
|
if not m.container@.watchedVideosContain(videoId)
|
||||||
LogInfo(`Playing next recommended video (${videoId})`)
|
LogInfo(`Playing next recommended video (${videoId})`)
|
||||||
node = InvidiousContent.ToVideoContentNode(invalid, metadata, invalid)
|
instance = m.invidious@.GetCurrentInstance(invalid)
|
||||||
VideoUtils.PlayVideo(node)
|
node = InvidiousContent.ToVideoContentNode(invalid, metadata, instance)
|
||||||
|
m.playQueue@.Play(node, -1)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
|
|||||||
@@ -85,32 +85,37 @@ namespace VideoUtils
|
|||||||
return GetVideoPlayer() <> invalid
|
return GetVideoPlayer() <> invalid
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function PauseVideo() as void
|
function PauseVideo() as boolean
|
||||||
player = GetVideoPlayer()
|
player = GetVideoPlayer()
|
||||||
if player = invalid
|
if player = invalid
|
||||||
return
|
return false
|
||||||
end if
|
end if
|
||||||
player.control = "pause"
|
player.control = "pause"
|
||||||
|
return true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ResumeVideo() as void
|
function ResumeVideo() as boolean
|
||||||
player = GetVideoPlayer()
|
player = GetVideoPlayer()
|
||||||
if player = invalid
|
if player = invalid
|
||||||
return
|
return false
|
||||||
end if
|
end if
|
||||||
player.control = "resume"
|
player.control = "resume"
|
||||||
|
return true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function TogglePause() as void
|
function TogglePause() as boolean
|
||||||
player = GetVideoPlayer()
|
player = GetVideoPlayer()
|
||||||
if player = invalid
|
if player = invalid
|
||||||
return
|
return false
|
||||||
end if
|
end if
|
||||||
if player.state = "playing"
|
if player.state = "playing"
|
||||||
player.control = "pause"
|
player.control = "pause"
|
||||||
|
return true
|
||||||
else if player.state = "paused"
|
else if player.state = "paused"
|
||||||
player.control = "resume"
|
player.control = "resume"
|
||||||
|
return true
|
||||||
end if
|
end if
|
||||||
|
return false
|
||||||
end function
|
end function
|
||||||
|
|
||||||
end namespace
|
end namespace
|
||||||
|
|||||||
@@ -53,26 +53,37 @@ namespace Http
|
|||||||
response = context.response
|
response = context.response
|
||||||
invidiousNode = context.server.task.invidious
|
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
|
token = invidiousNode.authToken
|
||||||
if token = invalid
|
if token = invalid
|
||||||
response.Default(403, "No token, not logged in")
|
response.Default(403, "No token, not logged in")
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
feedSource = request.query["feed-source"]
|
||||||
|
if feedSource = invalid
|
||||||
|
response.Default(400, "Expected feed-source")
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
feedSource = ParseJson(feedSource)
|
feedSource = ParseJson(feedSource)
|
||||||
|
if feedSource = invalid
|
||||||
|
response.Default(400, "Expected valid JSON for feed-source")
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
invService = new Invidious.InvidiousService(invidiousNode)
|
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
|
if not invResponse.success
|
||||||
response.Default(500, `Failed to make request: ${invResponse.error}`)
|
response.Default(500, `Failed to make request: ${invResponse.error}`)
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
response.Json(invResponse.result)
|
response.Json(invResponse.result)
|
||||||
return true
|
return true
|
||||||
end function)
|
end function)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import "pkg:/source/services/SearchHistory.bs"
|
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||||
|
|
||||||
namespace Http
|
namespace Http
|
||||||
|
|
||||||
@@ -9,13 +9,18 @@ namespace Http
|
|||||||
|
|
||||||
m.Get("/api/search-history", function(context as object) as boolean
|
m.Get("/api/search-history", function(context as object) as boolean
|
||||||
response = context.response
|
response = context.response
|
||||||
response.Json(SearchHistory.GetAllSaved())
|
task = context.server.task
|
||||||
|
preferences = task.preferences
|
||||||
|
|
||||||
|
response.Json(SearchHistoryUtils.GetAllSaved(preferences))
|
||||||
return true
|
return true
|
||||||
end function)
|
end function)
|
||||||
|
|
||||||
m.Put("/api/search-history", function(context as object) as boolean
|
m.Put("/api/search-history", function(context as object) as boolean
|
||||||
request = context.request
|
request = context.request
|
||||||
response = context.response
|
response = context.response
|
||||||
|
task = context.server.task
|
||||||
|
preferences = task.preferences
|
||||||
|
|
||||||
payload = request.Json()
|
payload = request.Json()
|
||||||
if payload = invalid
|
if payload = invalid
|
||||||
@@ -29,15 +34,15 @@ namespace Http
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
SearchHistory.Save(query)
|
SearchHistoryUtils.Save(preferences, query)
|
||||||
response.Json(SearchHistory.GetAllSaved())
|
response.Json(SearchHistoryUtils.GetAllSaved(preferences))
|
||||||
return true
|
return true
|
||||||
end function)
|
end function)
|
||||||
|
|
||||||
m.Delete("/api/search-history", function(context as object) as boolean
|
m.Delete("/api/search-history", function(context as object) as boolean
|
||||||
response = context.response
|
response = context.response
|
||||||
|
|
||||||
SearchHistory.Clear()
|
SearchHistoryUtils.Clear()
|
||||||
response.Default(204, "OK")
|
response.Default(204, "OK")
|
||||||
return true
|
return true
|
||||||
end function)
|
end function)
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="Disposable" extends="Group">
|
||||||
|
<interface>
|
||||||
|
<field id="dispose" type="boolean" alwaysNotify="true" onChange="OnDispose" />
|
||||||
|
</interface>
|
||||||
|
</component>
|
||||||
@@ -142,6 +142,7 @@ channel_info:
|
|||||||
url: /api/v1/channels/{ucid}
|
url: /api/v1/channels/{ucid}
|
||||||
responseHandler: ChannelInfoHandler
|
responseHandler: ChannelInfoHandler
|
||||||
cacheSeconds: 259200 # 3 days
|
cacheSeconds: 259200 # 3 days
|
||||||
|
tryCount: 3
|
||||||
|
|
||||||
# Channel endpoints
|
# Channel endpoints
|
||||||
channel_videos:
|
channel_videos:
|
||||||
@@ -149,6 +150,7 @@ channel_videos:
|
|||||||
url: /api/v1/channels/{ucid}/videos
|
url: /api/v1/channels/{ucid}/videos
|
||||||
responseHandler: ChannelVideosHandler
|
responseHandler: ChannelVideosHandler
|
||||||
paginationType: Continuation
|
paginationType: Continuation
|
||||||
|
tryCount: 3
|
||||||
queryParams:
|
queryParams:
|
||||||
sort_by:
|
sort_by:
|
||||||
# defaults to newest
|
# defaults to newest
|
||||||
@@ -162,6 +164,7 @@ channel_playlists:
|
|||||||
url: /api/v1/channels/{ucid}/playlists
|
url: /api/v1/channels/{ucid}/playlists
|
||||||
responseHandler: ChannelPlaylistsHandler
|
responseHandler: ChannelPlaylistsHandler
|
||||||
paginationType: Continuation
|
paginationType: Continuation
|
||||||
|
tryCount: 3
|
||||||
queryParams:
|
queryParams:
|
||||||
sort_by:
|
sort_by:
|
||||||
required: false
|
required: false
|
||||||
@@ -175,21 +178,25 @@ channel_shorts:
|
|||||||
url: /api/v1/channels/{ucid}/shorts
|
url: /api/v1/channels/{ucid}/shorts
|
||||||
responseHandler: ChannelVideosHandler
|
responseHandler: ChannelVideosHandler
|
||||||
paginationType: Continuation
|
paginationType: Continuation
|
||||||
|
tryCount: 3
|
||||||
|
|
||||||
channel_streams:
|
channel_streams:
|
||||||
title: Channel streams
|
title: Channel streams
|
||||||
url: /api/v1/channels/{ucid}/streams
|
url: /api/v1/channels/{ucid}/streams
|
||||||
responseHandler: ChannelVideosHandler
|
responseHandler: ChannelVideosHandler
|
||||||
paginationType: Continuation
|
paginationType: Continuation
|
||||||
|
tryCount: 3
|
||||||
|
|
||||||
channel_podcasts:
|
channel_podcasts:
|
||||||
title: Channel podcasts
|
title: Channel podcasts
|
||||||
url: /api/v1/channels/{ucid}/podcasts
|
url: /api/v1/channels/{ucid}/podcasts
|
||||||
responseHandler: ChannelPlaylistsHandler
|
responseHandler: ChannelPlaylistsHandler
|
||||||
paginationType: Continuation
|
paginationType: Continuation
|
||||||
|
tryCount: 3
|
||||||
|
|
||||||
channel_channels:
|
channel_channels:
|
||||||
title: Related channels
|
title: Related channels
|
||||||
url: /api/v1/channels/{ucid}/channels
|
url: /api/v1/channels/{ucid}/channels
|
||||||
responseHandler: ChannelRelatedChannelsHandler
|
responseHandler: ChannelRelatedChannelsHandler
|
||||||
paginationType: Continuation
|
paginationType: Continuation
|
||||||
|
tryCount: 3
|
||||||
@@ -98,6 +98,13 @@
|
|||||||
key: "search_history",
|
key: "search_history",
|
||||||
description: "Search history preferences",
|
description: "Search history preferences",
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
displayText: "Enable search history",
|
||||||
|
key: "search_history.enabled",
|
||||||
|
description: "Enable search history",
|
||||||
|
type: "boolean",
|
||||||
|
defaultValue: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayText: "Clear Search History",
|
displayText: "Clear Search History",
|
||||||
key: "search_history.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,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
@@ -2,7 +2,7 @@ title=PlayletLib
|
|||||||
|
|
||||||
# Do not update version manually, it is auto updated from package.json
|
# Do not update version manually, it is auto updated from package.json
|
||||||
major_version=0
|
major_version=0
|
||||||
minor_version=14
|
minor_version=17
|
||||||
build_version=00000
|
build_version=00000
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
|
|||||||
@@ -40,12 +40,28 @@ namespace HttpClient
|
|||||||
return (new HttpRequest()).Method("HEAD").Url(url)
|
return (new HttpRequest()).Method("HEAD").Url(url)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function FromObject(obj as object) as HttpRequest
|
||||||
|
request = new HttpRequest()
|
||||||
|
|
||||||
|
for each key in obj
|
||||||
|
if IsFunction(request[key])
|
||||||
|
request[key](obj[key])
|
||||||
|
else
|
||||||
|
throw `Invalid key: "${key}" in object passed to HttpClient.FromObject`
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
|
||||||
|
return request
|
||||||
|
end function
|
||||||
|
|
||||||
class HttpRequest
|
class HttpRequest
|
||||||
|
|
||||||
public urlTransfer as object
|
public urlTransfer as object
|
||||||
|
|
||||||
function new()
|
function new()
|
||||||
m._timeoutSeconds = 30
|
m._timeoutSeconds = 30
|
||||||
|
m._tryCount = 1
|
||||||
|
m._method = "GET"
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function Method(method as string) as HttpRequest
|
function Method(method as string) as HttpRequest
|
||||||
@@ -141,6 +157,14 @@ namespace HttpClient
|
|||||||
return m
|
return m
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function TryCount(tryCount as integer) as HttpRequest
|
||||||
|
m._tryCount = ValidInt(tryCount)
|
||||||
|
if m._tryCount < 1
|
||||||
|
m._tryCount = 1
|
||||||
|
end if
|
||||||
|
return m
|
||||||
|
end function
|
||||||
|
|
||||||
function NoCache() as HttpRequest
|
function NoCache() as HttpRequest
|
||||||
m._noCache = true
|
m._noCache = true
|
||||||
return m
|
return m
|
||||||
@@ -163,6 +187,7 @@ namespace HttpClient
|
|||||||
command = `curl "${m.BuildUrl()}"`
|
command = `curl "${m.BuildUrl()}"`
|
||||||
command += ` \\\n -X ${m._method}`
|
command += ` \\\n -X ${m._method}`
|
||||||
command += ` \\\n --max-time ${m._timeoutSeconds}`
|
command += ` \\\n --max-time ${m._timeoutSeconds}`
|
||||||
|
command += ` \\\n --compressed`
|
||||||
|
|
||||||
if m._headers <> invalid
|
if m._headers <> invalid
|
||||||
for each key in m._headers
|
for each key in m._headers
|
||||||
@@ -177,15 +202,9 @@ namespace HttpClient
|
|||||||
return command
|
return command
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' Note: Calling Send() only without Await() will not guarentee a request will be sent.
|
||||||
|
' If a Task finishes before the request is sent, the request might be dropped.
|
||||||
function Send() as HttpRequest
|
function Send() as HttpRequest
|
||||||
return m.DoSend(false)
|
|
||||||
end function
|
|
||||||
|
|
||||||
function SendAndForget() as HttpRequest
|
|
||||||
return m.DoSend(true)
|
|
||||||
end function
|
|
||||||
|
|
||||||
private function DoSend(forget as boolean) as HttpRequest
|
|
||||||
if m.urlTransfer <> invalid or m._cache <> invalid
|
if m.urlTransfer <> invalid or m._cache <> invalid
|
||||||
return m
|
return m
|
||||||
end if
|
end if
|
||||||
@@ -214,9 +233,7 @@ namespace HttpClient
|
|||||||
m.urlTransfer.SetHeaders(m._headers)
|
m.urlTransfer.SetHeaders(m._headers)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if not forget
|
|
||||||
m.urlTransfer.SetMessagePort(CreateObject("roMessagePort"))
|
m.urlTransfer.SetMessagePort(CreateObject("roMessagePort"))
|
||||||
end if
|
|
||||||
|
|
||||||
LogInfo("Sending", m._method, m.urlTransfer.GetURL(), "ID:", m.urlTransfer.GetIdentity())
|
LogInfo("Sending", m._method, m.urlTransfer.GetURL(), "ID:", m.urlTransfer.GetIdentity())
|
||||||
|
|
||||||
@@ -225,14 +242,22 @@ namespace HttpClient
|
|||||||
#end if
|
#end if
|
||||||
|
|
||||||
if m._method = "POST"
|
if m._method = "POST"
|
||||||
m._sent = m.urlTransfer.AsyncPostFromString(m._body)
|
body = m._body
|
||||||
|
if body = invalid
|
||||||
|
body = ""
|
||||||
|
end if
|
||||||
|
m._sent = m.urlTransfer.AsyncPostFromString(body)
|
||||||
else if m._method = "GET"
|
else if m._method = "GET"
|
||||||
m._sent = m.urlTransfer.AsyncGetToString()
|
m._sent = m.urlTransfer.AsyncGetToString()
|
||||||
else if m._method = "HEAD"
|
else if m._method = "HEAD"
|
||||||
m._sent = m.urlTransfer.AsyncHead()
|
m._sent = m.urlTransfer.AsyncHead()
|
||||||
else
|
else
|
||||||
m.urlTransfer.SetRequest(m._method)
|
m.urlTransfer.SetRequest(m._method)
|
||||||
m._sent = m.urlTransfer.AsyncPostFromString(m._body)
|
body = m._body
|
||||||
|
if body = invalid
|
||||||
|
body = ""
|
||||||
|
end if
|
||||||
|
m._sent = m.urlTransfer.AsyncPostFromString(body)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if m._sent <> true
|
if m._sent <> true
|
||||||
@@ -259,6 +284,37 @@ namespace HttpClient
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function Await() as HttpResponse
|
function Await() as HttpResponse
|
||||||
|
triesLeft = m._tryCount
|
||||||
|
response = invalid
|
||||||
|
|
||||||
|
response = m.AwaitInternal()
|
||||||
|
if response.IsSuccess() or response.TimedOut() or response.IsCancelled() or response.StatusCode() < 500
|
||||||
|
return response
|
||||||
|
end if
|
||||||
|
triesLeft -= 1
|
||||||
|
|
||||||
|
while triesLeft > 0
|
||||||
|
backoffMs = 1000 + Rnd(2000)
|
||||||
|
tryNumber = m._tryCount - triesLeft + 1
|
||||||
|
LogInfo("Request failed ID:", m.urlTransfer.GetIdentity(), "ErrorMessage:", response.ErrorMessage(), `\nRetrying: (`, tryNumber, "/", m._tryCount, ") in", backoffMs, "ms")
|
||||||
|
|
||||||
|
m.urlTransfer = invalid
|
||||||
|
m._cache = invalid
|
||||||
|
m._sent = invalid
|
||||||
|
|
||||||
|
sleep(backoffMs)
|
||||||
|
|
||||||
|
response = m.AwaitInternal()
|
||||||
|
if response.IsSuccess() or response.TimedOut() or response.IsCancelled() or response.StatusCode() < 500
|
||||||
|
return response
|
||||||
|
end if
|
||||||
|
triesLeft -= 1
|
||||||
|
end while
|
||||||
|
|
||||||
|
return response
|
||||||
|
end function
|
||||||
|
|
||||||
|
private function AwaitInternal() as HttpResponse
|
||||||
if m.urlTransfer = invalid and m._cache = invalid
|
if m.urlTransfer = invalid and m._cache = invalid
|
||||||
m.Send()
|
m.Send()
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
function DisposableObserveField(node as object, field as string, callback as string)
|
||||||
|
node.ObserveField(field, callback)
|
||||||
|
|
||||||
|
if m._disposableObserveFields = invalid
|
||||||
|
m._disposableObserveFields = []
|
||||||
|
end if
|
||||||
|
m._disposableObserveFields.push({
|
||||||
|
node: node,
|
||||||
|
field: field
|
||||||
|
})
|
||||||
|
end function
|
||||||
|
|
||||||
|
function DisposableObserveFieldScoped(node as object, field as string, callback as string)
|
||||||
|
node.ObserveFieldScoped(field, callback)
|
||||||
|
|
||||||
|
if m._disposableObserveFieldsScoped = invalid
|
||||||
|
m._disposableObserveFieldsScoped = []
|
||||||
|
end if
|
||||||
|
m._disposableObserveFieldsScoped.push({
|
||||||
|
node: node,
|
||||||
|
field: field
|
||||||
|
})
|
||||||
|
end function
|
||||||
|
|
||||||
|
function DisposeObservers()
|
||||||
|
if m._disposableObserveFields <> invalid
|
||||||
|
for each item in m._disposableObserveFields
|
||||||
|
item.node.UnobserveField(item.field)
|
||||||
|
next
|
||||||
|
m._disposableObserveFields = invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
if m._disposableObserveFieldsScoped <> invalid
|
||||||
|
for each item in m._disposableObserveFieldsScoped
|
||||||
|
item.node.UnobserveFieldScoped(item.field)
|
||||||
|
next
|
||||||
|
m._disposableObserveFieldsScoped = invalid
|
||||||
|
end if
|
||||||
|
end function
|
||||||
@@ -22,6 +22,10 @@ function IsDouble(obj as dynamic) as boolean
|
|||||||
return obj <> invalid and GetInterface(obj, "ifDouble") <> invalid
|
return obj <> invalid and GetInterface(obj, "ifDouble") <> invalid
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function IsFunction(obj as dynamic) as boolean
|
||||||
|
return obj <> invalid and GetInterface(obj, "ifFunction") <> invalid
|
||||||
|
end function
|
||||||
|
|
||||||
function ValidString(obj as object) as string
|
function ValidString(obj as object) as string
|
||||||
if obj <> invalid and GetInterface(obj, "ifString") <> invalid
|
if obj <> invalid and GetInterface(obj, "ifString") <> invalid
|
||||||
return obj
|
return obj
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^2.4.6",
|
"@sveltejs/vite-plugin-svelte": "^2.4.6",
|
||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"@tsconfig/svelte": "^5.0.2",
|
"@tsconfig/svelte": "^5.0.2",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"daisyui": "^3.9.2",
|
"daisyui": "^3.9.4",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"svelte": "^4.2.1",
|
"svelte": "^4.2.2",
|
||||||
"svelte-check": "^3.5.2",
|
"svelte-check": "^3.5.2",
|
||||||
"svelte-preprocess": "^5.0.4",
|
"svelte-preprocess": "^5.0.4",
|
||||||
"tailwindcss": "^3.3.3",
|
"tailwindcss": "^3.3.5",
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"vite": "^4.4.11",
|
"vite": "^4.5.0",
|
||||||
"vite-tsconfig-paths": "^4.2.1"
|
"vite-tsconfig-paths": "^4.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -876,9 +876,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/daisyui": {
|
"node_modules/daisyui": {
|
||||||
"version": "3.9.2",
|
"version": "3.9.4",
|
||||||
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-3.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-3.9.4.tgz",
|
||||||
"integrity": "sha512-yJZ1QjHUaL+r9BkquTdzNHb7KIgAJVFh0zbOXql2Wu0r7zx5qZNLxclhjN0WLoIpY+o2h/8lqXg7ijj8oTigOw==",
|
"integrity": "sha512-fvi2RGH4YV617/6DntOVGcOugOPym9jTGWW2XySb5ZpvdWO4L7bEG77VHirrnbRUEWvIEVXkBpxUz2KFj0rVnA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"colord": "^2.9",
|
"colord": "^2.9",
|
||||||
@@ -1031,9 +1031,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fast-glob": {
|
"node_modules/fast-glob": {
|
||||||
"version": "3.2.12",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
|
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
|
||||||
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
|
"integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nodelib/fs.stat": "^2.0.2",
|
"@nodelib/fs.stat": "^2.0.2",
|
||||||
@@ -1278,9 +1278,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jiti": {
|
"node_modules/jiti": {
|
||||||
"version": "1.18.2",
|
"version": "1.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz",
|
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
|
||||||
"integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==",
|
"integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"jiti": "bin/jiti.js"
|
"jiti": "bin/jiti.js"
|
||||||
@@ -1335,9 +1335,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/magic-string": {
|
"node_modules/magic-string": {
|
||||||
"version": "0.30.3",
|
"version": "0.30.5",
|
||||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.3.tgz",
|
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
|
||||||
"integrity": "sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==",
|
"integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.15"
|
"@jridgewell/sourcemap-codec": "^1.4.15"
|
||||||
@@ -1984,9 +1984,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/svelte": {
|
"node_modules/svelte": {
|
||||||
"version": "4.2.1",
|
"version": "4.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.2.tgz",
|
||||||
"integrity": "sha512-LpLqY2Jr7cRxkrTc796/AaaoMLF/1ax7cto8Ot76wrvKQhrPmZ0JgajiWPmg9mTSDqO16SSLiD17r9MsvAPTmw==",
|
"integrity": "sha512-My2tytF2e2NnHSpn2M7/3VdXT4JdTglYVUuSuK/mXL2XtulPYbeBfl8Dm1QiaKRn0zoULRnL+EtfZHHP0k4H3A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ampproject/remapping": "^2.2.1",
|
"@ampproject/remapping": "^2.2.1",
|
||||||
@@ -2000,7 +2000,7 @@
|
|||||||
"estree-walker": "^3.0.3",
|
"estree-walker": "^3.0.3",
|
||||||
"is-reference": "^3.0.1",
|
"is-reference": "^3.0.1",
|
||||||
"locate-character": "^3.0.0",
|
"locate-character": "^3.0.0",
|
||||||
"magic-string": "^0.30.0",
|
"magic-string": "^0.30.4",
|
||||||
"periscopic": "^3.1.0"
|
"periscopic": "^3.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -2122,9 +2122,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/tailwindcss": {
|
"node_modules/tailwindcss": {
|
||||||
"version": "3.3.3",
|
"version": "3.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
|
||||||
"integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==",
|
"integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alloc/quick-lru": "^5.2.0",
|
"@alloc/quick-lru": "^5.2.0",
|
||||||
@@ -2132,10 +2132,10 @@
|
|||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"didyoumean": "^1.2.2",
|
"didyoumean": "^1.2.2",
|
||||||
"dlv": "^1.1.3",
|
"dlv": "^1.1.3",
|
||||||
"fast-glob": "^3.2.12",
|
"fast-glob": "^3.3.0",
|
||||||
"glob-parent": "^6.0.2",
|
"glob-parent": "^6.0.2",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
"jiti": "^1.18.2",
|
"jiti": "^1.19.1",
|
||||||
"lilconfig": "^2.1.0",
|
"lilconfig": "^2.1.0",
|
||||||
"micromatch": "^4.0.5",
|
"micromatch": "^4.0.5",
|
||||||
"normalize-path": "^3.0.0",
|
"normalize-path": "^3.0.0",
|
||||||
@@ -2285,9 +2285,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "4.4.11",
|
"version": "4.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz",
|
||||||
"integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==",
|
"integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.18.10",
|
"esbuild": "^0.18.10",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.14.0",
|
"version": "0.17.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@@ -13,17 +13,17 @@
|
|||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"@tsconfig/svelte": "^5.0.2",
|
"@tsconfig/svelte": "^5.0.2",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"daisyui": "^3.9.2",
|
"daisyui": "^3.9.4",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"svelte": "^4.2.1",
|
"svelte": "^4.2.2",
|
||||||
"svelte-check": "^3.5.2",
|
"svelte-check": "^3.5.2",
|
||||||
"svelte-preprocess": "^5.0.4",
|
"svelte-preprocess": "^5.0.4",
|
||||||
"tailwindcss": "^3.3.3",
|
"tailwindcss": "^3.3.5",
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"vite": "^4.4.11",
|
"vite": "^4.5.0",
|
||||||
"vite-tsconfig-paths": "^4.2.1"
|
"vite-tsconfig-paths": "^4.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
import InfoScreen from "lib/Screens/InfoScreen.svelte";
|
import InfoScreen from "lib/Screens/InfoScreen.svelte";
|
||||||
import LinkDragDrop from "lib/LinkDragDrop.svelte";
|
import LinkDragDrop from "lib/LinkDragDrop.svelte";
|
||||||
import BookmarksScreen from "lib/Screens/BookmarksScreen.svelte";
|
import BookmarksScreen from "lib/Screens/BookmarksScreen.svelte";
|
||||||
|
import RemoteControlScreen from "lib/Screens/RemoteControlScreen.svelte";
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
PlayletApi.getState().then((value) => {
|
PlayletApi.getState().then((value) => {
|
||||||
@@ -71,6 +72,8 @@
|
|||||||
|
|
||||||
<SettingsScreen visibility={currentScreen == "settings"} />
|
<SettingsScreen visibility={currentScreen == "settings"} />
|
||||||
|
|
||||||
|
<RemoteControlScreen visibility={currentScreen == "remote"} />
|
||||||
|
|
||||||
<InfoScreen visibility={currentScreen == "info"} />
|
<InfoScreen visibility={currentScreen == "info"} />
|
||||||
</div>
|
</div>
|
||||||
<BottomNavigation />
|
<BottomNavigation />
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<svg
|
||||||
|
width="24px"
|
||||||
|
height="24px"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
version="1.1"
|
||||||
|
id="svg27"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<g class="fill-current">
|
||||||
|
<path
|
||||||
|
d="M 17.101562 0 L 6.898438 0 C 5.722656 0 4.765625 0.957031 4.765625 2.132812 L 4.765625 21.867188 C 4.765625 23.042969 5.722656 24 6.898438 24 L 17.101562 24 C 18.277344 24 19.234375 23.042969 19.234375 21.867188 L 19.234375 2.132812 C 19.234375 0.957031 18.277344 0 17.101562 0 Z M 17.8125 21.867188 C 17.8125 22.257812 17.492188 22.578125 17.101562 22.578125 L 6.898438 22.578125 C 6.507812 22.578125 6.1875 22.257812 6.1875 21.867188 L 6.1875 2.132812 C 6.1875 1.742188 6.507812 1.421875 6.898438 1.421875 L 17.101562 1.421875 C 17.492188 1.421875 17.8125 1.742188 17.8125 2.132812 Z M 17.8125 21.867188 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 10.375 13.164062 L 8.863281 13.164062 C 8.472656 13.164062 8.152344 13.484375 8.152344 13.875 C 8.152344 14.269531 8.472656 14.585938 8.863281 14.585938 L 10.375 14.585938 C 10.769531 14.585938 11.085938 14.269531 11.085938 13.875 C 11.085938 13.484375 10.769531 13.164062 10.375 13.164062 Z M 10.375 13.164062 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 10.375 16.105469 L 8.863281 16.105469 C 8.472656 16.105469 8.152344 16.425781 8.152344 16.816406 C 8.152344 17.210938 8.472656 17.527344 8.863281 17.527344 L 10.375 17.527344 C 10.769531 17.527344 11.085938 17.210938 11.085938 16.816406 C 11.085938 16.425781 10.769531 16.105469 10.375 16.105469 Z M 10.375 16.105469 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 10.375 19.046875 L 8.863281 19.046875 C 8.472656 19.046875 8.152344 19.367188 8.152344 19.757812 C 8.152344 20.152344 8.472656 20.46875 8.863281 20.46875 L 10.375 20.46875 C 10.769531 20.46875 11.085938 20.152344 11.085938 19.757812 C 11.085938 19.367188 10.769531 19.046875 10.375 19.046875 Z M 10.375 19.046875 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 15.136719 13.164062 L 13.625 13.164062 C 13.230469 13.164062 12.914062 13.484375 12.914062 13.875 C 12.914062 14.269531 13.230469 14.585938 13.625 14.585938 L 15.136719 14.585938 C 15.527344 14.585938 15.847656 14.269531 15.847656 13.875 C 15.847656 13.484375 15.527344 13.164062 15.136719 13.164062 Z M 15.136719 13.164062 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 15.136719 16.105469 L 13.625 16.105469 C 13.230469 16.105469 12.914062 16.425781 12.914062 16.816406 C 12.914062 17.210938 13.230469 17.527344 13.625 17.527344 L 15.136719 17.527344 C 15.527344 17.527344 15.847656 17.210938 15.847656 16.816406 C 15.847656 16.425781 15.527344 16.105469 15.136719 16.105469 Z M 15.136719 16.105469 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 15.136719 19.046875 L 13.625 19.046875 C 13.230469 19.046875 12.914062 19.367188 12.914062 19.757812 C 12.914062 20.152344 13.230469 20.46875 13.625 20.46875 L 15.136719 20.46875 C 15.527344 20.46875 15.847656 20.152344 15.847656 19.757812 C 15.847656 19.367188 15.527344 19.046875 15.136719 19.046875 Z M 15.136719 19.046875 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 11.246094 6.660156 C 10.929688 6.660156 10.675781 6.914062 10.675781 7.226562 C 10.675781 7.542969 10.929688 7.796875 11.246094 7.796875 L 12.753906 7.796875 C 13.070312 7.796875 13.324219 7.542969 13.324219 7.226562 C 13.324219 6.914062 13.070312 6.660156 12.753906 6.660156 Z M 11.246094 6.660156 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 10.914062 5.3125 C 11.0625 5.3125 11.207031 5.257812 11.316406 5.148438 L 12.027344 4.4375 L 12.683594 5.089844 C 12.902344 5.3125 13.265625 5.3125 13.488281 5.089844 C 13.710938 4.867188 13.710938 4.507812 13.488281 4.285156 L 12.496094 3.296875 C 12.238281 3.039062 11.816406 3.039062 11.558594 3.296875 L 10.511719 4.34375 C 10.289062 4.5625 10.289062 4.925781 10.511719 5.148438 C 10.625 5.257812 10.769531 5.3125 10.914062 5.3125 Z M 10.914062 5.3125 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 13.488281 9.308594 C 13.265625 9.085938 12.902344 9.085938 12.683594 9.308594 L 11.972656 10.019531 L 11.316406 9.363281 C 11.097656 9.140625 10.734375 9.140625 10.511719 9.363281 C 10.292969 9.585938 10.292969 9.945312 10.511719 10.167969 L 11.503906 11.160156 C 11.632812 11.289062 11.800781 11.351562 11.972656 11.351562 C 12.140625 11.351562 12.3125 11.289062 12.441406 11.160156 L 13.488281 10.113281 C 13.710938 9.890625 13.710938 9.53125 13.488281 9.308594 Z M 13.488281 9.308594 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 14.886719 5.742188 C 14.664062 5.519531 14.304688 5.519531 14.082031 5.742188 C 13.859375 5.960938 13.859375 6.324219 14.082031 6.546875 L 14.792969 7.253906 L 14.136719 7.910156 C 13.914062 8.132812 13.914062 8.492188 14.136719 8.714844 C 14.25 8.824219 14.394531 8.882812 14.539062 8.882812 C 14.683594 8.882812 14.832031 8.824219 14.941406 8.714844 L 15.929688 7.726562 C 16.191406 7.464844 16.191406 7.046875 15.929688 6.785156 Z M 14.886719 5.742188 "
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M 9.515625 8.882812 C 9.664062 8.882812 9.808594 8.824219 9.917969 8.714844 C 10.140625 8.492188 10.140625 8.132812 9.917969 7.910156 L 9.207031 7.199219 L 9.863281 6.546875 C 10.085938 6.324219 10.085938 5.964844 9.863281 5.742188 C 9.640625 5.519531 9.28125 5.519531 9.058594 5.742188 L 8.070312 6.730469 C 7.808594 6.988281 7.808594 7.410156 8.070312 7.667969 L 9.113281 8.714844 C 9.226562 8.824219 9.371094 8.882812 9.515625 8.882812 Z M 9.515625 8.882812 "
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.1 KiB |
@@ -0,0 +1,18 @@
|
|||||||
|
<svg
|
||||||
|
name="arrow-back"
|
||||||
|
class="ret-icon arrow-back remote-arrow-back"
|
||||||
|
width="14px"
|
||||||
|
height="14px"
|
||||||
|
viewBox="0 0 17 14"
|
||||||
|
><g
|
||||||
|
><g fill="#FFF" transform="translate(-183 -616)"
|
||||||
|
><g transform="translate(111 553)"
|
||||||
|
><g transform="translate(15 49)"
|
||||||
|
><path
|
||||||
|
d="M72.115 19.39l.025.006H61.433l3.366-3.374a.876.876 0 00.255-.622.874.874 0 00-.255-.62l-.524-.524a.868.868 0 00-.618-.256.868.868 0 00-.618.255l-5.77 5.77a.867.867 0 00-.255.619c0 .235.09.456.255.62l5.77 5.77a.868.868 0 00.618.255c.234 0 .454-.09.618-.255l.524-.524a.867.867 0 00.255-.618.84.84 0 00-.255-.606l-3.404-3.392h10.732a.907.907 0 00.887-.898v-.74c0-.483-.417-.866-.9-.866z"
|
||||||
|
/></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 744 B |
@@ -0,0 +1,12 @@
|
|||||||
|
<svg
|
||||||
|
name="arrow_down"
|
||||||
|
class="ret-icon arrow_down remote-arrow-down"
|
||||||
|
width="14px"
|
||||||
|
height="14px"
|
||||||
|
viewBox="0 0 18 12"
|
||||||
|
><polygon
|
||||||
|
fill="#FFF"
|
||||||
|
transform="translate(-68.000000, -1097.000000) translate(68.000000, 1097.000000) translate(9.000000, 5.928571) rotate(90.000000) translate(-9.000000, -5.928571) "
|
||||||
|
points="5.58223573 -3.07142857 3.5 -0.969991371 10.3355285 5.92857143 3.5 12.8252596 5.58223573 14.9285714 14.5 5.92857143"
|
||||||
|
/></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 461 B |
@@ -0,0 +1,12 @@
|
|||||||
|
<svg
|
||||||
|
name="arrow_left"
|
||||||
|
class="ret-icon arrow_left remote-arrow-down"
|
||||||
|
width="14px"
|
||||||
|
height="14px"
|
||||||
|
viewBox="0 0 13 18"
|
||||||
|
><polygon
|
||||||
|
fill="#FFF"
|
||||||
|
transform="translate(-426.000000, -1322.000000) translate(427.000000, 1322.000000) translate(5.500000, 9.000000) scale(-1, 1) translate(-5.500000, -9.000000) "
|
||||||
|
points="2.08223573 0 0 2.1014372 6.83552854 9 0 15.8966882 2.08223573 18 11 9"
|
||||||
|
/></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 413 B |
@@ -0,0 +1,12 @@
|
|||||||
|
<svg
|
||||||
|
name="arrow_right"
|
||||||
|
class="ret-icon arrow_right remote-arrow-down"
|
||||||
|
width="14px"
|
||||||
|
height="14px"
|
||||||
|
viewBox="0 0 13 18"
|
||||||
|
><polygon
|
||||||
|
fill="#FFF"
|
||||||
|
points="2.08223573 0 0 2.1014372 6.83552854 9 0 15.8966882 2.08223573 18 11 9"
|
||||||
|
transform="translate(-360.000000, -809.000000) translate(361.000000, 809.000000)"
|
||||||
|
/></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 337 B |
@@ -0,0 +1,12 @@
|
|||||||
|
<svg
|
||||||
|
name="arrow_up"
|
||||||
|
class="ret-icon arrow_up remote-arrow-down"
|
||||||
|
width="14px"
|
||||||
|
height="14px"
|
||||||
|
viewBox="0 0 18 12"
|
||||||
|
><polygon
|
||||||
|
fill="#FFF"
|
||||||
|
transform="translate(-423.000000, -1139.000000) translate(423.000000, 1139.000000) translate(9.000000, 6.071429) scale(1, -1) rotate(90.000000) translate(-9.000000, -6.071429) "
|
||||||
|
points="5.58223573 -2.92857143 3.5 -0.827134228 10.3355285 6.07142857 3.5 12.9681168 5.58223573 15.0714286 14.5 6.07142857"
|
||||||
|
/></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 472 B |
@@ -0,0 +1,16 @@
|
|||||||
|
<svg name="fast-forward-left" width="14px" height="14px" viewBox="0 0 21 15"
|
||||||
|
><g
|
||||||
|
><g fill="#FFF" transform="translate(-158 -886)"
|
||||||
|
><g transform="translate(111 553)"
|
||||||
|
><g transform="translate(15 49)"
|
||||||
|
><g transform="translate(0 270)"
|
||||||
|
><path
|
||||||
|
d="M51.919 20.73l-9.474-6.666a.35.35 0 00-.552.287v6.237l-9.272-6.52a.352.352 0 00-.553.287V27.68a.351.351 0 00.553.287l9.272-6.52v6.237a.351.351 0 00.552.287l9.474-6.667a.35.35 0 000-.573z"
|
||||||
|
transform="matrix(-1 0 0 1 84.136 0)"
|
||||||
|
/></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 614 B |
@@ -0,0 +1,15 @@
|
|||||||
|
<svg name="fast-forward-right" width="14px" height="14px" viewBox="0 0 21 15"
|
||||||
|
><g
|
||||||
|
><g fill="#FFF" transform="translate(-344 -886)"
|
||||||
|
><g transform="translate(111 553)"
|
||||||
|
><g transform="translate(15 49)"
|
||||||
|
><g transform="translate(185.1 270)"
|
||||||
|
><path
|
||||||
|
d="M53.449 20.73l-9.474-6.666a.35.35 0 00-.553.287v6.237l-9.272-6.52a.352.352 0 00-.552.287V27.68a.351.351 0 00.552.287l9.272-6.52v6.237a.351.351 0 00.553.287l9.474-6.667a.35.35 0 000-.573z"
|
||||||
|
/></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 567 B |
@@ -0,0 +1,20 @@
|
|||||||
|
<svg
|
||||||
|
name="home"
|
||||||
|
class="ret-icon home remote-home"
|
||||||
|
width="14px"
|
||||||
|
height="14px"
|
||||||
|
viewBox="0 0 16 14"
|
||||||
|
><g
|
||||||
|
><g fill="#FFF" transform="translate(-323 -615)"
|
||||||
|
><g transform="translate(111 553)"
|
||||||
|
><g transform="translate(15 49)"
|
||||||
|
><g transform="translate(139.972)"
|
||||||
|
><path
|
||||||
|
d="M59.0141643 27L64.013762 27 64.013762 23 66.0141643 23 66.0141643 27 71.0143655 27 71.0143655 21 73.0141643 21 65.0143655 13 57.0141643 21 59.0141643 21z"
|
||||||
|
/></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 562 B |
@@ -0,0 +1,15 @@
|
|||||||
|
<svg name="repeat" width="15px" height="15px" viewBox="0 0 16 17" version="1.1">
|
||||||
|
<g transform="matrix(-1,0,0,1,16.794,0)">
|
||||||
|
<g fill="#FFF" transform="translate(-183,-830)" id="g10">
|
||||||
|
<g transform="translate(111,553)" id="g8">
|
||||||
|
<g transform="translate(15,49)" id="g6">
|
||||||
|
<g transform="translate(0,216)" id="g4">
|
||||||
|
<path
|
||||||
|
d="m 57.887742,20.527863 c -0.01443,-4.135974 3.340802,-7.511707 7.475774,-7.52614 4.134976,-0.01444 7.513698,3.337791 7.528138,7.473764 10e-4,0.274999 -0.01404,0.552055 -0.04411,0.828162 l 1.211993,-0.0042 c 0.156,-4.77e-4 0.298335,0.09496 0.358829,0.236747 a 0.393,0.393 0 0 1 -0.08553,0.423301 l -2.653708,2.667279 a 0.385,0.385 0 0 1 -0.545994,0.0019 L 68.45488,21.98201 a 0.392,0.392 0 0 1 -0.08548,-0.424706 0.392,0.392 0 0 1 0.356171,-0.239241 l 1.34499,-0.0047 a 4.757,4.757 0 0 0 -4.69745,-5.563635 4.759,4.759 0 0 0 -4.735383,4.768557 c 0.0091,2.619984 2.150567,4.742521 4.768552,4.733384 0.212996,-6.83e-4 0.387608,0.172645 0.388357,0.387644 l 0.0069,1.972989 c 7.66e-4,0.213998 -0.172644,0.388607 -0.385644,0.38935 -4.134973,0.01444 -7.513706,-3.340793 -7.528134,-7.473769 z"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<span class="font-semibold text-sm select-none">OK</span>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<svg name="asterisc" width="14px" height="14px" viewBox="0 0 16 17"
|
||||||
|
><g
|
||||||
|
><g fill="#FFF" transform="translate(-323 -830)"
|
||||||
|
><g transform="translate(111 553)"
|
||||||
|
><g transform="translate(15 49)"
|
||||||
|
><g transform="translate(139.972 216)"
|
||||||
|
><path
|
||||||
|
d="M72.132 17.016c0 .738-.864 1.46-2.59 2.166-1.743.707-2.63 1.123-2.661 1.248-.032.173.8.55 2.496 1.13 1.68.597 2.52 1.327 2.52 2.19 0 .22-.048.448-.142.683-.267.707-.683 1.06-1.248 1.06-.33 0-.726-.134-1.19-.4-.462-.267-1.016-.66-1.66-1.178-1.145-.957-1.789-1.381-1.93-1.271-.063.047-.094.164-.094.353 0 .157.07.69.211 1.601.142.926.212 1.64.212 2.143 0 1.444-.51 2.19-1.53 2.237-1.1.016-1.649-.714-1.649-2.19 0-.251.02-.557.06-.918.039-.361.097-.77.176-1.225.173-.957.259-1.523.259-1.695 0-.22-.055-.37-.165-.448-.173-.125-.761.306-1.766 1.295-1.115 1.1-2.033 1.649-2.755 1.649-.361 0-.707-.118-1.036-.353-.346-.267-.518-.55-.518-.848 0-.644.832-1.42 2.496-2.331 1.648-.91 2.457-1.452 2.425-1.625-.015-.283-.824-.683-2.425-1.201s-2.402-1.209-2.402-2.072c0-.267.086-.589.259-.966.204-.518.542-.777 1.013-.777.627 0 1.593.55 2.896 1.649 1.224 1.004 1.915 1.452 2.072 1.342a.67.67 0 00.094-.377c0-.204-.11-.816-.33-1.837a33.535 33.535 0 01-.223-1.318 6.849 6.849 0 01-.082-.966c0-1.177.502-1.766 1.507-1.766.957 0 1.436.644 1.436 1.93 0 .44-.07 1.092-.212 1.955-.141.848-.212 1.413-.212 1.696 0 .392.094.62.283.683.188.063.855-.408 2.001-1.413 1.146-1.02 2.057-1.53 2.732-1.53.408 0 .793.18 1.154.54.345.346.518.73.518 1.155z"
|
||||||
|
/></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,15 @@
|
|||||||
|
<svg name="play" width="14px" height="14px" viewBox="0 0 11 14"
|
||||||
|
><g
|
||||||
|
><g fill="#FFF" transform="translate(-258 -886)"
|
||||||
|
><g transform="translate(111 553)"
|
||||||
|
><g transform="translate(15 49)"
|
||||||
|
><g transform="translate(92.55 270)"
|
||||||
|
><path
|
||||||
|
d="M50.278 20.725L40.61 14.06a.335.335 0 00-.523.274v13.334a.334.334 0 00.523.274l9.667-6.667a.333.333 0 000-.549z"
|
||||||
|
/></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></g
|
||||||
|
></svg
|
||||||
|
>
|
||||||
|
After Width: | Height: | Size: 478 B |
@@ -0,0 +1,13 @@
|
|||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="22"
|
||||||
|
height="22"
|
||||||
|
fill="currentColor"
|
||||||
|
class="bi bi-power"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
>
|
||||||
|
<path d="M7.5 1v7h1V1h-1z" />
|
||||||
|
<path
|
||||||
|
d="M3 8.812a4.999 4.999 0 0 1 2.578-4.375l-.485-.874A6 6 0 1 0 11 3.616l-.501.865A5 5 0 1 1 3 8.812z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 295 B |
@@ -0,0 +1,12 @@
|
|||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="22"
|
||||||
|
height="22"
|
||||||
|
fill="currentColor"
|
||||||
|
class="bi bi-volume-down-fill"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M9 4a.5.5 0 0 0-.812-.39L5.825 5.5H3.5A.5.5 0 0 0 3 6v4a.5.5 0 0 0 .5.5h2.325l2.363 1.89A.5.5 0 0 0 9 12V4zm3.025 4a4.486 4.486 0 0 1-1.318 3.182L10 10.475A3.489 3.489 0 0 0 11.025 8 3.49 3.49 0 0 0 10 5.525l.707-.707A4.486 4.486 0 0 1 12.025 8z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 422 B |
@@ -0,0 +1,12 @@
|
|||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="22"
|
||||||
|
height="22"
|
||||||
|
fill="currentColor"
|
||||||
|
class="bi bi-volume-mute-fill"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M6.717 3.55A.5.5 0 0 1 7 4v8a.5.5 0 0 1-.812.39L3.825 10.5H1.5A.5.5 0 0 1 1 10V6a.5.5 0 0 1 .5-.5h2.325l2.363-1.89a.5.5 0 0 1 .529-.06zm7.137 2.096a.5.5 0 0 1 0 .708L12.207 8l1.647 1.646a.5.5 0 0 1-.708.708L11.5 8.707l-1.646 1.647a.5.5 0 0 1-.708-.708L10.793 8 9.146 6.354a.5.5 0 1 1 .708-.708L11.5 7.293l1.646-1.647a.5.5 0 0 1 .708 0z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 512 B |
@@ -0,0 +1,18 @@
|
|||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="22"
|
||||||
|
height="22"
|
||||||
|
fill="currentColor"
|
||||||
|
class="bi bi-volume-up-fill"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M11.536 14.01A8.473 8.473 0 0 0 14.026 8a8.473 8.473 0 0 0-2.49-6.01l-.708.707A7.476 7.476 0 0 1 13.025 8c0 2.071-.84 3.946-2.197 5.303l.708.707z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M10.121 12.596A6.48 6.48 0 0 0 12.025 8a6.48 6.48 0 0 0-1.904-4.596l-.707.707A5.483 5.483 0 0 1 11.025 8a5.483 5.483 0 0 1-1.61 3.89l.706.706z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M8.707 11.182A4.486 4.486 0 0 0 10.025 8a4.486 4.486 0 0 0-1.318-3.182L8 5.525A3.489 3.489 0 0 1 9.025 8 3.49 3.49 0 0 1 8 10.475l.707.707zM6.717 3.55A.5.5 0 0 1 7 4v8a.5.5 0 0 1-.812.39L3.825 10.5H1.5A.5.5 0 0 1 1 10V6a.5.5 0 0 1 .5-.5h2.325l2.363-1.89a.5.5 0 0 1 .529-.06z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 780 B |
@@ -0,0 +1,33 @@
|
|||||||
|
import { getIp } from "./Host";
|
||||||
|
|
||||||
|
export class ExternalControlProtocol {
|
||||||
|
static async launchApp(appId) {
|
||||||
|
console.log("Launching app", appId)
|
||||||
|
return fetch(`http://${getIp()}:8060/launch/${appId}`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: '',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
static async pressKey(key) {
|
||||||
|
return fetch(`http://${getIp()}:8060/keypress/${key}`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: '',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
static async pressKeyUp(key) {
|
||||||
|
console.log("Pressing key up", key)
|
||||||
|
return fetch(`http://${getIp()}:8060/keyup/${key}`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: '',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
static async pressKeyDown(key) {
|
||||||
|
console.log("Pressing key down", key)
|
||||||
|
return fetch(`http://${getIp()}:8060/keydown/${key}`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: '',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,4 +3,9 @@ function getHost() {
|
|||||||
return urlSearchParams.get('host') ?? window.location.host
|
return urlSearchParams.get('host') ?? window.location.host
|
||||||
}
|
}
|
||||||
|
|
||||||
export { getHost }
|
function getIp() {
|
||||||
|
const host = getHost()
|
||||||
|
return host.split(':')[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
export { getHost, getIp }
|
||||||
@@ -27,7 +27,7 @@ export class InvidiousApi {
|
|||||||
return await response.json();
|
return await response.json();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async search(query: string, filters: any) {
|
public async search(query: string, filters: any, page: number = 1) {
|
||||||
let url = `${this.instance}/api/v1/search?q=${encodeURIComponent(query)}®ion=${this.userCountryCode}`;
|
let url = `${this.instance}/api/v1/search?q=${encodeURIComponent(query)}®ion=${this.userCountryCode}`;
|
||||||
for (let filter in filters) {
|
for (let filter in filters) {
|
||||||
if (typeof filters[filter] === 'string') {
|
if (typeof filters[filter] === 'string') {
|
||||||
@@ -42,6 +42,7 @@ export class InvidiousApi {
|
|||||||
url += `&${filter}=${filters[filter].join(',')}`;
|
url += `&${filter}=${filters[filter].join(',')}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
url += `&page=${page}`;
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
return await response.json();
|
return await response.json();
|
||||||
}
|
}
|
||||||
@@ -153,7 +154,14 @@ export class InvidiousApi {
|
|||||||
cacheSeconds = endpoint.cacheSeconds
|
cacheSeconds = endpoint.cacheSeconds
|
||||||
}
|
}
|
||||||
|
|
||||||
const responseJson = await this.cachedFetch(url, cacheSeconds);
|
let tryCount = 1;
|
||||||
|
if (feedSource.tryCount !== undefined) {
|
||||||
|
tryCount = feedSource.tryCount
|
||||||
|
} else if (endpoint.tryCount !== undefined) {
|
||||||
|
tryCount = endpoint.tryCount
|
||||||
|
}
|
||||||
|
|
||||||
|
const responseJson = await this.cachedFetch(url, cacheSeconds, tryCount);
|
||||||
|
|
||||||
let responseHandler = endpoint.responseHandler !== undefined ? this.responseHandlers[endpoint.responseHandler] : this.responseHandlers["DefaultHandler"];
|
let responseHandler = endpoint.responseHandler !== undefined ? this.responseHandlers[endpoint.responseHandler] : this.responseHandlers["DefaultHandler"];
|
||||||
if (!responseHandler) {
|
if (!responseHandler) {
|
||||||
@@ -221,26 +229,53 @@ export class InvidiousApi {
|
|||||||
return encodedUrl.toString();
|
return encodedUrl.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async cachedFetch(url: string, cacheSeconds?: number) {
|
private async cachedFetch(url: string, cacheSeconds?: number, tryCount: number = 1) {
|
||||||
if (!cacheSeconds) {
|
if (cacheSeconds) {
|
||||||
const response = await fetch(url);
|
|
||||||
return await response.json();
|
|
||||||
}
|
|
||||||
|
|
||||||
const cache = this.getCache(url, cacheSeconds);
|
const cache = this.getCache(url, cacheSeconds);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
tryCount -= 1;
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(response.statusText);
|
||||||
|
}
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
this.setCache(url, data);
|
this.setCache(url, data);
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
while (tryCount > 0) {
|
||||||
|
tryCount -= 1;
|
||||||
|
let backOffMs = 1000 + Math.floor(Math.random() * (3000 - 1000));
|
||||||
|
console.log(`Retrying ${url} in ${backOffMs}ms`);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, backOffMs));
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch(url);
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(response.statusText);
|
||||||
|
}
|
||||||
|
const data = await response.json();
|
||||||
|
this.setCache(url, data);
|
||||||
|
return data;
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO:P2 use more appropriate cache storage
|
// TODO:P2 use more appropriate cache storage
|
||||||
private getCache(url: string, cacheSeconds: number) {
|
private getCache(url: string, cacheSeconds: number) {
|
||||||
const cache = localStorage.getItem(url);
|
const cacheKey = this.getCacheKey(url);
|
||||||
|
const cache = localStorage.getItem(cacheKey);
|
||||||
if (!cache) {
|
if (!cache) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -259,12 +294,17 @@ export class InvidiousApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private setCache(url: string, data: any) {
|
private setCache(url: string, data: any) {
|
||||||
|
const cacheKey = this.getCacheKey(url);
|
||||||
const cacheData = {
|
const cacheData = {
|
||||||
__version: 1,
|
__version: 1,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
data
|
data
|
||||||
};
|
};
|
||||||
|
|
||||||
localStorage.setItem(url, JSON.stringify(cacheData));
|
localStorage.setItem(cacheKey, JSON.stringify(cacheData));
|
||||||
|
}
|
||||||
|
|
||||||
|
private getCacheKey(url: string) {
|
||||||
|
return `v1:${url}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||