Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
322232a027 | ||
|
|
8ee9acadad | ||
|
|
ca11978995 | ||
|
|
4fb796b13b | ||
|
|
763cb64ba7 | ||
|
|
32bcc1dfc0 | ||
|
|
8169c7223d | ||
|
|
7d2d403e3f | ||
|
|
71045bf944 | ||
|
|
8f17be6036 | ||
|
|
3ce2baf683 | ||
|
|
8fa06bf05a | ||
|
|
82162d52c1 | ||
|
|
53f9249b9f |
No files matched your search
@@ -4,6 +4,20 @@ 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.9.0] - 2023-04-21
|
||||||
|
### Added
|
||||||
|
- Add watched videos to Invidious watch history
|
||||||
|
- App info screen
|
||||||
|
- A dev menu selector to test newer or older versions of playlet lib
|
||||||
|
- Makes it possible to test unstable releases before they officially release
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- A crash where the metadata of a video is not validated [#57](https://github.com/iBicha/playlet/issues/57)
|
||||||
|
- A crash where the video details in home screen are null [#56](https://github.com/iBicha/playlet/issues/56)
|
||||||
|
- A crash where the video details are not returned in json [#63](https://github.com/iBicha/playlet/issues/63)
|
||||||
|
- Revert to using DASH instead of 720p by default
|
||||||
|
- A crash where request cache fails [#62](https://github.com/iBicha/playlet/issues/62)
|
||||||
|
|
||||||
## [0.8.0] - 2023-03-02
|
## [0.8.0] - 2023-03-02
|
||||||
### Added
|
### Added
|
||||||
- SponsorBlock notification
|
- SponsorBlock notification
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
<img alt="Current Release" src="https://img.shields.io/github/release/iBicha/playlet.svg"/>
|
<img alt="Current Release" src="https://img.shields.io/github/release/iBicha/playlet.svg"/>
|
||||||
<img alt="Total Downloads" src="https://img.shields.io/github/downloads/iBicha/playlet/latest/playlet-lib.zip.svg"/>
|
<img alt="Total Downloads" src="https://img.shields.io/github/downloads/iBicha/playlet/latest/playlet-lib.zip.svg"/>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://channelstore.roku.com/en-ca/details/840aec36f51bfe6d96cf6db9055a372a/playlet">
|
||||||
|
<img alt="Roku Channel Store" src="https://img.shields.io/badge/Roku%20Store-Install-blueviolet?logo=roku&logoColor=blueviolet&labelColor=white"/>
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@@ -44,7 +47,8 @@ Playlet is an unofficial Youtube client for Roku 📺
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
### Roku Store (Published app)
|
### Roku Store (Published app)
|
||||||
Search for "Playlet" in the Roku Store, or use the link https://my.roku.com/account/add?channel=PLAYLET
|
[Playlet on Roku channel store](https://channelstore.roku.com/en-ca/details/840aec36f51bfe6d96cf6db9055a372a/playlet)
|
||||||
|
Or use the link https://my.roku.com/account/add?channel=PLAYLET
|
||||||
|
|
||||||
### Sideloaded (Dev app)
|
### Sideloaded (Dev app)
|
||||||
#### Enable Roku Developer Mode
|
#### Enable Roku Developer Mode
|
||||||
@@ -64,22 +68,6 @@ By now, you should have the following
|
|||||||
- Your Roku TV local IP address
|
- Your Roku TV local IP address
|
||||||
- You can find this information in your TV network settings. It should look like 192.168.X.X or so
|
- You can find this information in your TV network settings. It should look like 192.168.X.X or so
|
||||||
|
|
||||||
#### Install Playlet (command line)
|
|
||||||
|
|
||||||
Install Playlet as a dev channel using this command, and replace:
|
|
||||||
- `REPLACE_PASSWORD_HERE` : with your Roku Dev password
|
|
||||||
- `REPLACE_IP_ADDRESS_HERE` : with your Roku TV local IP address
|
|
||||||
```
|
|
||||||
curl https://raw.githubusercontent.com/iBicha/playlet/main/install.sh | ROKU_DEV_TARGET=REPLACE_IP_ADDRESS_HERE DEVPASSWORD=REPLACE_PASSWORD_HERE sh
|
|
||||||
```
|
|
||||||
Example:
|
|
||||||
```
|
|
||||||
curl https://raw.githubusercontent.com/iBicha/playlet/main/install.sh | ROKU_DEV_TARGET=192.168.1.2 DEVPASSWORD=1234 sh
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
If successful, you should see some output on your terminal, with `Status: 200`.
|
|
||||||
|
|
||||||
#### Install Playlet (Manual)
|
#### Install Playlet (Manual)
|
||||||
1. Go to `https://github.com/iBicha/playlet/releases` and download `playlet.zip`
|
1. Go to `https://github.com/iBicha/playlet/releases` and download `playlet.zip`
|
||||||
2. Open `http://REPLACE_IP_ADDRESS_HERE/` (e.g. http://192.168.1.2/) in your browser
|
2. Open `http://REPLACE_IP_ADDRESS_HERE/` (e.g. http://192.168.1.2/) in your browser
|
||||||
|
|||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
# Installs the playlet.zip app as a dev channel
|
|
||||||
|
|
||||||
if [ -z "$ROKU_DEV_TARGET" ];
|
|
||||||
then
|
|
||||||
echo "Variable ROKU_DEV_TARGET is not set. What is your Roku TV IP address? Example: 192.168.1.2";
|
|
||||||
read ROKU_DEV_TARGET
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DEVPASSWORD" ];
|
|
||||||
then
|
|
||||||
echo "Variable DEVPASSWORD is not set. What is your Roku Dev password? Example: 1234";
|
|
||||||
read DEVPASSWORD
|
|
||||||
fi
|
|
||||||
|
|
||||||
tmp_folder=$(mktemp -d)
|
|
||||||
tmp_zip_file="$tmp_folder/playlet.zip"
|
|
||||||
tmp_http_response_file="$tmp_folder/roku-response.html"
|
|
||||||
|
|
||||||
echo "Downloading archive to temporary folder ..."
|
|
||||||
|
|
||||||
# TODO: Check for curl, use wget if curl is not available
|
|
||||||
curl -L https://github.com/iBicha/playlet/releases/latest/download/playlet.zip -o $tmp_zip_file
|
|
||||||
|
|
||||||
echo "Installing app on device at $ROKU_DEV_TARGET ..."
|
|
||||||
|
|
||||||
curl --user rokudev:$DEVPASSWORD --digest --silent --show-error -F "mysubmit=Install" -F "archive=@$tmp_zip_file" --output $tmp_http_response_file --write-out "Status: %{http_code}" http://$ROKU_DEV_TARGET/plugin_install
|
|
||||||
|
|
||||||
echo "\nDeleting temporary folder ..."
|
|
||||||
|
|
||||||
rm -rf $tmp_folder
|
|
||||||
Generated
+92
-92
@@ -1,34 +1,34 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.8.0",
|
"version": "0.9.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.8.0",
|
"version": "0.9.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
|
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
|
||||||
"log": "npm:roku-log@^0.9.3",
|
"log": "npm:roku-log@^0.9.3",
|
||||||
"roku-requests": "^1.1.0"
|
"roku-requests": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.1",
|
"@rokucommunity/bslint": "^0.8.3",
|
||||||
"@types/node": "^18.11.18",
|
"@types/node": "^18.15.13",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "^0.61.3",
|
"brighterscript": "^0.64.2",
|
||||||
"brighterscript-formatter": "^1.6.23",
|
"brighterscript-formatter": "^1.6.26",
|
||||||
"convert-svg-to-png": "^0.6.4",
|
"convert-svg-to-png": "^0.6.4",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"roku-log-bsc-plugin": "^0.7.0",
|
"roku-log-bsc-plugin": "^0.7.0",
|
||||||
"ropm": "^0.10.11",
|
"ropm": "^0.10.13",
|
||||||
"semver": "^7.3.8",
|
"semver": "^7.5.0",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^5.0.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "<19.0.0"
|
"node": "<19.0.0"
|
||||||
@@ -47,18 +47,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/resolve-uri": {
|
"node_modules/@jridgewell/resolve-uri": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
|
||||||
"integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
|
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/sourcemap-codec": {
|
"node_modules/@jridgewell/sourcemap-codec": {
|
||||||
"version": "1.4.14",
|
"version": "1.4.15",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||||
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
|
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/trace-mapping": {
|
"node_modules/@jridgewell/trace-mapping": {
|
||||||
@@ -113,9 +113,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@rokucommunity/bslint": {
|
"node_modules/@rokucommunity/bslint": {
|
||||||
"version": "0.8.1",
|
"version": "0.8.3",
|
||||||
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.3.tgz",
|
||||||
"integrity": "sha512-G4XhWHMZzq6HJiNazd3Vpg8mstYkbOk6dQC4JD7vmBlSVqm0KkITmZRNlumn/x1v60E9dGONP89MkoBz3/DHaA==",
|
"integrity": "sha512-CgUemN0evVIQ1CriO2EXkcKlvtbSZn4iq5yKSzZIwjulHPeIJLfVaiX6mX1HE1tiWnJJHOQsc8OtBgBCFQCO2A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
@@ -155,9 +155,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "18.11.18",
|
"version": "18.15.13",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz",
|
||||||
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==",
|
"integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/yauzl": {
|
"node_modules/@types/yauzl": {
|
||||||
@@ -480,9 +480,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/bl/node_modules/readable-stream": {
|
"node_modules/bl/node_modules/readable-stream": {
|
||||||
"version": "3.6.0",
|
"version": "3.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
@@ -546,9 +546,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brighterscript": {
|
"node_modules/brighterscript": {
|
||||||
"version": "0.61.3",
|
"version": "0.64.2",
|
||||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.61.3.tgz",
|
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.64.2.tgz",
|
||||||
"integrity": "sha512-8BDpOSCdmkS/QcTdPTUW/99nCBypuoa/Zz6PZHI6OiVylqTBidtrGI7lBZotqY6yvQ3KJl24thhLHK5XuIT/6w==",
|
"integrity": "sha512-FoPsHDa3y89qPMoDH7zGuPdFXNFlfWXdXFgWIGPymdVgywLLFaphlj7mdlX+ZdTeVcXybjVWKfyjrPRbNzJZxA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rokucommunity/bslib": "^0.1.1",
|
"@rokucommunity/bslib": "^0.1.1",
|
||||||
@@ -572,14 +572,14 @@
|
|||||||
"p-settle": "^2.1.0",
|
"p-settle": "^2.1.0",
|
||||||
"parse-ms": "^2.1.0",
|
"parse-ms": "^2.1.0",
|
||||||
"require-relative": "^0.8.7",
|
"require-relative": "^0.8.7",
|
||||||
"roku-deploy": "^3.9.3",
|
"roku-deploy": "^3.10.1",
|
||||||
"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",
|
||||||
"vscode-languageserver-protocol": "3.16.0",
|
"vscode-languageserver-protocol": "3.16.0",
|
||||||
"vscode-languageserver-textdocument": "^1.0.1",
|
"vscode-languageserver-textdocument": "^1.0.1",
|
||||||
"vscode-uri": "^2.1.1",
|
"vscode-uri": "^2.1.1",
|
||||||
"xml2js": "^0.4.19",
|
"xml2js": "^0.5.0",
|
||||||
"yargs": "^16.2.0"
|
"yargs": "^16.2.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -587,12 +587,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brighterscript-formatter": {
|
"node_modules/brighterscript-formatter": {
|
||||||
"version": "1.6.23",
|
"version": "1.6.26",
|
||||||
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.23.tgz",
|
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.26.tgz",
|
||||||
"integrity": "sha512-nLxWG3fR8FK5LY7Olj/RpZ/Rq+qpB+c4Nfb26Fg6Db0S3/VORpLNpAG3+Pi6eR5gxSlWBjFmH1XZfGQIiEdnoQ==",
|
"integrity": "sha512-IT5BV+9HTr6Af23gB7hxH0Xyv8v0LIsLSsrKUFfmwHtJ1ILRI6kiyZDbZOlolYVPuX7y+0ed791CZGxfAIgm6w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brighterscript": "^0.61.3",
|
"brighterscript": "^0.64.2",
|
||||||
"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",
|
||||||
@@ -683,9 +683,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brighterscript-formatter/node_modules/yargs": {
|
"node_modules/brighterscript-formatter/node_modules/yargs": {
|
||||||
"version": "17.6.2",
|
"version": "17.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz",
|
||||||
"integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==",
|
"integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cliui": "^8.0.1",
|
"cliui": "^8.0.1",
|
||||||
@@ -1530,9 +1530,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/entities": {
|
"node_modules/entities": {
|
||||||
"version": "4.4.0",
|
"version": "4.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
||||||
"integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==",
|
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.12"
|
"node": ">=0.12"
|
||||||
@@ -2036,9 +2036,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/graceful-fs": {
|
"node_modules/graceful-fs": {
|
||||||
"version": "4.2.10",
|
"version": "4.2.11",
|
||||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||||
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
|
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/har-schema": {
|
"node_modules/har-schema": {
|
||||||
@@ -2098,9 +2098,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/htmlparser2": {
|
"node_modules/htmlparser2": {
|
||||||
"version": "8.0.1",
|
"version": "8.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz",
|
||||||
"integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==",
|
"integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
"https://github.com/fb55/htmlparser2?sponsor=1",
|
"https://github.com/fb55/htmlparser2?sponsor=1",
|
||||||
@@ -2111,9 +2111,9 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"domelementtype": "^2.3.0",
|
"domelementtype": "^2.3.0",
|
||||||
"domhandler": "^5.0.2",
|
"domhandler": "^5.0.3",
|
||||||
"domutils": "^3.0.1",
|
"domutils": "^3.0.1",
|
||||||
"entities": "^4.3.0"
|
"entities": "^4.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/http-errors": {
|
"node_modules/http-errors": {
|
||||||
@@ -2301,9 +2301,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/is-core-module": {
|
"node_modules/is-core-module": {
|
||||||
"version": "2.11.0",
|
"version": "2.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz",
|
||||||
"integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
|
"integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"has": "^1.0.3"
|
"has": "^1.0.3"
|
||||||
@@ -3105,7 +3105,7 @@
|
|||||||
"version": "13.7.0",
|
"version": "13.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz",
|
||||||
"integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==",
|
"integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==",
|
||||||
"deprecated": "< 18.1.0 is no longer supported",
|
"deprecated": "< 19.4.0 is no longer supported",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -3209,9 +3209,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/readable-stream": {
|
"node_modules/readable-stream": {
|
||||||
"version": "2.3.7",
|
"version": "2.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
|
||||||
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
|
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-util-is": "~1.0.0",
|
"core-util-is": "~1.0.0",
|
||||||
@@ -3322,12 +3322,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/resolve": {
|
"node_modules/resolve": {
|
||||||
"version": "1.22.1",
|
"version": "1.22.2",
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
|
||||||
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
|
"integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-core-module": "^2.9.0",
|
"is-core-module": "^2.11.0",
|
||||||
"path-parse": "^1.0.7",
|
"path-parse": "^1.0.7",
|
||||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||||
},
|
},
|
||||||
@@ -3384,25 +3384,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/roku-deploy": {
|
"node_modules/roku-deploy": {
|
||||||
"version": "3.9.3",
|
"version": "3.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.1.tgz",
|
||||||
"integrity": "sha512-cjTx5ffZNt07rQS+0s2sTBHkZKUk283y9f6UnbI77X03lQ60vYlCnqsKswWisFYMHPIdvsTLLSfKsshAPwKHEQ==",
|
"integrity": "sha512-utPNny0a2m/N0AQT6zyVLXtrr81KR5QeJqPUbc59VBcqGM+WIi7rQ9hBLmp5dFqIo/7JVKQYFs+nFGebOA6F7w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"dateformat": "^3.0.3",
|
"dateformat": "^3.0.3",
|
||||||
"dayjs": "^1.11.0",
|
"dayjs": "^1.11.0",
|
||||||
"fast-glob": "^3.2.11",
|
"fast-glob": "^3.2.12",
|
||||||
"fs-extra": "^7.0.1",
|
"fs-extra": "^7.0.1",
|
||||||
"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",
|
||||||
|
"micromatch": "^4.0.4",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"parse-ms": "^2.1.0",
|
"parse-ms": "^2.1.0",
|
||||||
"picomatch": "^2.2.1",
|
|
||||||
"request": "^2.88.0",
|
"request": "^2.88.0",
|
||||||
"temp-dir": "^2.0.0",
|
"temp-dir": "^2.0.0",
|
||||||
"xml2js": "^0.4.23"
|
"xml2js": "^0.5.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"roku-deploy": "dist/cli.js"
|
"roku-deploy": "dist/cli.js"
|
||||||
@@ -3456,9 +3456,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/roku-log-bsc-plugin/node_modules/@types/node": {
|
"node_modules/roku-log-bsc-plugin/node_modules/@types/node": {
|
||||||
"version": "14.18.36",
|
"version": "14.18.42",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.42.tgz",
|
||||||
"integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==",
|
"integrity": "sha512-xefu+RBie4xWlK8hwAzGh3npDz/4VhF6icY/shU+zv/1fNn+ZVG7T7CRwe9LId9sAYRPxI+59QBPuKL3WpyGRg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/roku-log-bsc-plugin/node_modules/vscode-jsonrpc": {
|
"node_modules/roku-log-bsc-plugin/node_modules/vscode-jsonrpc": {
|
||||||
@@ -3499,25 +3499,25 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/roku-requests": {
|
"node_modules/roku-requests": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/roku-requests/-/roku-requests-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/roku-requests/-/roku-requests-1.2.0.tgz",
|
||||||
"integrity": "sha512-Jnyn1WENAAgbi2cDsZXh8GN2O/9C3J11pQj6u/K3dqxjLPuTzUmGnZSrmF9NvK8t6ChGbaGc8Z4F0SzHYwTQNQ=="
|
"integrity": "sha512-X6XakmJwxT8H+YNvjZOwH+k8rmYpD5o47k37WyZJ/brrSD6cw9xbNdxO203nz6jpso4maQJGwSJvLGZpzSQ0AA=="
|
||||||
},
|
},
|
||||||
"node_modules/ropm": {
|
"node_modules/ropm": {
|
||||||
"version": "0.10.11",
|
"version": "0.10.13",
|
||||||
"resolved": "https://registry.npmjs.org/ropm/-/ropm-0.10.11.tgz",
|
"resolved": "https://registry.npmjs.org/ropm/-/ropm-0.10.13.tgz",
|
||||||
"integrity": "sha512-D9Nfi2tuB32d9gJFdyBdUw6+sBo4lwG2trkL9S0jHJCKqAQWs6tgkmDRd+pp6ZrKEKSK1V2y0bi8xFOi2Rjr+Q==",
|
"integrity": "sha512-WlYorFMbnZGaNbKEXb6RX64wLOE/RHttzDuuQBkf2J7HbgQHseLbVdHBVaAb+SiS7BLK5xzJOoTsFbV2YTXsvg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xml-tools/ast": "^5.0.5",
|
"@xml-tools/ast": "^5.0.5",
|
||||||
"@xml-tools/parser": "1.0.10",
|
"@xml-tools/parser": "1.0.10",
|
||||||
"brighterscript": "^0.61.3",
|
"brighterscript": "^0.64.2",
|
||||||
"del": "6.0.0",
|
"del": "6.0.0",
|
||||||
"fs-extra": "9.1.0",
|
"fs-extra": "9.1.0",
|
||||||
"glob-all": "3.2.1",
|
"glob-all": "3.2.1",
|
||||||
"latinize": "0.5.0",
|
"latinize": "0.5.0",
|
||||||
"npm-packlist": "2.1.4",
|
"npm-packlist": "2.1.4",
|
||||||
"roku-deploy": "^3.9.3",
|
"roku-deploy": "^3.10.1",
|
||||||
"semver": "7.3.4",
|
"semver": "7.3.4",
|
||||||
"yargs": "16.2.0"
|
"yargs": "16.2.0"
|
||||||
},
|
},
|
||||||
@@ -3784,9 +3784,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.3.8",
|
"version": "7.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -4087,9 +4087,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tar-stream/node_modules/readable-stream": {
|
"node_modules/tar-stream/node_modules/readable-stream": {
|
||||||
"version": "3.6.0",
|
"version": "3.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
@@ -4254,16 +4254,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "4.9.5",
|
"version": "5.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
|
||||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
"integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
"tsserver": "bin/tsserver"
|
"tsserver": "bin/tsserver"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=4.2.0"
|
"node": ">=12.20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/unbzip2-stream": {
|
"node_modules/unbzip2-stream": {
|
||||||
@@ -4429,9 +4429,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/which-module": {
|
"node_modules/which-module": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
|
||||||
"integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==",
|
"integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/wrap-ansi": {
|
"node_modules/wrap-ansi": {
|
||||||
@@ -4509,9 +4509,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/xml2js": {
|
"node_modules/xml2js": {
|
||||||
"version": "0.4.23",
|
"version": "0.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
|
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
|
||||||
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
|
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"sax": ">=0.6.0",
|
"sax": ">=0.6.0",
|
||||||
|
|||||||
+9
-9
@@ -1,28 +1,28 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.8.0",
|
"version": "0.9.0",
|
||||||
"description": "Unofficial Youtube client for Roku",
|
"description": "Unofficial Youtube client for Roku",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
|
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
|
||||||
"log": "npm:roku-log@^0.9.3",
|
"log": "npm:roku-log@^0.9.3",
|
||||||
"roku-requests": "^1.1.0"
|
"roku-requests": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.1",
|
"@rokucommunity/bslint": "^0.8.3",
|
||||||
"@types/node": "^18.11.18",
|
"@types/node": "^18.15.13",
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"brighterscript": "^0.61.3",
|
"brighterscript": "^0.64.2",
|
||||||
"brighterscript-formatter": "^1.6.23",
|
"brighterscript-formatter": "^1.6.26",
|
||||||
"convert-svg-to-png": "^0.6.4",
|
"convert-svg-to-png": "^0.6.4",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"roku-log-bsc-plugin": "^0.7.0",
|
"roku-log-bsc-plugin": "^0.7.0",
|
||||||
"ropm": "^0.10.11",
|
"ropm": "^0.10.13",
|
||||||
"semver": "^7.3.8",
|
"semver": "^7.5.0",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^5.0.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "<19.0.0"
|
"node": "<19.0.0"
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import "pkg:/source/utils/General.bs"
|
||||||
|
import "pkg:/components/AppInfoScreen/AppVersionTask.bs"
|
||||||
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.displayNames = {
|
||||||
|
"version": "Playlet Version",
|
||||||
|
"lib_version": "Playlet Library Version",
|
||||||
|
"lib_version_latest": "Playlet Library Latest Version",
|
||||||
|
"lib_url": "Playlet Library URL",
|
||||||
|
"lib_url_type": "Playlet Library URL Type",
|
||||||
|
"git_commit_hash": "Playlet Git Commit Hash",
|
||||||
|
"lib_git_commit_hash": "Playlet Library Git Commit Hash",
|
||||||
|
"id": "App ID"
|
||||||
|
}
|
||||||
|
|
||||||
|
m.keyValueList = m.top.findNode("KeyValueListContent")
|
||||||
|
m.appInfo = GetAppInfo()
|
||||||
|
m.appInfo["lib_version_latest"] = "N/A"
|
||||||
|
m.appInfo["lib_url"] = "N/A"
|
||||||
|
m.appInfo["lib_url_type"] = "N/A"
|
||||||
|
|
||||||
|
scene = m.top.getScene()
|
||||||
|
if scene.playletLibLoadedUrl <> invalid
|
||||||
|
m.appInfo["lib_url"] = scene.playletLibLoadedUrl.link
|
||||||
|
m.appInfo["lib_url_type"] = scene.playletLibLoadedUrl.type
|
||||||
|
end if
|
||||||
|
|
||||||
|
UpdateKeyValueList()
|
||||||
|
GetLatestVersion()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function UpdateKeyValueList()
|
||||||
|
while m.keyValueList.getChildCount() > 0
|
||||||
|
m.keyValueList.removeChildIndex(0)
|
||||||
|
end while
|
||||||
|
|
||||||
|
for each item in m.appInfo
|
||||||
|
value = `${m.displayNames[item]}: ${m.appInfo[item]}`
|
||||||
|
contentNode = m.keyValueList.createChild("ContentNode")
|
||||||
|
contentNode.title = value
|
||||||
|
end for
|
||||||
|
end function
|
||||||
|
|
||||||
|
function GetLatestVersion()
|
||||||
|
StartAsyncTask(AppVersionTask, {}, function(output as object) as void
|
||||||
|
if output.result.latest <> invalid
|
||||||
|
m.appInfo["lib_version_latest"] = output.result.latest
|
||||||
|
UpdateKeyValueList()
|
||||||
|
end if
|
||||||
|
end function)
|
||||||
|
end function
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<component name="AppInfoScreen" extends="Group">
|
||||||
|
<interface>
|
||||||
|
</interface>
|
||||||
|
<children>
|
||||||
|
<LabelList
|
||||||
|
translation="[160,92]"
|
||||||
|
itemSize="[1020,48]"
|
||||||
|
font='font:SmallestBoldSystemFont'>
|
||||||
|
<ContentNode id="KeyValueListContent" role="content">
|
||||||
|
</ContentNode>
|
||||||
|
</LabelList>
|
||||||
|
</children>
|
||||||
|
</component>
|
||||||
File renamed without changes.
@@ -57,10 +57,15 @@ function StartFetchTask() as void
|
|||||||
StartAsyncTask(GetHomeScreenContent, {
|
StartAsyncTask(GetHomeScreenContent, {
|
||||||
index: currentLoadingIndex,
|
index: currentLoadingIndex,
|
||||||
requestData: m.defaultLayout[currentLoadingIndex]
|
requestData: m.defaultLayout[currentLoadingIndex]
|
||||||
}, function(output as object)
|
}, function(output as object) as void
|
||||||
' TODO: this whole logic is not good.
|
' TODO: this whole logic is not good.
|
||||||
' The view should have placeholder, and child nodes get replaced as
|
' The view should have placeholder, and child nodes get replaced as
|
||||||
' They get ready.
|
' They get ready.
|
||||||
|
if output = invalid
|
||||||
|
StartFetchTask()
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
m.sortedContent.Push(output.result)
|
m.sortedContent.Push(output.result)
|
||||||
|
|
||||||
if output.result.rootChildren.Count() > 0
|
if output.result.rootChildren.Count() > 0
|
||||||
|
|||||||
@@ -15,11 +15,25 @@ function Init()
|
|||||||
m.currentFocued = m.homeGridScreen
|
m.currentFocued = m.homeGridScreen
|
||||||
|
|
||||||
m.settingsScreen = m.top.findNode("SettingsScreen")
|
m.settingsScreen = m.top.findNode("SettingsScreen")
|
||||||
|
m.appInfoScreen = m.top.findNode("AppInfoScreen")
|
||||||
|
|
||||||
m.searchScreen = m.top.findNode("SearchScreen")
|
m.searchScreen = m.top.findNode("SearchScreen")
|
||||||
m.searchScreen.ObserveField("escape", "OnSearchScreenEscape")
|
m.searchScreen.ObserveField("escape", "OnSearchScreenEscape")
|
||||||
|
|
||||||
m.navBar = m.top.findNode("NavBar")
|
m.navBar = m.top.findNode("NavBar")
|
||||||
|
m.navBarScreens = [{
|
||||||
|
node: m.searchScreen,
|
||||||
|
canEscape: true
|
||||||
|
}, {
|
||||||
|
node: m.homeGridScreen,
|
||||||
|
canEscape: true
|
||||||
|
}, {
|
||||||
|
node: m.settingsScreen,
|
||||||
|
canEscape: false
|
||||||
|
}, {
|
||||||
|
node: m.appInfoScreen,
|
||||||
|
canEscape: false
|
||||||
|
}]
|
||||||
m.navBar.ObserveField("escapeIndex", "OnNavBarEscape")
|
m.navBar.ObserveField("escapeIndex", "OnNavBarEscape")
|
||||||
m.navBar.ObserveField("focusIndex", "OnNavIndexChange")
|
m.navBar.ObserveField("focusIndex", "OnNavIndexChange")
|
||||||
|
|
||||||
@@ -54,14 +68,9 @@ end function
|
|||||||
|
|
||||||
function OnNavBarEscape()
|
function OnNavBarEscape()
|
||||||
index = m.navBar.escapeIndex
|
index = m.navBar.escapeIndex
|
||||||
if index = 0
|
m.navBarScreens[index].node.focus = true
|
||||||
m.searchScreen.focus = true
|
if m.navBarScreens[index].canEscape
|
||||||
m.currentFocued = m.searchScreen
|
m.currentFocued = m.navBarScreens[index].node
|
||||||
else if index = 1
|
|
||||||
m.homeGridScreen.focus = true
|
|
||||||
m.currentFocued = m.homeGridScreen
|
|
||||||
else if index = 2
|
|
||||||
m.settingsScreen.focus = true
|
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -70,19 +79,9 @@ function OnNavIndexChange() as void
|
|||||||
if index = -1
|
if index = -1
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
if index = 0
|
for i = 0 to m.navBarScreens.count() - 1
|
||||||
m.searchScreen.visible = true
|
m.navBarScreens[i].node.visible = i = index
|
||||||
m.homeGridScreen.visible = false
|
end for
|
||||||
m.settingsScreen.visible = false
|
|
||||||
else if index = 1
|
|
||||||
m.searchScreen.visible = false
|
|
||||||
m.homeGridScreen.visible = true
|
|
||||||
m.settingsScreen.visible = false
|
|
||||||
else if index = 2
|
|
||||||
m.searchScreen.visible = false
|
|
||||||
m.homeGridScreen.visible = false
|
|
||||||
m.settingsScreen.visible = true
|
|
||||||
end if
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnWebServerLogin()
|
function OnWebServerLogin()
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<SearchScreen id="SearchScreen" visible="false" />
|
<SearchScreen id="SearchScreen" visible="false" />
|
||||||
<HomeGridScreen id="HomeGridScreen" />
|
<HomeGridScreen id="HomeGridScreen" />
|
||||||
<SettingsScreen id="SettingsScreen" visible="false" />
|
<SettingsScreen id="SettingsScreen" visible="false" />
|
||||||
|
<AppInfoScreen id="AppInfoScreen" visible="false" />
|
||||||
<NavBar id="NavBar" />
|
<NavBar id="NavBar" />
|
||||||
<VideoContainer id="VideoContainer" />
|
<VideoContainer id="VideoContainer" />
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -42,6 +42,15 @@
|
|||||||
text="Settings"
|
text="Settings"
|
||||||
height="50"
|
height="50"
|
||||||
width="80" />
|
width="80" />
|
||||||
|
<IconButton
|
||||||
|
id="appInfoButton"
|
||||||
|
background="#242424"
|
||||||
|
focusBackground="#ff1c30"
|
||||||
|
padding="20"
|
||||||
|
icon="pkg:/images/icons/info.png"
|
||||||
|
text="Info"
|
||||||
|
height="50"
|
||||||
|
width="80" />
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -1,23 +1,9 @@
|
|||||||
import "pkg:/source/utils/General.bs"
|
import "pkg:/source/utils/General.bs"
|
||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
import "pkg:/components/SettingsScreen/AppVersionTask.bs"
|
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.versionLabel = m.top.findNode("VersionLabel")
|
|
||||||
m.playletLibUrlLabel = m.top.findNode("PlayletLibUrlLabel")
|
|
||||||
|
|
||||||
m.top.url = `http://${GetLocalIpAddress()}:8888`
|
m.top.url = `http://${GetLocalIpAddress()}:8888`
|
||||||
|
|
||||||
appInfo = GetAppInfo()
|
|
||||||
m.top.appVersion = appInfo.version
|
|
||||||
m.top.libVersion = appInfo.lib_version
|
|
||||||
|
|
||||||
scene = m.top.getScene()
|
|
||||||
if scene.playletLibLoadedUrl <> invalid
|
|
||||||
m.top.libUrl = `[${scene.playletLibLoadedUrl.type}|${scene.playletLibLoadedUrl.link}]`
|
|
||||||
end if
|
|
||||||
GetLatestVersion()
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnUrlSet()
|
function OnUrlSet()
|
||||||
@@ -29,19 +15,3 @@ function OnUrlSet()
|
|||||||
urlLabel = m.top.findNode("urlLabel")
|
urlLabel = m.top.findNode("urlLabel")
|
||||||
urlLabel.text = url
|
urlLabel.text = url
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetLatestVersion()
|
|
||||||
StartAsyncTask(AppVersionTask, {}, function(output as object) as void
|
|
||||||
if output.result.latest <> invalid
|
|
||||||
m.top.latestVersion = output.result.latest
|
|
||||||
end if
|
|
||||||
end function)
|
|
||||||
end function
|
|
||||||
|
|
||||||
function SetVersionLabel()
|
|
||||||
m.versionLabel.text = `Playlet: ${m.top.appVersion} | Playlet-Lib: ${m.top.libVersion} | Latest: ${m.top.latestVersion}`
|
|
||||||
end function
|
|
||||||
|
|
||||||
function SetPlayletLibUrlLabel()
|
|
||||||
m.playletLibUrlLabel.text = `Playlet-Lib: ${m.top.libUrl}`
|
|
||||||
end function
|
|
||||||
@@ -2,28 +2,16 @@
|
|||||||
|
|
||||||
<component name="SettingsScreen" extends="Group">
|
<component name="SettingsScreen" extends="Group">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="appVersion" type="string" value="N/A" onChange="SetVersionLabel" />
|
|
||||||
<field id="libVersion" type="string" value="N/A" onChange="SetVersionLabel" />
|
|
||||||
<field id="latestVersion" type="string" value="N/A" onChange="SetVersionLabel" />
|
|
||||||
<field id="libUrl" type="string" value="N/A" onChange="SetPlayletLibUrlLabel" />
|
|
||||||
<field id="url" type="string" onChange="OnUrlSet" />
|
<field id="url" type="string" onChange="OnUrlSet" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<Label
|
<Label
|
||||||
id='VersionLabel'
|
|
||||||
height='60'
|
height='60'
|
||||||
width='1280'
|
width='1280'
|
||||||
font='font:MediumBoldSystemFont'
|
font='font:MediumBoldSystemFont'
|
||||||
horizAlign="center"
|
horizAlign="center"
|
||||||
translation="[0,80]"
|
translation="[0,92]"
|
||||||
/>
|
text="Open in a web browser to configure Playlet:"
|
||||||
<Label
|
|
||||||
id='PlayletLibUrlLabel'
|
|
||||||
height='60'
|
|
||||||
width='1280'
|
|
||||||
font='font:SmallestBoldSystemFont'
|
|
||||||
horizAlign="center"
|
|
||||||
translation="[0,120]"
|
|
||||||
/>
|
/>
|
||||||
<QRPoster
|
<QRPoster
|
||||||
id='SettingsQRPoster'
|
id='SettingsQRPoster'
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import "pkg:/source/services/Invidious.bs"
|
||||||
|
|
||||||
|
@asynctask
|
||||||
|
function MarkVideoWatchedTask(input as object) as object
|
||||||
|
videoId = input.videoId
|
||||||
|
|
||||||
|
success = Invidious.MarkVideoWatched(videoId)
|
||||||
|
return {
|
||||||
|
success: success
|
||||||
|
}
|
||||||
|
end function
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
import "pkg:/source/services/Invidious.bs"
|
import "pkg:/source/services/Invidious.bs"
|
||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
import "pkg:/components/SponsorBlockNotification/SponsorBlockNotificationManager.bs"
|
import "pkg:/components/SponsorBlockNotification/SponsorBlockNotificationManager.bs"
|
||||||
|
import "pkg:/components/VideoPlayer/MarkVideoWatchedTask.bs"
|
||||||
|
|
||||||
function PlayVideo(videoId as string, args = invalid as object)
|
function PlayVideo(videoId as string, args = invalid as object)
|
||||||
sender = args?.sender
|
sender = args?.sender
|
||||||
@@ -35,6 +37,8 @@ function PlayVideo(videoId as string, args = invalid as object)
|
|||||||
if videoContainer.fullscreen
|
if videoContainer.fullscreen
|
||||||
videoContainer.videoPlayer.SetFocus(true)
|
videoContainer.videoPlayer.SetFocus(true)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
StartAsyncTask(MarkVideoWatchedTask, { videoId: videoId })
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function CloseVideo(setFocus = true as boolean)
|
function CloseVideo(setFocus = true as boolean)
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ function OnVideoDetailsTaskResults(output as object) as void
|
|||||||
if videoId <> m.top.videoId
|
if videoId <> m.top.videoId
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
if not metadata.success
|
if (not metadata.success) or (metadata.data = invalid)
|
||||||
m.busySpinner.visible = false
|
m.busySpinner.visible = false
|
||||||
m.busySpinner.control = "stop"
|
m.busySpinner.control = "stop"
|
||||||
message = `Failed to load video information for ${videoId}`
|
message = `Failed to load video information for ${videoId}`
|
||||||
@@ -117,14 +117,6 @@ function OnVideoDetailsTaskResults(output as object) as void
|
|||||||
end if
|
end if
|
||||||
playletStreamUrls.push(hlsUrlLocal)
|
playletStreamUrls.push(hlsUrlLocal)
|
||||||
else
|
else
|
||||||
if metadata.formatStreams.Count() > 0
|
|
||||||
stream = metadata.formatStreams[metadata.formatStreams.Count() - 1]
|
|
||||||
itag = stream.itag
|
|
||||||
|
|
||||||
playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, false))
|
|
||||||
playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, true))
|
|
||||||
end if
|
|
||||||
|
|
||||||
if metadata.dashUrl <> invalid
|
if metadata.dashUrl <> invalid
|
||||||
|
|
||||||
#if DASH_THUMBNAILS
|
#if DASH_THUMBNAILS
|
||||||
@@ -143,6 +135,13 @@ function OnVideoDetailsTaskResults(output as object) as void
|
|||||||
playletStreamUrls.push(dashUrlLocal)
|
playletStreamUrls.push(dashUrlLocal)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if metadata.formatStreams.Count() > 0
|
||||||
|
stream = metadata.formatStreams[metadata.formatStreams.Count() - 1]
|
||||||
|
itag = stream.itag
|
||||||
|
|
||||||
|
playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, false))
|
||||||
|
playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, true))
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
metadata.playletStreamUrls = playletStreamUrls
|
metadata.playletStreamUrls = playletStreamUrls
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import "pkg:/components/VideoPlayer/VideoPlayerCaptionsTask.bs"
|
||||||
|
|
||||||
function SetCaptions(metadata as object, videoPlayer as object, contentNode as object) as void
|
function SetCaptions(metadata as object, videoPlayer as object, contentNode as object) as void
|
||||||
if metadata.captions.Count() = 0
|
if metadata.captions.Count() = 0
|
||||||
return
|
return
|
||||||
@@ -18,4 +20,35 @@ function SetCaptions(metadata as object, videoPlayer as object, contentNode as o
|
|||||||
end for
|
end for
|
||||||
contentNode.ClosedCaptions = True
|
contentNode.ClosedCaptions = True
|
||||||
contentNode.SubtitleTracks = subtitleTracks
|
contentNode.SubtitleTracks = subtitleTracks
|
||||||
|
|
||||||
|
' Searching for a working caption could cause a delay in the video player start.
|
||||||
|
' This is why it is behind a feature flag.
|
||||||
|
#if CAPTION_INSTANCE_SEARCH
|
||||||
|
StartAsyncTask(VideoPlayerCaptionsTask, {
|
||||||
|
videoId: metadata.videoId,
|
||||||
|
instance: instance,
|
||||||
|
subtitleTracks: subtitleTracks
|
||||||
|
}, OnVideoPlayerCaptionsTaskResults)
|
||||||
|
#end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnVideoPlayerCaptionsTaskResults(output as object) as void
|
||||||
|
changed = output.result.changed
|
||||||
|
if not changed
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
videoId = output.result.videoId
|
||||||
|
if m.top.videoId <> videoId
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
state = m.top.state
|
||||||
|
contentNode = m.top.content
|
||||||
|
contentNode.Update({
|
||||||
|
SubtitleTracks: output.result.subtitleTracks
|
||||||
|
})
|
||||||
|
if state = "buffering" or state = "playing"
|
||||||
|
m.top.control = "play"
|
||||||
|
end if
|
||||||
end function
|
end function
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
import "pkg:/source/roku_modules/rokurequests/Requests.brs"
|
||||||
|
import "pkg:/source/services/InvidiousSettings.bs"
|
||||||
|
|
||||||
|
@asynctask
|
||||||
|
function VideoPlayerCaptionsTask(input as object) as object
|
||||||
|
originalInstance = input.instance
|
||||||
|
subtitleTracks = input.subtitleTracks
|
||||||
|
if subtitleTracks.Count() = 0
|
||||||
|
return {
|
||||||
|
changed: false
|
||||||
|
}
|
||||||
|
end if
|
||||||
|
|
||||||
|
track = subtitleTracks[0]
|
||||||
|
url = track.TrackName
|
||||||
|
|
||||||
|
if IsValidSubtitleTrack(url)
|
||||||
|
return {
|
||||||
|
changed: false
|
||||||
|
}
|
||||||
|
end if
|
||||||
|
|
||||||
|
failedInstances = {}
|
||||||
|
failedInstances[originalInstance] = true
|
||||||
|
|
||||||
|
instances = InvidiousSettings.GetCurrentInstances()
|
||||||
|
for each instance in instances
|
||||||
|
if failedInstances[instance] = true
|
||||||
|
continue for
|
||||||
|
end if
|
||||||
|
|
||||||
|
instanceUrl = url.Replace(originalInstance, instance)
|
||||||
|
if IsValidSubtitleTrack(instanceUrl)
|
||||||
|
for i = 0 to subtitleTracks.Count() - 1
|
||||||
|
subtitleTracks[i].TrackName = subtitleTracks[i].TrackName.Replace(originalInstance, instance)
|
||||||
|
end for
|
||||||
|
|
||||||
|
return {
|
||||||
|
changed: true,
|
||||||
|
videoId: input.videoId,
|
||||||
|
subtitleTracks: subtitleTracks
|
||||||
|
}
|
||||||
|
else
|
||||||
|
failedInstances[instance] = true
|
||||||
|
end if
|
||||||
|
|
||||||
|
end for
|
||||||
|
|
||||||
|
return {
|
||||||
|
changed: false
|
||||||
|
}
|
||||||
|
end function
|
||||||
|
|
||||||
|
function IsValidSubtitleTrack(url as string) as boolean
|
||||||
|
response = Requests().get(url, { parseJson: false })
|
||||||
|
' A popular instance will return a valid format
|
||||||
|
' WEBVTT
|
||||||
|
' Kind: captions
|
||||||
|
' Language: en
|
||||||
|
' But won't include any caption items
|
||||||
|
return response.ok and response.text.StartsWith("WEBVTT") and response.text.len() > 50
|
||||||
|
end function
|
||||||
@@ -31,6 +31,15 @@ namespace Http
|
|||||||
RegistryUtils.Delete("search_history")
|
RegistryUtils.Delete("search_history")
|
||||||
response.Default(204, "OK")
|
response.Default(204, "OK")
|
||||||
return true
|
return true
|
||||||
|
else if payload.command = "set-playlet-lib-urls"
|
||||||
|
content = payload.content
|
||||||
|
if content = invalid
|
||||||
|
RegistryUtils.Delete("playlet_lib_urls")
|
||||||
|
else
|
||||||
|
RegistryUtils.Write("playlet_lib_urls", content)
|
||||||
|
end if
|
||||||
|
response.Default(204, "OK")
|
||||||
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
response.Default(400, `Invalid command: ${payload.command}`)
|
response.Default(400, `Invalid command: ${payload.command}`)
|
||||||
|
|||||||
@@ -69,7 +69,9 @@ function WebServerLoop()
|
|||||||
#if WEB_SERVER_BASIC_AUTH
|
#if WEB_SERVER_BASIC_AUTH
|
||||||
m.server.UseRouter(new Http.BasicAuthMiddleware())
|
m.server.UseRouter(new Http.BasicAuthMiddleware())
|
||||||
#end if
|
#end if
|
||||||
|
#if DEBUG
|
||||||
m.server.UseRouter(new Http.RegistryApiRouter())
|
m.server.UseRouter(new Http.RegistryApiRouter())
|
||||||
|
#end if
|
||||||
m.server.UseRouter(new Http.HttpDefaultRouter())
|
m.server.UseRouter(new Http.HttpDefaultRouter())
|
||||||
|
|
||||||
timeout = m.settings.Timeout
|
timeout = m.settings.Timeout
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -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=8
|
minor_version=9
|
||||||
build_version=00000
|
build_version=00000
|
||||||
|
|
||||||
sg_component_libs_provided=PlayletLib
|
sg_component_libs_provided=PlayletLib
|
||||||
@@ -10,4 +10,4 @@ hidden=1
|
|||||||
|
|
||||||
git_commit_sha=unknown
|
git_commit_sha=unknown
|
||||||
|
|
||||||
bs_const=DEBUG=false;WEB_SERVER_BASIC_AUTH=false;DASH_THUMBNAILS=false;WEB_SOCKETS=true
|
bs_const=DEBUG=false;WEB_SERVER_BASIC_AUTH=false;DASH_THUMBNAILS=false;WEB_SOCKETS=true;CAPTION_INSTANCE_SEARCH=false
|
||||||
@@ -13,11 +13,12 @@ namespace Invidious
|
|||||||
const STATS_ENDPOINT = "/api/v1/stats"
|
const STATS_ENDPOINT = "/api/v1/stats"
|
||||||
|
|
||||||
const VIDEOS_ENDPOINT = "/api/v1/videos"
|
const VIDEOS_ENDPOINT = "/api/v1/videos"
|
||||||
|
const HISTORY_ENDPOINT = "/api/v1/auth/history"
|
||||||
|
|
||||||
const SEARCH_SUGGEST_ENDPOINT = "/api/v1/search/suggestions"
|
const SEARCH_SUGGEST_ENDPOINT = "/api/v1/search/suggestions"
|
||||||
const SEARCH_ENDPOINT = "/api/v1/search"
|
const SEARCH_ENDPOINT = "/api/v1/search"
|
||||||
|
|
||||||
const AUTH_SCOPE = "GET:feed,GET:playlists,POST:tokens/unregister"
|
const AUTH_SCOPE = "GET:feed,GET:playlists,POST:tokens/unregister,POST:history*"
|
||||||
const AUTH_FEED = "/api/v1/auth/feed"
|
const AUTH_FEED = "/api/v1/auth/feed"
|
||||||
const AUTH_PLAYLISTS = "/api/v1/auth/playlists"
|
const AUTH_PLAYLISTS = "/api/v1/auth/playlists"
|
||||||
const AUTH_TOKENS_UNREGISTER = "/api/v1/auth/tokens/unregister"
|
const AUTH_TOKENS_UNREGISTER = "/api/v1/auth/tokens/unregister"
|
||||||
@@ -60,12 +61,29 @@ namespace Invidious
|
|||||||
response = Requests().get(url, args)
|
response = Requests().get(url, args)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
success: response.statuscode = 200,
|
success: response.ok,
|
||||||
statusCode: response.statuscode,
|
statusCode: response.statuscode,
|
||||||
data: response.json ?? response.text
|
data: response.json
|
||||||
}
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function MarkVideoWatched(videoId as string) as boolean
|
||||||
|
authToken = InvidiousSettings.GetAuthToken()
|
||||||
|
if authToken = invalid
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
url = `${authToken.instance}${Invidious.HISTORY_ENDPOINT}/${videoId}`
|
||||||
|
headers = Invidious.GetAuthenticationHeaders(authToken.token)
|
||||||
|
args = {
|
||||||
|
headers: headers,
|
||||||
|
parseJson: false
|
||||||
|
}
|
||||||
|
|
||||||
|
response = Requests().post(url, args)
|
||||||
|
return response.ok
|
||||||
|
end function
|
||||||
|
|
||||||
function SearchSuggestions(q as string) as object 'SearchSuggestionResult
|
function SearchSuggestions(q as string) as object 'SearchSuggestionResult
|
||||||
instance = InvidiousSettings.GetSelectedInstance()
|
instance = InvidiousSettings.GetSelectedInstance()
|
||||||
url = `${instance}${Invidious.SEARCH_SUGGEST_ENDPOINT}`
|
url = `${instance}${Invidious.SEARCH_SUGGEST_ENDPOINT}`
|
||||||
@@ -127,7 +145,8 @@ namespace Invidious
|
|||||||
expire = TimeUtils.Now().AsSeconds() + 60 * 60 * 24 * 365 * 2 '2 years from now
|
expire = TimeUtils.Now().AsSeconds() + 60 * 60 * 24 * 365 * 2 '2 years from now
|
||||||
|
|
||||||
callbackUrl = `http://${localIp}:${webServerPort}${Invidious.TOKEN_CALLBACK}?ref=${instance}`.EncodeUriComponent()
|
callbackUrl = `http://${localIp}:${webServerPort}${Invidious.TOKEN_CALLBACK}?ref=${instance}`.EncodeUriComponent()
|
||||||
return `${invidiousHost}/authorize_token?scopes=${Invidious.AUTH_SCOPE}&callback_url=${callbackUrl}&expire=${expire}`
|
scope = `${Invidious.AUTH_SCOPE}`.EncodeUriComponent()
|
||||||
|
return `${invidiousHost}/authorize_token?scopes=${scope}&callback_url=${callbackUrl}&expire=${expire}`
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetAuthenticationHeaders(token as string) as object
|
function GetAuthenticationHeaders(token as string) as object
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import "pkg:/source/utils/RegistryUtils.bs"
|
||||||
|
|
||||||
namespace InvidiousSettings
|
namespace InvidiousSettings
|
||||||
|
|
||||||
const DEFAULT_INSTANCE = "https://vid.puffyan.us"
|
const DEFAULT_INSTANCE = "https://vid.puffyan.us"
|
||||||
|
|||||||
Generated
+1142
-959
File diff suppressed because it is too large.
Load diff
+13
-13
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.8.0",
|
"version": "0.9.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@@ -9,19 +9,19 @@
|
|||||||
"check": "svelte-check --tsconfig ./tsconfig.json"
|
"check": "svelte-check --tsconfig ./tsconfig.json"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^1.1.0",
|
"@sveltejs/vite-plugin-svelte": "^2.1.0",
|
||||||
"@tsconfig/svelte": "^3.0.0",
|
"@tsconfig/svelte": "^4.0.1",
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.14",
|
||||||
"daisyui": "^2.42.1",
|
"daisyui": "^2.51.5",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"internal-ip": "^7.0.0",
|
"internal-ip": "^7.0.0",
|
||||||
"postcss": "^8.4.19",
|
"postcss": "^8.4.23",
|
||||||
"svelte": "^3.52.0",
|
"svelte": "^3.58.0",
|
||||||
"svelte-check": "^2.9.2",
|
"svelte-check": "^3.2.0",
|
||||||
"svelte-preprocess": "^4.10.7",
|
"svelte-preprocess": "^5.0.3",
|
||||||
"tailwindcss": "^3.2.4",
|
"tailwindcss": "^3.3.1",
|
||||||
"tslib": "^2.4.0",
|
"tslib": "^2.5.0",
|
||||||
"typescript": "^4.6.4",
|
"typescript": "^5.0.4",
|
||||||
"vite": "^3.2.3"
|
"vite": "^4.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,6 +76,15 @@
|
|||||||
<h5>Feedback is welcome over at: <a id="feedback-url" href="https://github.com/iBicha/playlet"
|
<h5>Feedback is welcome over at: <a id="feedback-url" href="https://github.com/iBicha/playlet"
|
||||||
target="_blank">https://github.com/iBicha/playlet</a></h5>
|
target="_blank">https://github.com/iBicha/playlet</a></h5>
|
||||||
|
|
||||||
|
<div id="dev-menu" style="display: none;">
|
||||||
|
<h4>Developer menu</h4>
|
||||||
|
<p><small>These are for testing purposes only, and are not meant to be used by end users.</small></p>
|
||||||
|
<label for="playlet-lib-tag">Playlet Lib Tag:</label>
|
||||||
|
<select name="playlet-lib-tag" id="playlet-lib-tag">
|
||||||
|
<option value="">latest (default)</option>
|
||||||
|
</select>
|
||||||
|
<button onclick="SetPlayletLibUrls()">Apply</button>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function Login() {
|
function Login() {
|
||||||
if (!window.appState) {
|
if (!window.appState) {
|
||||||
@@ -249,6 +258,49 @@ ${JSON.stringify(window.appState.invidious, null, 2)}
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function FetchReleaseTags() {
|
||||||
|
fetch("https://api.github.com/repos/iBicha/playlet/releases")
|
||||||
|
.then(function (response) {
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.then(function (releases) {
|
||||||
|
releases.filter(release => release.assets.filter(asset => asset.name === "playlet-lib.zip").length > 0)
|
||||||
|
.forEach(r => {
|
||||||
|
var option = document.createElement("option");
|
||||||
|
option.text = r.tag_name;
|
||||||
|
option.value = r.tag_name;
|
||||||
|
document.getElementById("playlet-lib-tag").add(option);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function SetPlayletLibUrls() {
|
||||||
|
var tags = document.getElementById("playlet-lib-tag");
|
||||||
|
var value = tags.value;
|
||||||
|
let content = null
|
||||||
|
|
||||||
|
if(value !== ""){
|
||||||
|
content = JSON.stringify([{
|
||||||
|
link: `https://github.com/iBicha/playlet/releases/download/${value}/playlet-lib.zip`,
|
||||||
|
type: 'custom'
|
||||||
|
}]);
|
||||||
|
}
|
||||||
|
|
||||||
|
PostJson('/api/command', { command: "set-playlet-lib-urls", content: content })
|
||||||
|
.then(function (response) {
|
||||||
|
alert("Playlet lib tag updated. Restart Playlet to reflect changes.");
|
||||||
|
window.location.reload();
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
alert(err)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ShouldShowDevMenu() {
|
||||||
|
const urlSearchParams = new URLSearchParams(window.location.search);
|
||||||
|
return !!urlSearchParams.get('dev')
|
||||||
|
}
|
||||||
|
|
||||||
function Initialize() {
|
function Initialize() {
|
||||||
fetch("/api/state")
|
fetch("/api/state")
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
@@ -293,6 +345,10 @@ ${JSON.stringify(window.appState.invidious, null, 2)}
|
|||||||
});
|
});
|
||||||
|
|
||||||
SetupWebSocket();
|
SetupWebSocket();
|
||||||
|
if(ShouldShowDevMenu()){
|
||||||
|
document.getElementById("dev-menu").style.display = "block";
|
||||||
|
FetchReleaseTags();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var tableRow;
|
var tableRow;
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 122.88 122.88"
|
||||||
|
style="enable-background:new 0 0 122.88 122.88" xml:space="preserve"><g><path fill="#FFFFFF" d="M61.44,9.23c-1.85,0-3.64,0.08-5.35,0.25c-1.71,0.17-3.44,0.42-5.17,0.77c-1.72,0.34-3.39,0.77-5,1.26 c-1.59,0.49-3.16,1.07-4.7,1.72l-0.1,0.05l0,0c-1.63,0.7-3.18,1.45-4.67,2.25c-1.5,0.81-2.94,1.68-4.31,2.6 c-1.38,0.93-2.72,1.92-3.99,2.97c-1.27,1.05-2.5,2.16-3.68,3.35l-0.04,0.04c-1.18,1.18-2.29,2.4-3.33,3.66 c-1.05,1.28-2.04,2.61-2.97,3.99c-0.92,1.36-1.78,2.8-2.59,4.3c-0.8,1.49-1.56,3.05-2.26,4.67l-0.05,0.11l0,0l-0.07,0.14 c-0.63,1.5-1.19,3.04-1.67,4.61c-0.49,1.59-0.9,3.23-1.24,4.93c-0.35,1.73-0.6,3.45-0.77,5.17c-0.17,1.72-0.25,3.5-0.25,5.35 c0,1.85,0.08,3.64,0.25,5.35c0.17,1.71,0.42,3.44,0.77,5.17c0.35,1.72,0.77,3.39,1.27,5c0.49,1.57,1.05,3.13,1.7,4.66 c0.04,0.07,0.07,0.14,0.1,0.21c0.69,1.6,1.43,3.13,2.23,4.6c0.81,1.5,1.68,2.94,2.59,4.3c0.93,1.39,1.92,2.72,2.98,4 c1.02,1.24,2.11,2.44,3.26,3.59c0.07,0.06,0.13,0.12,0.19,0.19c1.16,1.16,2.36,2.24,3.59,3.26c1.28,1.05,2.61,2.04,3.99,2.97 c1.36,0.92,2.8,1.78,4.3,2.59c1.49,0.8,3.05,1.56,4.67,2.26l0.21,0.1c1.52,0.64,3.07,1.2,4.67,1.69c1.58,0.49,3.23,0.9,4.92,1.24 c1.73,0.35,3.45,0.6,5.17,0.77c1.72,0.17,3.5,0.25,5.35,0.25c1.85,0,3.64-0.08,5.35-0.25c1.71-0.17,3.44-0.42,5.17-0.77 c1.72-0.35,3.39-0.77,5-1.27c1.59-0.49,3.16-1.07,4.71-1.73l0.09-0.04l0-0.01c1.63-0.7,3.18-1.45,4.67-2.25 c1.5-0.81,2.94-1.68,4.31-2.6c1.38-0.93,2.72-1.92,3.99-2.97c1.25-1.03,2.45-2.12,3.62-3.29c0.06-0.06,0.11-0.12,0.18-0.18 c1.15-1.15,2.23-2.35,3.25-3.58c1.05-1.28,2.05-2.61,2.98-4c0.92-1.36,1.78-2.8,2.59-4.3c0.8-1.49,1.56-3.04,2.26-4.67l0.1-0.22 c0.64-1.51,1.2-3.06,1.69-4.65c0.49-1.59,0.9-3.23,1.24-4.93c0.35-1.73,0.6-3.45,0.77-5.17c0.17-1.72,0.25-3.5,0.25-5.35 c0-1.85-0.08-3.64-0.25-5.35c-0.17-1.71-0.42-3.44-0.77-5.17c-0.35-1.72-0.77-3.39-1.27-5c-0.49-1.59-1.07-3.16-1.73-4.71 l-0.04-0.09l0,0c-0.7-1.63-1.45-3.18-2.25-4.67c-0.81-1.5-1.68-2.94-2.59-4.3c-0.93-1.38-1.92-2.72-2.97-3.99 c-1.02-1.24-2.12-2.45-3.28-3.61c-0.07-0.06-0.13-0.12-0.18-0.18c-1.16-1.16-2.35-2.24-3.59-3.26c-1.28-1.05-2.61-2.04-3.99-2.97 c-1.37-0.92-2.8-1.78-4.3-2.59c-1.49-0.8-3.04-1.56-4.67-2.25l-0.19-0.09c-1.52-0.64-3.08-1.21-4.68-1.7 c-1.58-0.49-3.23-0.9-4.93-1.24c-1.73-0.35-3.45-0.6-5.17-0.77C65.08,9.31,63.29,9.23,61.44,9.23L61.44,9.23z M63.34,31.17 c2.19,0,3.91,0.63,5.16,1.88c1.24,1.25,1.87,2.96,1.87,5.17c0,2.24-1.07,4.22-3.21,5.97c-2.16,1.74-4.66,2.62-7.52,2.62 c-2.14,0-3.85-0.6-5.16-1.8c-1.31-1.22-1.96-2.79-1.96-4.75c0-2.47,1.07-4.59,3.19-6.4C57.82,32.06,60.37,31.17,63.34,31.17 L63.34,31.17L63.34,31.17z M75.55,91.71H47.33v-4.75h5.3V57.95h-5.3v-3.78h13.19c3.33,0,6.61-0.4,9.85-1.22v34.01h5.18L75.55,91.71 L75.55,91.71L75.55,91.71z M49.12,1.2c1.96-0.39,3.99-0.69,6.08-0.89C57.29,0.1,59.37,0,61.44,0c2.07,0,4.15,0.1,6.24,0.31 c2.09,0.2,4.12,0.5,6.08,0.89c1.94,0.39,3.88,0.88,5.82,1.48c1.88,0.58,3.74,1.26,5.58,2.04l0.19,0.07l0,0l0.06,0.02 c1.85,0.8,3.65,1.67,5.38,2.61c1.71,0.93,3.4,1.95,5.07,3.07c1.63,1.1,3.21,2.27,4.73,3.52c1.52,1.25,2.97,2.56,4.34,3.95 c1.38,1.38,2.7,2.83,3.95,4.34c1.25,1.52,2.42,3.09,3.52,4.73c1.09,1.63,2.11,3.32,3.06,5.06l0,0l0.01,0 c0.94,1.74,1.82,3.54,2.61,5.39c0.02,0.05,0.04,0.1,0.06,0.15c0.78,1.83,1.46,3.7,2.05,5.6c0.61,1.96,1.11,3.92,1.5,5.89 c0.39,1.96,0.69,3.99,0.89,6.08c0.2,2.09,0.3,4.17,0.3,6.24c0,2.07-0.1,4.15-0.31,6.24c-0.2,2.09-0.5,4.12-0.89,6.08 c-0.39,1.94-0.88,3.88-1.48,5.82c-0.58,1.89-1.27,3.76-2.05,5.62l-0.04,0.09l0,0l-0.05,0.11c-0.8,1.85-1.67,3.65-2.61,5.38 c-0.93,1.71-1.95,3.4-3.07,5.07c-1.1,1.63-2.27,3.21-3.52,4.73c-1.25,1.52-2.56,2.96-3.95,4.34c-1.38,1.38-2.83,2.7-4.35,3.95 c-1.52,1.25-3.09,2.42-4.72,3.51c-1.63,1.09-3.32,2.11-5.06,3.06c-1.78,0.96-3.57,1.84-5.39,2.62c-0.05,0.02-0.1,0.04-0.16,0.06 c-1.83,0.78-3.7,1.46-5.6,2.05c-1.96,0.61-3.92,1.11-5.88,1.5c-1.96,0.39-3.99,0.69-6.08,0.89c-2.09,0.2-4.17,0.3-6.24,0.3 s-4.15-0.1-6.24-0.3c-2.09-0.2-4.12-0.5-6.08-0.89c-1.94-0.39-3.88-0.88-5.82-1.48c-1.89-0.58-3.76-1.27-5.61-2.05l-0.2-0.08l0,0 c-1.85-0.8-3.65-1.67-5.38-2.61c-1.71-0.93-3.4-1.95-5.07-3.07c-1.63-1.09-3.21-2.27-4.72-3.51c-1.52-1.25-2.97-2.57-4.35-3.95 c-1.38-1.38-2.7-2.83-3.95-4.34c-1.25-1.52-2.42-3.1-3.52-4.73c-1.09-1.63-2.11-3.32-3.06-5.06c-0.97-1.78-1.84-3.58-2.62-5.4 c-0.02-0.05-0.04-0.1-0.06-0.15c-0.78-1.83-1.46-3.7-2.05-5.6c-0.61-1.96-1.11-3.93-1.5-5.89c-0.39-1.96-0.69-3.99-0.89-6.08 C0.1,65.59,0,63.51,0,61.44c0-2.07,0.1-4.15,0.31-6.24c0.2-2.09,0.5-4.12,0.89-6.08c0.39-1.94,0.88-3.88,1.48-5.82 c0.58-1.88,1.26-3.74,2.04-5.59l0.09-0.23l0,0c0.8-1.85,1.67-3.65,2.61-5.38c0.93-1.71,1.95-3.4,3.07-5.07 c1.1-1.63,2.27-3.21,3.52-4.73c1.25-1.52,2.56-2.96,3.95-4.34c1.38-1.38,2.83-2.7,4.34-3.95c1.52-1.25,3.09-2.42,4.73-3.52 c1.67-1.12,3.36-2.14,5.07-3.07l0.13-0.06c1.73-0.94,3.48-1.78,5.26-2.55c0.05-0.02,0.1-0.04,0.15-0.06 c1.83-0.78,3.7-1.46,5.6-2.05C45.19,2.09,47.15,1.59,49.12,1.2L49.12,1.2z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 4.9 KiB |
@@ -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=8
|
minor_version=9
|
||||||
build_version=00000
|
build_version=00000
|
||||||
|
|
||||||
## Channel Assets
|
## Channel Assets
|
||||||
|
|||||||
Reference in new issue
Block a user