Compare commits

...
16 Commits
Author SHA1 Message Date
Brahim Hadriche e2822baac1 Release v0.13.0 (#159) 2023-10-02 09:17:19 -04:00
Brahim Hadricheandgithub-action linter 256fc22bd9 Bug/a few fixes (#158)
* Change default instance

* Fix cropped buttons

* Lint fix

* changelog

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
2023-10-02 09:10:52 -04:00
Brahim Hadriche cb877f9415 Xml consistency pass 2023-09-30 08:58:02 -04:00
Brahim Hadricheandgithub-action linter acce520752 Sort imports (#155)
* Sort imports

* Lint fix

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
2023-09-29 18:16:00 -04:00
Brahim Hadriche 5d81f025ad Log testing errors 2023-09-23 22:53:19 -04:00
Brahim Hadriche c5680f7b06 Add Etag support (#151)
* Add Etag support

* small tweak
2023-09-23 18:22:23 -04:00
Brahim Hadriche dab6dc5bc4 Feature/channel view content (#150)
* ChannelView feeds

* Fixes for web app

* Add request id to error message
2023-09-22 17:52:53 -04:00
Brahim Hadriche e2df0b524a Fix copy paste bug 2023-09-21 15:41:40 -04:00
Brahim Hadriche 7401263f0d Release v0.12.1 (#148) 2023-09-19 18:32:35 -04:00
Brahim Hadriche 90fe768d2c Changelog 2023-09-19 18:27:33 -04:00
Brahim Hadriche 5c1a62b7f3 Push transpiled files 2023-09-19 18:16:52 -04:00
Brahim Hadriche 44578bd6c5 Remove ropm 2023-09-19 18:14:45 -04:00
Brahim Hadriche 75b8ad1c0c log tweak 2023-09-19 18:01:12 -04:00
Brahim Hadriche 2b1d707f6d port not needed 2023-09-19 17:51:28 -04:00
Brahim Hadriche 190dcdffe3 Feature/logger (#147)
* todos

* New logger

* Remove roku-log
2023-09-19 17:49:48 -04:00
Brahim Hadriche cf6d89f44f Update PRIVACY.md 2023-09-18 16:20:28 -04:00
135 changed files with 1243 additions and 1349 deletions

No files matched your search

+34
View File
@@ -5,6 +5,40 @@ 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.13.0] - 2023-10-02
### Added
- Playlists, streams, podcasts and related channels to Channel UI
- Pagination supported
- Channels show up in web app (but no UI for channel details yet)
- Support for `Etag` header on the web server to improve performance with caching
### Fixed
- Another bug where the app crashes if an error happens loading channel info
- Issue with default instance (by changing default instance)
- Cropped text in a couple of buttons
### Removed
- Partial content (`Range` header) from the web server, since we never serve very big files
## [0.12.1] - 2023-09-19
### Added
- New logger: less features, and less rendezvous
### Fixed
- A bug where the app crashes if an error happens loading channel info
### Removed
- `roku-log` package
- `ropm`
## [0.12.0] - 2023-09-17 ## [0.12.0] - 2023-09-17
### Added ### Added
+1 -1
View File
@@ -19,7 +19,7 @@ could be public instances hosted by volenteers. These instances are available
While invidious does no data collection by default, and it is in fact built to While invidious does no data collection by default, and it is in fact built to
be privacy driven, but in theory, from a playlet request it is possible to be privacy driven, but in theory, from a playlet request it is possible to
know the IP address of a user, the identifiers of watched video, and search know the IP address of a user, the identifiers of watched video, and search
keywords. In case the user is unreasonably paranoid, they can host their own keywords. In case the user has privacy concerns, they can host their own
Invidious instance and use it from Playlet. Invidious instance and use it from Playlet.
## SponsorBlock ## SponsorBlock
+2 -2
View File
@@ -39,7 +39,6 @@
], ],
"lintConfig": "./config/bslint.jsonc", "lintConfig": "./config/bslint.jsonc",
"plugins": [ "plugins": [
"roku-log-bsc-plugin",
"@rokucommunity/bslint", "@rokucommunity/bslint",
"../tools/bs-plugins/asynctask-plugin.ts", "../tools/bs-plugins/asynctask-plugin.ts",
"../tools/bs-plugins/manifest-edit-plugin.ts", "../tools/bs-plugins/manifest-edit-plugin.ts",
@@ -48,7 +47,8 @@
"../tools/bs-plugins/oninit-plugin.ts", "../tools/bs-plugins/oninit-plugin.ts",
"../tools/bs-plugins/track-transpiled-plugin.ts", "../tools/bs-plugins/track-transpiled-plugin.ts",
"../tools/bs-plugins/json-yaml-plugin.ts", "../tools/bs-plugins/json-yaml-plugin.ts",
"../tools/bs-plugins/validation-plugin.ts" "../tools/bs-plugins/validation-plugin.ts",
"../tools/bs-plugins/logger-plugin.ts"
], ],
"retainStagingDir": true, "retainStagingDir": true,
"require": [ "require": [
+2 -2
View File
@@ -14,7 +14,6 @@
"!**/*.transpiled.*" "!**/*.transpiled.*"
], ],
"plugins": [ "plugins": [
"roku-log-bsc-plugin",
"@rokucommunity/bslint", "@rokucommunity/bslint",
"rooibos-roku", "rooibos-roku",
"../tools/bs-plugins/asynctask-plugin.ts", "../tools/bs-plugins/asynctask-plugin.ts",
@@ -24,7 +23,8 @@
"../tools/bs-plugins/oninit-plugin.ts", "../tools/bs-plugins/oninit-plugin.ts",
"../tools/bs-plugins/track-transpiled-plugin.ts", "../tools/bs-plugins/track-transpiled-plugin.ts",
"../tools/bs-plugins/json-yaml-plugin.ts", "../tools/bs-plugins/json-yaml-plugin.ts",
"../tools/bs-plugins/validation-plugin.ts" "../tools/bs-plugins/validation-plugin.ts",
"../tools/bs-plugins/logger-plugin.ts"
], ],
"rooibos": { "rooibos": {
"logLevel": 2, "logLevel": 2,
+3 -1
View File
@@ -17,5 +17,7 @@
// Enforces all keywords and types to be lowercase. // Enforces all keywords and types to be lowercase.
"keywordCase": "lower", "keywordCase": "lower",
// Remove trailing whitespace at the end of each line. // Remove trailing whitespace at the end of each line.
"removeTrailingWhiteSpace": true "removeTrailingWhiteSpace": true,
// Sort imports alphabetically.
"sortImports": true
} }
+1 -1
View File
@@ -2,7 +2,7 @@ openapi: 3.0.0
info: info:
title: Playlet Web API title: Playlet Web API
version: 0.12.0 version: 0.13.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
+32 -610
View File
@@ -1,33 +1,31 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.12.0", "version": "0.13.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet", "name": "playlet",
"version": "0.12.0", "version": "0.13.0",
"hasInstallScript": true, "hasInstallScript": true,
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.9", "@rokucommunity/bslint": "^0.8.10",
"@types/fs-extra": "^11.0.1", "@types/fs-extra": "^11.0.2",
"@types/node": "^20.5.9", "@types/node": "^20.7.2",
"@types/xml2js": "^0.4.12", "@types/xml2js": "^0.4.12",
"argparse": "^2.0.1", "argparse": "^2.0.1",
"brighterscript": "^0.65.5", "brighterscript": "^0.65.7",
"brighterscript-formatter": "^1.6.31", "brighterscript-formatter": "^1.6.33",
"convert-svg-to-png": "^0.6.4", "convert-svg-to-png": "^0.6.4",
"cross-fetch": "^4.0.0", "cross-fetch": "^4.0.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.4", "glob": "^10.3.10",
"ip": "^1.1.8", "ip": "^1.1.8",
"json5": "^2.2.3", "json5": "^2.2.3",
"roku-deploy": "^3.10.3", "roku-deploy": "^3.10.3",
"roku-log-bsc-plugin": "^0.8.1",
"rooibos-roku": "^5.7.0", "rooibos-roku": "^5.7.0",
"ropm": "^0.10.16",
"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",
@@ -274,9 +272,9 @@
"dev": true "dev": true
}, },
"node_modules/@rokucommunity/bslint": { "node_modules/@rokucommunity/bslint": {
"version": "0.8.9", "version": "0.8.10",
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.9.tgz", "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.10.tgz",
"integrity": "sha512-7rXHcGL8XVguqzjKtsUoRvnm/g6ySJwV+xGO9n8Mc1r1zNIvjMi9Spfz1Kh8zJTXwfxOkG1X68lMAtp9bk/gxA==", "integrity": "sha512-2aaWPtt5xACm7sIaKR5ctF7f3HrjKGfTVSAT6ZGdojDsXPQanHK2+XyYX20fQVdjJFVn414UCfVkUiaO0PTtog==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
@@ -330,9 +328,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/fs-extra": { "node_modules/@types/fs-extra": {
"version": "11.0.1", "version": "11.0.2",
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.1.tgz", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.2.tgz",
"integrity": "sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==", "integrity": "sha512-c0hrgAOVYr21EX8J0jBMXGLMgJqVf/v6yxi0dLaJboW9aQPh16Id+z6w2Tx1hm+piJOLv8xPfVKZCLfjPw/IMQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/jsonfile": "*", "@types/jsonfile": "*",
@@ -349,9 +347,9 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.5.9", "version": "20.7.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.9.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.2.tgz",
"integrity": "sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==", "integrity": "sha512-RcdC3hOBOauLP+r/kRt27NrByYtDjsXyAuSbR87O6xpsvi763WI+5fbSIvYJrXnt9w4RuxhV6eAXfIs7aaf/FQ==",
"dev": true "dev": true
}, },
"node_modules/@types/xml2js": { "node_modules/@types/xml2js": {
@@ -373,26 +371,6 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"node_modules/@xml-tools/ast": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@xml-tools/ast/-/ast-5.0.5.tgz",
"integrity": "sha512-avvzTOvGplCx9JSKdsTe3vK+ACvsHy2HxVfkcfIqPzu+kF5CT4rw5aUVzs0tJF4cnDyMRVkSyVxR07X0Px8gPA==",
"dev": true,
"dependencies": {
"@xml-tools/common": "^0.1.6",
"@xml-tools/parser": "^1.0.11",
"lodash": "4.17.21"
}
},
"node_modules/@xml-tools/common": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/@xml-tools/common/-/common-0.1.6.tgz",
"integrity": "sha512-7aVZeEYccs1KI/Asd6KKnrB4dTAWXTkjRMjG40ApGEUp5NpfQIvWLEBvMv85Koj2lbSpagcAERwDy9qMsfWGdA==",
"dev": true,
"dependencies": {
"lodash": "4.17.21"
}
},
"node_modules/@xml-tools/parser": { "node_modules/@xml-tools/parser": {
"version": "1.0.11", "version": "1.0.11",
"resolved": "https://registry.npmjs.org/@xml-tools/parser/-/parser-1.0.11.tgz", "resolved": "https://registry.npmjs.org/@xml-tools/parser/-/parser-1.0.11.tgz",
@@ -480,19 +458,6 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true "dev": true
}, },
"node_modules/aggregate-error": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
"integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
"dev": true,
"dependencies": {
"clean-stack": "^2.0.0",
"indent-string": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/ajv": { "node_modules/ajv": {
"version": "6.12.6", "version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -570,15 +535,6 @@
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
"dev": true "dev": true
}, },
"node_modules/array-union": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/asn1": { "node_modules/asn1": {
"version": "0.2.6", "version": "0.2.6",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
@@ -603,15 +559,6 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"dev": true "dev": true
}, },
"node_modules/at-least-node": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
"dev": true,
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/aws-sign2": { "node_modules/aws-sign2": {
"version": "0.7.0", "version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -755,9 +702,9 @@
} }
}, },
"node_modules/brighterscript": { "node_modules/brighterscript": {
"version": "0.65.5", "version": "0.65.7",
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.5.tgz", "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.7.tgz",
"integrity": "sha512-xDkWIZhjTLhp6dVZ6lX7zWRyNvjdiAwZncJRnErSbqRhteNJFL7ic2UDJew9zCOYTQDrG7B85lpPpXc/1JlV+Q==", "integrity": "sha512-cmV0JzlYuKIKkMsbHR2FyaD2YugHeHESdMmUOtK61EsEUS895Y6yXftDVnFUwij7beLiZR6s1oRpMfiS7MJ40g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@rokucommunity/bslib": "^0.1.1", "@rokucommunity/bslib": "^0.1.1",
@@ -798,12 +745,12 @@
} }
}, },
"node_modules/brighterscript-formatter": { "node_modules/brighterscript-formatter": {
"version": "1.6.31", "version": "1.6.33",
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.31.tgz", "resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.33.tgz",
"integrity": "sha512-XOc1LVAUXrWtCwAZeOUS/7gH5TbiEqZ0IwyAJcM7J5CxrFpMrw6NKg/Yox1oKaH1m11kcLR7KgckK5CTha0eYQ==", "integrity": "sha512-XmirSAOBBHsprJvLOuh8nzXNiPQJXQa2NJ581OZdQrofFdBNPGH+yFhV6XXUZ+pA6fVLSxMxXA0toF83jtKjrA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"brighterscript": "^0.65.4", "brighterscript": "^0.65.7",
"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",
@@ -1235,15 +1182,6 @@
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
"dev": true "dev": true
}, },
"node_modules/clean-stack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
"integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/clear": { "node_modules/clear": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/clear/-/clear-0.1.0.tgz", "resolved": "https://registry.npmjs.org/clear/-/clear-0.1.0.tgz",
@@ -1648,28 +1586,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/del": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz",
"integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==",
"dev": true,
"dependencies": {
"globby": "^11.0.1",
"graceful-fs": "^4.2.4",
"is-glob": "^4.0.1",
"is-path-cwd": "^2.2.0",
"is-path-inside": "^3.0.2",
"p-map": "^4.0.0",
"rimraf": "^3.0.2",
"slash": "^3.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"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",
@@ -1713,18 +1629,6 @@
"node": ">=0.3.1" "node": ">=0.3.1"
} }
}, },
"node_modules/dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
"integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
"dev": true,
"dependencies": {
"path-type": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/dom-serializer": { "node_modules/dom-serializer": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
@@ -2251,12 +2155,6 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/get-own-enumerable-property-symbols": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
"integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
"dev": true
},
"node_modules/get-stdin": { "node_modules/get-stdin": {
"version": "8.0.0", "version": "8.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz",
@@ -2294,19 +2192,19 @@
} }
}, },
"node_modules/glob": { "node_modules/glob": {
"version": "10.3.4", "version": "10.3.10",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
"integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"foreground-child": "^3.1.0", "foreground-child": "^3.1.0",
"jackspeak": "^2.0.3", "jackspeak": "^2.3.5",
"minimatch": "^9.0.1", "minimatch": "^9.0.1",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
"path-scurry": "^1.10.1" "path-scurry": "^1.10.1"
}, },
"bin": { "bin": {
"glob": "dist/cjs/src/bin.js" "glob": "dist/esm/bin.mjs"
}, },
"engines": { "engines": {
"node": ">=16 || 14 >=14.17" "node": ">=16 || 14 >=14.17"
@@ -2393,26 +2291,6 @@
"node": ">=16 || 14 >=14.17" "node": ">=16 || 14 >=14.17"
} }
}, },
"node_modules/globby": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
"integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
"dev": true,
"dependencies": {
"array-union": "^2.1.0",
"dir-glob": "^3.0.1",
"fast-glob": "^3.2.9",
"ignore": "^5.2.0",
"merge2": "^1.4.1",
"slash": "^3.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/graceful-fs": { "node_modules/graceful-fs": {
"version": "4.2.11", "version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
@@ -2604,39 +2482,12 @@
} }
] ]
}, },
"node_modules/ignore": {
"version": "5.2.4",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
"dev": true,
"engines": {
"node": ">= 4"
}
},
"node_modules/ignore-walk": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz",
"integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==",
"dev": true,
"dependencies": {
"minimatch": "^3.0.4"
}
},
"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",
"integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
"dev": true "dev": true
}, },
"node_modules/indent-string": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
"integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/inflight": { "node_modules/inflight": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -2740,42 +2591,6 @@
"node": ">=0.12.0" "node": ">=0.12.0"
} }
}, },
"node_modules/is-obj": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-path-cwd": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
"integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/is-path-inside": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
"integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/is-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
"integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-typedarray": { "node_modules/is-typedarray": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -2801,9 +2616,9 @@
"dev": true "dev": true
}, },
"node_modules/jackspeak": { "node_modules/jackspeak": {
"version": "2.2.1", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",
"integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@isaacs/cliui": "^8.0.2" "@isaacs/cliui": "^8.0.2"
@@ -2911,12 +2726,6 @@
"setimmediate": "^1.0.5" "setimmediate": "^1.0.5"
} }
}, },
"node_modules/latinize": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/latinize/-/latinize-0.5.0.tgz",
"integrity": "sha512-SHzxgdcFP/64lUEfX3183QALY2KdSQxad3gmhCc/b03QN1mbx0AnJWvsQjqoJLbucY9pJuK+NMbnasUIocDmnQ==",
"dev": true
},
"node_modules/lcov-parse": { "node_modules/lcov-parse": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz",
@@ -2947,12 +2756,6 @@
"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",
@@ -3169,59 +2972,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/npm-bundled": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz",
"integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==",
"dev": true,
"dependencies": {
"npm-normalize-package-bin": "^1.0.1"
}
},
"node_modules/npm-normalize-package-bin": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==",
"dev": true
},
"node_modules/npm-packlist": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.1.4.tgz",
"integrity": "sha512-Qzg2pvXC9U4I4fLnUrBmcIT4x0woLtUgxUi9eC+Zrcv1Xx5eamytGAfbDWQ67j7xOcQ2VW1I3su9smVTIdu7Hw==",
"dev": true,
"dependencies": {
"glob": "^7.1.6",
"ignore-walk": "^3.0.3",
"npm-bundled": "^1.1.1",
"npm-normalize-package-bin": "^1.0.1"
},
"bin": {
"npm-packlist": "bin/index.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/npm-packlist/node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/nth-check": { "node_modules/nth-check": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
@@ -3321,21 +3071,6 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/p-map": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
"integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
"dev": true,
"dependencies": {
"aggregate-error": "^3.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-reflect": { "node_modules/p-reflect": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-reflect/-/p-reflect-1.0.0.tgz", "resolved": "https://registry.npmjs.org/p-reflect/-/p-reflect-1.0.0.tgz",
@@ -3489,15 +3224,6 @@
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
"dev": true "dev": true
}, },
"node_modules/path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"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",
@@ -3999,62 +3725,6 @@
"node": ">=4.0.0" "node": ">=4.0.0"
} }
}, },
"node_modules/roku-log-bsc-plugin": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/roku-log-bsc-plugin/-/roku-log-bsc-plugin-0.8.1.tgz",
"integrity": "sha512-GL/fM4vx1BCLHny9yC1RR81v8LY6FDAWx4jGkivGz36/wZfRDnM9MqSSIgJ4z7p0Jns4AL2o80MNd9Ytaulo/A==",
"dev": true,
"dependencies": {
"@types/node": "^16.18.10",
"source-map": "^0.7.3",
"stringify-object": "^3.3.0",
"vscode-languageserver": "~6.1.1",
"vscode-languageserver-protocol": "~3.15.3"
}
},
"node_modules/roku-log-bsc-plugin/node_modules/@types/node": {
"version": "16.18.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.36.tgz",
"integrity": "sha512-8egDX8dE50XyXWH6C6PRCNkTP106DuUrvdrednFouDSmCi7IOvrqr0frznfZaHifHH/3aq/7a7v9N4wdXMqhBQ==",
"dev": true
},
"node_modules/roku-log-bsc-plugin/node_modules/vscode-jsonrpc": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz",
"integrity": "sha512-JvONPptw3GAQGXlVV2utDcHx0BiY34FupW/kI6mZ5x06ER5DdPG/tXWMVHjTNULF5uKPOUUD0SaXg5QaubJL0A==",
"dev": true,
"engines": {
"node": ">=8.0.0 || >=10.0.0"
}
},
"node_modules/roku-log-bsc-plugin/node_modules/vscode-languageserver": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-6.1.1.tgz",
"integrity": "sha512-DueEpkUAkD5XTR4MLYNr6bQIp/UFR0/IPApgXU3YfCBCB08u2sm9hRCs6DxYZELkk++STPjpcjksR2H8qI3cDQ==",
"dev": true,
"dependencies": {
"vscode-languageserver-protocol": "^3.15.3"
},
"bin": {
"installServerIntoExtension": "bin/installServerIntoExtension"
}
},
"node_modules/roku-log-bsc-plugin/node_modules/vscode-languageserver-protocol": {
"version": "3.15.3",
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.3.tgz",
"integrity": "sha512-zrMuwHOAQRhjDSnflWdJG+O2ztMWss8GqUUB8dXLR/FPenwkiBNkMIJJYfSN6sgskvsF0rHAoBowNQfbyZnnvw==",
"dev": true,
"dependencies": {
"vscode-jsonrpc": "^5.0.1",
"vscode-languageserver-types": "3.15.1"
}
},
"node_modules/roku-log-bsc-plugin/node_modules/vscode-languageserver-types": {
"version": "3.15.1",
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.1.tgz",
"integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==",
"dev": true
},
"node_modules/rooibos-roku": { "node_modules/rooibos-roku": {
"version": "5.7.0", "version": "5.7.0",
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.7.0.tgz", "resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.7.0.tgz",
@@ -4104,231 +3774,6 @@
"integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==", "integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==",
"dev": true "dev": true
}, },
"node_modules/ropm": {
"version": "0.10.16",
"resolved": "https://registry.npmjs.org/ropm/-/ropm-0.10.16.tgz",
"integrity": "sha512-YZ49ie+dSRkyOz7RbXpku+neujhk6WfrFKUpda844W2kB0Xk/p4XtwirIdorVNtefBqEeQMXswwrVaWLNaL+vQ==",
"dev": true,
"dependencies": {
"@xml-tools/ast": "^5.0.5",
"@xml-tools/parser": "1.0.10",
"brighterscript": "^0.65.4",
"del": "6.0.0",
"fs-extra": "9.1.0",
"glob-all": "3.2.1",
"latinize": "0.5.0",
"npm-packlist": "2.1.4",
"roku-deploy": "^3.10.3",
"semver": "7.3.4",
"yargs": "16.2.0"
},
"bin": {
"ropm": "dist/cli.js"
},
"engines": {
"node": ">=8.1.10"
}
},
"node_modules/ropm/node_modules/@xml-tools/parser": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@xml-tools/parser/-/parser-1.0.10.tgz",
"integrity": "sha512-9oRb68wEKT+MRB7e2GwTiKicRKVXKzquBDGgH6YcGafvnSYXorWi2oaTVtbv2109RlGiQSnoXaQFUXCnHwFS7Q==",
"dev": true,
"dependencies": {
"chevrotain": "7.1.1"
}
},
"node_modules/ropm/node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/ropm/node_modules/chevrotain": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-7.1.1.tgz",
"integrity": "sha512-wy3mC1x4ye+O+QkEinVJkPf5u2vsrDIYW9G7ZuwFl6v/Yu0LwUuT2POsb+NUWApebyxfkQq6+yDfRExbnI5rcw==",
"dev": true,
"dependencies": {
"regexp-to-ast": "0.5.0"
}
},
"node_modules/ropm/node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/ropm/node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"node_modules/ropm/node_modules/fs-extra": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dev": true,
"dependencies": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/ropm/node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/ropm/node_modules/glob-all": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/glob-all/-/glob-all-3.2.1.tgz",
"integrity": "sha512-x877rVkzB3ipid577QOp+eQCR6M5ZyiwrtaYgrX/z3EThaSPFtLDwBXFHc3sH1cG0R0vFYI5SRYeWMMSEyXkUw==",
"dev": true,
"dependencies": {
"glob": "^7.1.2",
"yargs": "^15.3.1"
},
"bin": {
"glob-all": "bin/glob-all"
}
},
"node_modules/ropm/node_modules/glob-all/node_modules/yargs": {
"version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"dev": true,
"dependencies": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/ropm/node_modules/semver": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/ropm/node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/ropm/node_modules/yargs": {
"version": "16.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
"dev": true,
"dependencies": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"require-directory": "^2.1.1",
"string-width": "^4.2.0",
"y18n": "^5.0.5",
"yargs-parser": "^20.2.2"
},
"engines": {
"node": ">=10"
}
},
"node_modules/ropm/node_modules/yargs/node_modules/cliui": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
"integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
"dev": true,
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^7.0.0"
}
},
"node_modules/ropm/node_modules/yargs/node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
"engines": {
"node": ">=10"
}
},
"node_modules/ropm/node_modules/yargs/node_modules/yargs-parser": {
"version": "20.2.9",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true,
"engines": {
"node": ">=10"
}
},
"node_modules/run-parallel": { "node_modules/run-parallel": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -4549,15 +3994,6 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/source-map": { "node_modules/source-map": {
"version": "0.7.4", "version": "0.7.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
@@ -4654,20 +4090,6 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/stringify-object": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
"integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
"dev": true,
"dependencies": {
"get-own-enumerable-property-symbols": "^3.0.0",
"is-obj": "^1.0.1",
"is-regexp": "^1.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/strip-ansi": { "node_modules/strip-ansi": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+7 -9
View File
@@ -1,27 +1,25 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.12.0", "version": "0.13.0",
"description": "Unofficial Youtube client for Roku", "description": "Unofficial Youtube client for Roku",
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.9", "@rokucommunity/bslint": "^0.8.10",
"@types/fs-extra": "^11.0.1", "@types/fs-extra": "^11.0.2",
"@types/node": "^20.5.9", "@types/node": "^20.7.2",
"@types/xml2js": "^0.4.12", "@types/xml2js": "^0.4.12",
"argparse": "^2.0.1", "argparse": "^2.0.1",
"brighterscript": "^0.65.5", "brighterscript": "^0.65.7",
"brighterscript-formatter": "^1.6.31", "brighterscript-formatter": "^1.6.33",
"convert-svg-to-png": "^0.6.4", "convert-svg-to-png": "^0.6.4",
"cross-fetch": "^4.0.0", "cross-fetch": "^4.0.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.4", "glob": "^10.3.10",
"ip": "^1.1.8", "ip": "^1.1.8",
"json5": "^2.2.3", "json5": "^2.2.3",
"roku-deploy": "^3.10.3", "roku-deploy": "^3.10.3",
"roku-log-bsc-plugin": "^0.8.1",
"rooibos-roku": "^5.7.0", "rooibos-roku": "^5.7.0",
"ropm": "^0.10.16",
"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",
+2 -19
View File
@@ -1,29 +1,12 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.12.0", "version": "0.13.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.12.0", "version": "0.13.0"
"hasInstallScript": true,
"dependencies": {
"bslib": "npm:@rokucommunity/bslib@^0.1.1"
}
},
"node_modules/bslib": {
"name": "@rokucommunity/bslib",
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz",
"integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA=="
}
},
"dependencies": {
"bslib": {
"version": "npm:@rokucommunity/bslib@0.1.1",
"resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz",
"integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA=="
} }
} }
} }
+2 -9
View File
@@ -1,13 +1,7 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.12.0", "version": "0.13.0",
"description": "Unofficial Youtube client for Roku", "description": "Unofficial Youtube client for Roku",
"dependencies": {
"bslib": "npm:@rokucommunity/bslib@^0.1.1"
},
"ropm": {
"rootDir": "./src"
},
"scripts": { "scripts": {
"prebuild": "rm -rf build/playlet-app", "prebuild": "rm -rf build/playlet-app",
"prebuild:dev": "npm run prebuild", "prebuild:dev": "npm run prebuild",
@@ -22,7 +16,6 @@
"format:fix": "npm run format:base -- --write", "format:fix": "npm run format:base -- --write",
"test": "npm run test:build && npm run test:run", "test": "npm run test:build && npm run test:run",
"test:build": "bsc --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc", "test:build": "bsc --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc",
"test:run": "node ../tools/run-test-app.js --package ../build/playlet-app-tests.zip", "test:run": "node ../tools/run-test-app.js --package ../build/playlet-app-tests.zip"
"postinstall": "npx ropm copy"
} }
} }
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="BootstrapScene" extends="Scene"> <component name="BootstrapScene" extends="Scene">
<interface> <interface>
<field id="exitChannel" type="bool" alwaysNotify="true" /> <field id="exitChannel" type="bool" alwaysNotify="true" />
<field id="launchArgs" type="assocarray" /> <field id="launchArgs" type="assocarray" />
<field id="inputArgs" type="assocarray" alwaysNotify="true" /> <field id="inputArgs" type="assocarray" alwaysNotify="true" />
<field id="playletLibLoadedUrl" type="assocarray" /> <field id="playletLibLoadedUrl" type="assocarray" />
<field id="systemLogEvent" type="assocarray" />
</interface> </interface>
<script type="text/brightscript" uri="pkg:/source/Dialog.bs" /> <script type="text/brightscript" uri="pkg:/source/Dialog.bs" />
<script type="text/brightscript" uri="pkg:/source/Manifest.bs" /> <script type="text/brightscript" uri="pkg:/source/Manifest.bs" />
<script type="text/brightscript" uri="pkg:/source/Registry.bs" /> <script type="text/brightscript" uri="pkg:/source/Registry.bs" />
<children> <children>
<Group id="MainSceneContainer"/> <Group id="MainSceneContainer" />
<LoadingIndicator id="LoadingIndicator" /> <LoadingIndicator id="LoadingIndicator" />
</children> </children>
</component> </component>
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="LoadingIndicator" extends="Group"> <component name="LoadingIndicator" extends="Group">
<children> <children>
<Rectangle <Rectangle
+1 -1
View File
@@ -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=12 minor_version=13
build_version=00000 build_version=00000
ui_resolutions=hd ui_resolutions=hd
+17 -6
View File
@@ -16,8 +16,8 @@
function Main(args as object) as void function Main(args as object) as void
screen = CreateObject("roSGScreen") screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort") port = CreateObject("roMessagePort")
screen.setMessagePort(m.port) screen.setMessagePort(port)
m.global = screen.getGlobalNode() m.global = screen.getGlobalNode()
ClearPlayletLibUrlsIfNeeded(args) ClearPlayletLibUrlsIfNeeded(args)
@@ -25,7 +25,7 @@ function Main(args as object) as void
scene = screen.CreateScene("BootstrapScene") scene = screen.CreateScene("BootstrapScene")
screen.show() screen.show()
scene.ObserveField("exitChannel", m.port) scene.ObserveField("exitChannel", port)
scene.launchArgs = args scene.launchArgs = args
' These vars are needed to pass certification. ' These vars are needed to pass certification.
@@ -42,7 +42,16 @@ function Main(args as object) as void
end if end if
input = CreateObject("roInput") input = CreateObject("roInput")
input.setMessagePort(m.port) input.setMessagePort(port)
' TODO:P1 follow up on bug where roSystemLog does not fire for a video player in ComponentLibrary
' https://community.roku.com/t5/Roku-Developer-Program/BUG-roSystemLog-not-firing-with-ComponentLibrary/td-p/906075
systemLog = CreateObject("roSystemLog")
systemLog.SetMessagePort(port)
systemLog.EnableType("http.connect")
systemLog.EnableType("http.error")
systemLog.EnableType("http.complete")
systemLog.EnableType("bandwidth.minute")
#if DEBUG #if DEBUG
' The following comment is to enable the SceneGraph inspector ' The following comment is to enable the SceneGraph inspector
@@ -54,9 +63,11 @@ function Main(args as object) as void
#end if #end if
while true while true
msg = wait(0, m.port) msg = wait(0, port)
msgType = type(msg) msgType = type(msg)
if msgType = "roSGScreenEvent" if msgType = "roSystemLogEvent"
scene.systemLogEvent = msg.GetInfo()
else if msgType = "roSGScreenEvent"
if msg.isScreenClosed() if msg.isScreenClosed()
return return
end if end if
+2 -37
View File
@@ -1,47 +1,12 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.12.0", "version": "0.13.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.12.0", "version": "0.13.0"
"hasInstallScript": true,
"dependencies": {
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
"log": "npm:roku-log@^0.9.3"
}
},
"node_modules/bslib": {
"name": "@rokucommunity/bslib",
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz",
"integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA=="
},
"node_modules/log": {
"name": "roku-log",
"version": "0.9.3",
"resolved": "https://registry.npmjs.org/roku-log/-/roku-log-0.9.3.tgz",
"integrity": "sha512-YzvtSCdmZJeimyZZ/C5Y7tdw6vpNMrZV90pg8EPn3vLAtRjtxN3dOt73s48BVOx2W00M0BEGmeaECObS2RdIqg==",
"dependencies": {
"bslib": "npm:@rokucommunity/bslib@^0.1.1"
}
}
},
"dependencies": {
"bslib": {
"version": "npm:@rokucommunity/bslib@0.1.1",
"resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz",
"integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA=="
},
"log": {
"version": "npm:roku-log@0.9.3",
"resolved": "https://registry.npmjs.org/roku-log/-/roku-log-0.9.3.tgz",
"integrity": "sha512-YzvtSCdmZJeimyZZ/C5Y7tdw6vpNMrZV90pg8EPn3vLAtRjtxN3dOt73s48BVOx2W00M0BEGmeaECObS2RdIqg==",
"requires": {
"bslib": "npm:@rokucommunity/bslib@^0.1.1"
}
} }
} }
} }
+2 -10
View File
@@ -1,14 +1,7 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.12.0", "version": "0.13.0",
"description": "Unofficial Youtube client for Roku", "description": "Unofficial Youtube client for Roku",
"dependencies": {
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
"log": "npm:roku-log@^0.9.3"
},
"ropm": {
"rootDir": "./src"
},
"scripts": { "scripts": {
"prebuild": "rm -rf build/playlet-lib", "prebuild": "rm -rf build/playlet-lib",
"prebuild:dev": "npm run prebuild", "prebuild:dev": "npm run prebuild",
@@ -25,7 +18,6 @@
"format:fix": "npm run format:base -- --write", "format:fix": "npm run format:base -- --write",
"test": "npm run test:build && npm run test:run", "test": "npm run test:build && npm run test:run",
"test:build": "bsc --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc", "test:build": "bsc --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc",
"test:run": "node ../tools/run-test-app.js --package ../build/playlet-lib-tests.zip", "test:run": "node ../tools/run-test-app.js --package ../build/playlet-lib-tests.zip"
"postinstall": "npx ropm copy"
} }
} }
@@ -1,17 +1,15 @@
import "pkg:/source/utils/Types.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/components/Dialog/DialogUtils.bs" import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/components/VideoPlayer/VideoUtils.bs" import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs"
function Init() function Init()
m.screens = {} m.screens = {}
end function end function
function OnNodeReady() function OnNodeReady()
m.log = new log.Logger("AppController")
NodeSetFocus(m.top.root, true) NodeSetFocus(m.top.root, true)
end function end function
@@ -97,7 +95,7 @@ end function
function OnExitDialog(event as object) function OnExitDialog(event as object)
buttonIndex = event.GetData() buttonIndex = event.GetData()
if buttonIndex = 0 ' Exit if buttonIndex = 0 ' Exit
m.log.info("Exiting app") LogInfo("Exiting app")
m.top.getScene().exitChannel = true m.top.getScene().exitChannel = true
end if end if
end function end function
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="AppController" extends="Group" includes="AutoBind"> <component name="AppController" extends="Group" includes="AutoBind">
<interface> <interface>
<field id="root" type="node" /> <field id="root" type="node" />
@@ -1,4 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="AppRoot" extends="Group" includes="Focus"> <component name="AppRoot" extends="Group" includes="Focus">
</component> </component>
@@ -1,10 +1,11 @@
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/utils/FocusManagement.bs" import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/Types.bs"
import "pkg:/source/utils/StringUtils.bs" import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs"
function Init() function Init()
m.log = new log.Logger("ChannelView") m.container = m.top.findNode("container")
m.scrollAnimation = m.top.findNode("scrollAnimation")
m.scrollAnimationInterpolator = m.scrollAnimation.findNode("scrollAnimationInterpolator")
m.banner = m.top.findNode("banner") m.banner = m.top.findNode("banner")
m.thumbnail = m.top.findNode("thumbnail") m.thumbnail = m.top.findNode("thumbnail")
@@ -12,6 +13,9 @@ function Init()
m.rowList = m.top.FindNode("rowList") m.rowList = m.top.FindNode("rowList")
m.banner.ObserveField("loadStatus", FuncName(OnBannerLoadStatus)) m.banner.ObserveField("loadStatus", FuncName(OnBannerLoadStatus))
m.authorId = ""
InitializeTabs()
end function end function
function OnNodeready() function OnNodeready()
@@ -45,9 +49,28 @@ function OnContentSet() as void
end if end if
end if end if
m.rowList.content = content
content@.LoadChannel(m.invidious) content@.LoadChannel(m.invidious)
authorId = ValidString(content.authorId)
if authorId <> m.authorId and IsArray(content.tabs)
m.authorId = authorId
m.rowList.contentData = CreateChannelFeeds(m.authorId, content.tabs)
end if
end function
function CreateChannelFeeds(authorId as string, tabs as object) as object
if authorId = ""
return invalid
end if
feeds = []
for i = 0 to tabs.count() - 1
tabName = tabs[i]
if m.tabs.DoesExist(tabName)
feeds.Push(m.tabs[tabName](authorId))
end if
end for
return feeds
end function end function
function OnkeyEvent(key as string, press as boolean) as boolean function OnkeyEvent(key as string, press as boolean) as boolean
@@ -74,4 +97,47 @@ function OnBannerLoadStatus() as void
aspect = m.banner.bitmapWidth / m.banner.bitmapHeight aspect = m.banner.bitmapWidth / m.banner.bitmapHeight
m.banner.height = m.banner.width / aspect m.banner.height = m.banner.width / aspect
m.banner.translation = [0, -m.banner.height]
m.banner.visible = true
startPos = [0, 0]
endPos = [0, m.banner.height]
midPos = [0, m.banner.height / 2]
m.scrollAnimationInterpolator.keyValue = [startPos, midPos, endPos]
m.scrollAnimation.control = "start"
end function
function InitializeTabs()
m.tabs = {
videos: function(authorId as string) as object
return CreateChannelFeed("Latest videos", "channel_videos", authorId)
end function,
shorts: function(authorId as string) as object
return CreateChannelFeed("Shorts", "channel_shorts", authorId)
end function,
streams: function(authorId as string) as object
return CreateChannelFeed("Live", "channel_streams", authorId)
end function,
podcasts: function(authorId as string) as object
return CreateChannelFeed("Podcasts", "channel_podcasts", authorId)
end function,
playlists: function(authorId as string) as object
return CreateChannelFeed("Playlists", "channel_playlists", authorId)
end function,
channels: function(authorId as string) as object
return CreateChannelFeed("Channels", "channel_channels", authorId)
end function
}
end function
function CreateChannelFeed(title as string, endpoint as string, ucid as string) as object
return {
title: title,
apiType: "Invidious",
endpoint: endpoint,
pathParams: {
ucid: ucid
}
}
end function end function
@@ -11,44 +11,57 @@
color="0x242424"> color="0x242424">
</Rectangle> </Rectangle>
<Poster <Group id="container">
id="banner" <Poster
translation="[0,0]" id="banner"
width="1280" /> width="1280"
visible="false" />
<Poster <Poster
translation="[115,180]" translation="[115,20]"
width="104" width="104"
height="104" height="104"
uri="pkg:/images/circle-mask-500.png"> uri="pkg:/images/circle-mask-500.png">
<CirclePoster <CirclePoster
id="thumbnail" id="thumbnail"
width="100" width="100"
height="100" height="100"
translation="[2,2]" /> translation="[2,2]" />
</Poster>
<Label <Label
id="authorLabel" id="authorLabel"
translation="[228,226]" translation="[115,40]"
font="font:MediumBoldSystemFont" /> font="font:MediumBoldSystemFont" />
</Poster>
<VideoRowList <VideoRowList
itemComponentName="RowCell" itemComponentName="RowCell"
id="rowList" id="rowList"
focusable="false" focusable="false"
translation="[0,320]" translation="[0,160]"
numRows="1" numRows="2"
rowitemSize="[[350,196]]" rowitemSize="[[350,196]]"
rowItemSpacing="[[25,0]]" rowItemSpacing="[[25,0]]"
itemSize="[1280,326]" itemSize="[1280,326]"
itemSpacing="[0,65]" itemSpacing="[0,65]"
rowLabelOffset="[[115,20]]" rowLabelOffset="[[115,20]]"
focusXOffset="[115]" focusXOffset="[115]"
showRowLabel="[true]" showRowLabel="[true]"
rowFocusAnimationStyle="floatingfocus" rowFocusAnimationStyle="floatingfocus"
variableWidthItems="true" variableWidthItems="true"
focusBitmapUri="pkg:/images/focus_grid.9.png" /> focusBitmapUri="pkg:/images/focus_grid.9.png" />
<Animation
id="scrollAnimation"
delay="0.3"
duration="0.6">
<Vector2DFieldInterpolator
id="scrollAnimationInterpolator"
key="[ 0.0, 0.5, 1.0 ]"
fieldToInterp="container.translation" />
</Animation>
</Group>
</children> </children>
</component> </component>
@@ -1,10 +1,9 @@
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/ContentNode/ChannelContentTask.bs" import "pkg:/components/ContentNode/ChannelContentTask.bs"
import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/components/Dialog/DialogUtils.bs" import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/utils/ErrorUtils.bs"
function Init() function Init()
m.top.latestVideos = m.top.findNode("latestVideos")
end function end function
function LoadChannel(invidiousNode as object) as void function LoadChannel(invidiousNode as object) as void
@@ -39,10 +38,10 @@ function OnChannelContentTaskResult(output as object) as void
error = output.result.error error = output.result.error
end if end if
error = ErrorUtils.Format(error) error = ErrorUtils.Format(error)
m.log.error(error) LogError(error)
playlistId = output.task.input.content.playlistId authorId = output.task.input.content.authorId
message = `Failed to load playlist ${playlistId}\n${error}` message = `Failed to load channel ${authorId}\n${error}`
DialogUtils.ShowDialog(message, "Playlist load fail", true) DialogUtils.ShowDialog(message, "Channel load fail", true)
return return
end if end if
end function end function
@@ -14,15 +14,8 @@
<field id="videoCountText" type="string" /> <field id="videoCountText" type="string" />
<field id="thumbnail" type="string" /> <field id="thumbnail" type="string" />
<field id="banner" type="string" /> <field id="banner" type="string" />
<field id="tabs" type="array" />
<field id="latestVideos" type="node" />
<field id="HDItemWidth" type="float" value="196" /> <field id="HDItemWidth" type="float" value="196" />
</interface> </interface>
<children>
<ContentNode id="latestVideos" title="Latest Videos">
</ContentNode>
</children>
</component> </component>
@@ -2,7 +2,8 @@
<interface> <interface>
<field id="feed" type="assocarray" /> <field id="feed" type="assocarray" />
<field id="loadState" type="string" /> <field id="loadState" type="string" />
<field id="pagination" type="boolean" /> <field id="paginationType" type="string" />
<field id="page" type="integer" value="0" /> <field id="page" type="integer" value="0" />
<field id="continuation" type="string" />
</interface> </interface>
</component> </component>
@@ -1,7 +1,7 @@
import "pkg:/source/utils/Types.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/Screens/WebAppScreen/GenerateQrCodeTask.bs" import "pkg:/components/Screens/WebAppScreen/GenerateQrCodeTask.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/utils/StringUtils.bs" import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs"
function Init() function Init()
m.urlLabel = m.top.findNode("urlLabel") m.urlLabel = m.top.findNode("urlLabel")
@@ -26,11 +26,11 @@
<Font role="font" uri="font:SystemFontFile" size="24" /> <Font role="font" uri="font:SystemFontFile" size="24" />
</Label> </Label>
<Poster <Poster
id='QrCodePoster' id="QrCodePoster"
width='300' width="300"
height='300' height="300"
loadWidth='300' loadWidth="300"
loadHeight='300' loadHeight="300"
translation="[50, 50]" /> translation="[50, 50]" />
<Label <Label
id="urlLabel" id="urlLabel"
@@ -1,4 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="SimpleDialog" extends="StandardMessageDialog"> <component name="SimpleDialog" extends="StandardMessageDialog">
</component> </component>
+3 -3
View File
@@ -1,5 +1,5 @@
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs" import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs" import "pkg:/source/utils/Types.bs"
function InitEcpArgs() function InitEcpArgs()
@@ -14,13 +14,13 @@ end function
function LaunchArgumentsReceived() as void function LaunchArgumentsReceived() as void
launchArgs = m.scene.launchArgs launchArgs = m.scene.launchArgs
m.log.info("LaunchArgumentsReceived", launchArgs) LogInfo("LaunchArgumentsReceived", launchArgs)
ProcessArguments(launchArgs) ProcessArguments(launchArgs)
end function end function
function InputArgumentsReceived() as void function InputArgumentsReceived() as void
inputArgs = m.scene.inputArgs inputArgs = m.scene.inputArgs
m.log.info("InputArgumentsReceived", inputArgs) LogInfo("InputArgumentsReceived", inputArgs)
ProcessArguments(inputArgs) ProcessArguments(inputArgs)
end function end function
@@ -0,0 +1,63 @@
import "pkg:/source/utils/Types.bs"
function Init()
m.top.functionName = "LoggerLoop"
port = CreateObject("roMessagePort")
m.top.ObserveField("logLine", port)
scene = m.top.getScene()
if scene.hasField("systemLogEvent")
scene.ObserveFieldScoped("systemLogEvent", port)
end if
m.port = port
end function
function LoggerLoop()
port = m.port
buffer = CreateObject("roByteArray")
previousLogsFile = m.top.folder + "/" + m.top.filenamePrevious
logsFile = m.top.folder + "/" + m.top.filename
CreateDirectory(m.top.folder)
DeleteFile(previousLogsFile)
MoveFile(logsFile, previousLogsFile)
while true
msg = wait(0, port)
msgType = type(msg)
if msgType = "roSGNodeEvent"
field = msg.getField()
if field = "logLine"
OnLineLog(msg, logsFile, buffer)
else if field = "systemLogEvent"
OnLineSysLog(msg, logsFile, buffer)
end if
end if
end while
end function
function OnLineLog(event as object, logsFile as string, buffer as object)
line = event.getData()
' bs:disable-next-line LINT3012
print line
buffer.FromAsciiString(line + `\n`)
buffer.AppendFile(logsFile)
end function
function OnLineSysLog(event as object, logsFile as string, buffer as object) as void
info = event.getData()
if info.LogType <> "http.error"
return
end if
line = `[SysLog] ${FormatJson(info)}`
' bs:disable-next-line LINT3012
print line
buffer.FromAsciiString(line + `\n`)
buffer.AppendFile(logsFile)
end function
@@ -0,0 +1,9 @@
<component name="Logger" extends="Task">
<interface>
<field id="logLevel" type="int" value="2" />
<field id="logLine" type="string" />
<field id="folder" type="string" value="cachefs:/logs" />
<field id="filename" type="string" value="app_logs.txt" />
<field id="filenamePrevious" type="string" value="app_logs_previous.txt" />
</interface>
</component>
@@ -1,19 +0,0 @@
import "pkg:/source/asyncTask/asyncTask.bs"
function Init()
m.buffer = CreateObject("roByteArray")
previousLogs = m.top.folder + "/" + m.top.filenamePrevious
newLogs = m.top.folder + "/" + m.top.filename
CreateDirectory(m.top.folder)
DeleteFile(previousLogs)
MoveFile(newLogs, previousLogs)
m.logsPath = newLogs
end function
function logItem(name as string, levelNum as integer, text as string) as void
m.buffer.FromAsciiString(`[${name}] ${text}\n`)
m.buffer.AppendFile(m.logsPath)
end function
@@ -1,10 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<component name='log_FileTransport' extends='Node'>
<interface>
<field id='folder' type='string' value='cachefs:/logs' />
<field id='filename' type='string' value='app_logs.txt' />
<field id='filenamePrevious' type='string' value='app_logs_previous.txt' />
<function name='logItem' />
</interface>
<children />
</component>
+3 -3
View File
@@ -1,11 +1,11 @@
import "pkg:/components/EcpArgs.bs"
import "pkg:/components/parts/AutoBind/AutoBind.part.bs" import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
import "pkg:/source/utils/LoadingScreen.bs" import "pkg:/source/utils/LoadingScreen.bs"
import "pkg:/source/utils/Logging.bs" import "pkg:/source/utils/Logging.bs"
import "pkg:/components/EcpArgs.bs"
function Init() function Init()
InitializeLogging() InitializeLogger()
m.log = new log.Logger("MainScene")
m.scene = m.top.getScene() m.scene = m.top.getScene()
' At this point, the "MainScene" node is not yet added to the scene, and does not have a parent yet. ' At this point, the "MainScene" node is not yet added to the scene, and does not have a parent yet.
' Let's wait until it has one. ' Let's wait until it has one.
@@ -1,13 +1,11 @@
'import "pkg:/components/EcpArgs.bs"
'import "pkg:/components/parts/AutoBind/AutoBind.part.bs" 'import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
'import "pkg:/source/utils/LoadingScreen.bs" 'import "pkg:/source/utils/LoadingScreen.bs"
'import "pkg:/source/utils/Logging.bs" 'import "pkg:/source/utils/Logging.bs"
'import "pkg:/components/EcpArgs.bs"
function Init() function Init()
InitializeBindings() ' auto-generated! InitializeBindings() ' auto-generated!
InitializeLogging() InitializeLogger()
m.log = log_Logger("MainScene")
m.__le = m.log.enabled
m.scene = m.top.getScene() m.scene = m.top.getScene()
' At this point, the "MainScene" node is not yet added to the scene, and does not have a parent yet. ' At this point, the "MainScene" node is not yet added to the scene, and does not have a parent yet.
' Let's wait until it has one. ' Let's wait until it has one.
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8" ?>
<component name="MainScene" extends="Group"> <component name="MainScene" extends="Group">
<interface> <interface>
<field id="bindings" type="assocarray" onChange="OnBindingSetRegisterAutoBind" /> <field id="bindings" type="assocarray" onChange="OnBindingSetRegisterAutoBind" />
@@ -11,14 +10,13 @@
<script type="text/brightscript" uri="pkg:/components/MainScene_bindings.brs" /> <script type="text/brightscript" uri="pkg:/components/MainScene_bindings.brs" />
<script type="text/brightscript" uri="pkg:/components/MainScene.brs" /> <script type="text/brightscript" uri="pkg:/components/MainScene.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/Logging.brs" /> <script type="text/brightscript" uri="pkg:/source/utils/Logging.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/log/LogMixin.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/LoadingScreen.brs" /> <script type="text/brightscript" uri="pkg:/source/utils/LoadingScreen.brs" />
<script type="text/brightscript" uri="pkg:/components/EcpArgs.brs" /> <script type="text/brightscript" uri="pkg:/components/EcpArgs.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/Types.brs" /> <script type="text/brightscript" uri="pkg:/source/utils/Types.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/StringUtils.brs" /> <script type="text/brightscript" uri="pkg:/source/utils/StringUtils.brs" />
<script type="text/brightscript" uri="pkg:/components/VideoPlayer/VideoUtils.brs" /> <script type="text/brightscript" uri="pkg:/components/VideoPlayer/VideoUtils.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/FocusManagement.brs" /> <script type="text/brightscript" uri="pkg:/source/utils/FocusManagement.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/bslib/bslib.brs" /> <script type="text/brightscript" uri="pkg:/source/bslib.brs" />
<children> <children>
<AppController id="AppController"> <AppController id="AppController">
<Group id="Stack"> <Group id="Stack">
-2
View File
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="MainScene" extends="Group" includes="AutoBind"> <component name="MainScene" extends="Group" includes="AutoBind">
<children> <children>
<AppController id="AppController" root="bind:./AppRoot" stack="bind:./Stack"> <AppController id="AppController" root="bind:./AppRoot" stack="bind:./Stack">
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="IconButton" extends="Group" includes="Focus"> <component name="IconButton" extends="Group" includes="Focus">
<children> <children>
<Poster id="buttonBackground" uri="pkg:/images/white.9.png" visible="false" /> <Poster id="buttonBackground" uri="pkg:/images/white.9.png" visible="false" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="NavBar" extends="Group" includes="AutoBind"> <component name="NavBar" extends="Group" includes="AutoBind">
<interface> <interface>
<field id="appController" type="node" /> <field id="appController" type="node" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="NavBarItem" extends="ContentNode"> <component name="NavBarItem" extends="ContentNode">
<interface> <interface>
<field id="screen" type="string" /> <field id="screen" type="string" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="NavigationTestNode" extends="Node"> <component name="NavigationTestNode" extends="Node">
<interface> <interface>
<function name="SetNavigation" /> <function name="SetNavigation" />
@@ -1,15 +1,14 @@
import "pkg:/source/utils/Types.bs" import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/components/PlaylistView/PlaylistContentTask.bs"
import "pkg:/components/VideoFeed/FeedLoadState.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs" import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/source/asyncTask/asyncTask.bs" import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/VideoFeed/FeedLoadState.bs"
import "pkg:/components/PlaylistView/PlaylistContentTask.bs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/source/utils/ArrayUtils.bs" import "pkg:/source/utils/ArrayUtils.bs"
import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/Types.bs"
function Init() function Init()
m.log = new log.Logger("PlayQueue")
m.pendingLoadTasks = {} m.pendingLoadTasks = {}
' TODO:P1 prevent adding duplicates of the same video/playlist ' TODO:P1 prevent adding duplicates of the same video/playlist
m.queue = CreateObject("roArray", 0, true) m.queue = CreateObject("roArray", 0, true)
@@ -163,7 +162,7 @@ function OnPlaylistContentTaskResult(output as object) as void
error = output.result.error error = output.result.error
end if end if
error = ErrorUtils.Format(error) error = ErrorUtils.Format(error)
m.log.error(error) LogError(error)
playlistId = playlist.playlistId playlistId = playlist.playlistId
message = `Failed to load playlist ${playlistId}\n${error}` message = `Failed to load playlist ${playlistId}\n${error}`
' TODO:P1 play next upon closing the dialog ' TODO:P1 play next upon closing the dialog
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="PlayQueue" extends="Node"> <component name="PlayQueue" extends="Node">
<interface> <interface>
<field id="queue" type="array" /> <field id="queue" type="array" />
@@ -1,17 +1,15 @@
import "pkg:/source/utils/FocusManagement.bs" import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/source/utils/Types.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/PlaylistView/PlaylistContentTask.bs" import "pkg:/components/PlaylistView/PlaylistContentTask.bs"
import "pkg:/components/VideoFeed/FeedLoadState.bs" import "pkg:/components/VideoFeed/FeedLoadState.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/utils/ErrorUtils.bs" import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/components/Dialog/DialogUtils.bs" import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs"
function Init() function Init()
m.log = new log.Logger("PlaylistView")
m.background = m.top.findNode("background") m.background = m.top.findNode("background")
m.backgroundSmall = m.top.findNode("backgroundSmall") m.backgroundSmall = m.top.findNode("backgroundSmall")
m.titleLabel = m.top.findNode("titleLabel") m.titleLabel = m.top.findNode("titleLabel")
@@ -90,7 +88,7 @@ function OnItemSelected(event as object)
video = playlist.getChild(index) video = playlist.getChild(index)
videoId = video.videoId videoId = video.videoId
if not StringUtils.IsNullOrEmpty(videoId) if not StringUtils.IsNullOrEmpty(videoId)
m.log.info("Play playlist: " + playlistId + " video: " + videoId) LogInfo("Play playlist: " + playlistId + " video: " + videoId)
m.playQueue@.Play(playlist, index) m.playQueue@.Play(playlist, index)
end if end if
end function end function
@@ -146,7 +144,7 @@ function OnPlaylistContentTaskResult(output as object) as void
error = output.result.error error = output.result.error
end if end if
error = ErrorUtils.Format(error) error = ErrorUtils.Format(error)
m.log.error(error) LogError(error)
playlistId = output.task.input.content.playlistId playlistId = output.task.input.content.playlistId
message = `Failed to load playlist ${playlistId}\n${error}` message = `Failed to load playlist ${playlistId}\n${error}`
DialogUtils.ShowDialog(message, "Playlist load fail", true) DialogUtils.ShowDialog(message, "Playlist load fail", true)
@@ -1,5 +1,5 @@
import "pkg:/source/utils/Types.bs"
import "pkg:/source/utils/TimeUtils.bs" import "pkg:/source/utils/TimeUtils.bs"
import "pkg:/source/utils/Types.bs"
function Init() function Init()
m.titleLabel = m.top.findNode("titleLabel") m.titleLabel = m.top.findNode("titleLabel")
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="AppInfoScreen" extends="Group" includes="AutoBind"> <component name="AppInfoScreen" extends="Group" includes="AutoBind">
<interface> <interface>
<field id="applicationInfo" type="node" bind="/ApplicationInfo" /> <field id="applicationInfo" type="node" bind="/ApplicationInfo" />
@@ -1,5 +1,5 @@
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/components/Navigation/Navigation.bs" import "pkg:/components/Navigation/Navigation.bs"
import "pkg:/source/utils/FocusManagement.bs"
function Init() function Init()
m.rowList = m.top.FindNode("rowList") m.rowList = m.top.FindNode("rowList")
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="HomeScreen" extends="Group" includes="AutoBind,Focus"> <component name="HomeScreen" extends="Group" includes="AutoBind,Focus">
<interface> <interface>
<field id="navBar" type="node" bind="/NavBar" /> <field id="navBar" type="node" bind="/NavBar" />
@@ -1,7 +1,6 @@
import "pkg:/components/Navigation/Navigation.bs" import "pkg:/components/Navigation/Navigation.bs"
import "pkg:/source/utils/Types.bs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/utils/ArrayUtils.bs" import "pkg:/source/utils/ArrayUtils.bs"
import "pkg:/source/utils/Types.bs"
function Init() function Init()
options = { options = {
@@ -151,8 +150,6 @@ function PopulateLists(contentNodes as object, options as object)
end function end function
function OnNodeReady() function OnNodeReady()
m.log = new log.Logger("SearchFilters")
RefreshUI() RefreshUI()
m.controls.date.ObserveField("checkedItem", FuncName(OnListChecked)) m.controls.date.ObserveField("checkedItem", FuncName(OnListChecked))
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="SearchFilters" extends="Group" includes="AutoBind,Focus"> <component name="SearchFilters" extends="Group" includes="AutoBind,Focus">
<interface> <interface>
<field id="searchScreen" type="node" /> <field id="searchScreen" type="node" />
@@ -2,10 +2,10 @@ import "pkg:/components/Navigation/Navigation.bs"
import "pkg:/components/Screens/SearchScreen/SearchSuggestionsTask.bs" import "pkg:/components/Screens/SearchScreen/SearchSuggestionsTask.bs"
import "pkg:/source/asyncTask/asyncTask.bs" import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/services/SearchHistory.bs" import "pkg:/source/services/SearchHistory.bs"
import "pkg:/source/utils/LoadingScreen.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/utils/ErrorUtils.bs" import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/LoadingScreen.bs"
import "pkg:/source/utils/Logging.bs"
function Init() function Init()
m.container = m.top.FindNode("container") m.container = m.top.FindNode("container")
@@ -32,8 +32,6 @@ function Init()
end function end function
function OnNodeReady() function OnNodeReady()
m.log = new log.Logger("SearchScreen")
m.rowlist@.BindNode(invalid) m.rowlist@.BindNode(invalid)
m.keyboard.ObserveField("text", FuncName(OnTextChange)) m.keyboard.ObserveField("text", FuncName(OnTextChange))
m.suggestions.ObserveField("buttonFocused", FuncName(OnSearchButtonFocused)) m.suggestions.ObserveField("buttonFocused", FuncName(OnSearchButtonFocused))
@@ -112,7 +110,7 @@ function OnSearchSuggestionsTaskResults(output as object) as void
end if end if
if not output.success if not output.success
m.log.error(ErrorUtils.Format(output.error)) LogError(ErrorUtils.Format(output.error))
return return
end if end if
' In case this is an old request, discard suggestions ' In case this is an old request, discard suggestions
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="SearchScreen" extends="Group" includes="AutoBind,Focus"> <component name="SearchScreen" extends="Group" includes="AutoBind,Focus">
<interface> <interface>
<field id="navBar" type="node" bind="/NavBar" /> <field id="navBar" type="node" bind="/NavBar" />
@@ -12,7 +10,7 @@
<Button <Button
id="filtersButton" id="filtersButton"
translation="[160,40]" translation="[160,40]"
minWidth="0" minWidth="180"
height="48" height="48"
showFocusFootprint="true" showFocusFootprint="true"
iconUri="pkg:/images/icons/filters-white.png" iconUri="pkg:/images/icons/filters-white.png"
@@ -1,5 +1,5 @@
import "pkg:/source/services/SearchHistory.bs"
import "pkg:/components/Services/Invidious/InvidiousService.bs" import "pkg:/components/Services/Invidious/InvidiousService.bs"
import "pkg:/source/services/SearchHistory.bs"
@asynctask @asynctask
function SearchSuggestionsTask(input as object) as object function SearchSuggestionsTask(input as object) as object
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="BooleanControl" extends="LayoutGroup" includes="Focus"> <component name="BooleanControl" extends="LayoutGroup" includes="Focus">
<interface> <interface>
<field id="displayText" type="string" alias="Checkbox.title" /> <field id="displayText" type="string" alias="Checkbox.title" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="Checkbox" extends="CheckList"> <component name="Checkbox" extends="CheckList">
<interface> <interface>
<field id="title" type="string" alias="checkboxNode.title" /> <field id="title" type="string" alias="checkboxNode.title" />
@@ -1,6 +1,6 @@
import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/source/services/SearchHistory.bs" import "pkg:/source/services/SearchHistory.bs"
import "pkg:/source/utils/FocusManagement.bs" import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/components/Dialog/DialogUtils.bs"
function Init() function Init()
m.top.focusable = true m.top.focusable = true
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ClearSearchHistoryControl" extends="LayoutGroup" includes="Focus"> <component name="ClearSearchHistoryControl" extends="LayoutGroup" includes="Focus">
<interface> <interface>
<field id="displayText" type="string" alias="Button.text" /> <field id="displayText" type="string" alias="Button.text" />
@@ -1,5 +1,5 @@
import "pkg:/source/utils/Types.bs"
import "pkg:/source/utils/FocusManagement.bs" import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/Types.bs"
function Init() function Init()
m.top.focusable = true m.top.focusable = true
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="InvidiousInstanceControl" extends="LayoutGroup" includes="AutoBind,Focus"> <component name="InvidiousInstanceControl" extends="LayoutGroup" includes="AutoBind,Focus">
<interface> <interface>
<field id="displayText" type="string" alias="DisplayTextLabel.text" /> <field id="displayText" type="string" alias="DisplayTextLabel.text" />
@@ -1,4 +1,5 @@
import "pkg:/components/Navigation/Navigation.bs" import "pkg:/components/Navigation/Navigation.bs"
import "pkg:/components/Services/Invidious/InvidiousService.bs"
import "pkg:/source/utils/Types.bs" import "pkg:/source/utils/Types.bs"
function Init() function Init()
@@ -29,6 +30,7 @@ function Init()
SetNavigation(m.testButton, "right", m.saveButton) SetNavigation(m.testButton, "right", m.saveButton)
m.currentNavigtionNode = m.editButton m.currentNavigtionNode = m.editButton
m.textEditBox.hintText = `e.g. ${Invidious.DEFAULT_INSTANCE}`
end function end function
function OnFocusChange() as void function OnFocusChange() as void
@@ -76,7 +78,7 @@ end function
function OnEditButtonSelected() function OnEditButtonSelected()
keyboardDialog = createObject("roSGNode", "StandardKeyboardDialog") keyboardDialog = createObject("roSGNode", "StandardKeyboardDialog")
keyboardDialog.title = "Edit Instance" keyboardDialog.title = "Edit Instance"
keyboardDialog.message = ["Enter the instance url (e.g. https://vid.puffyan.us)"] keyboardDialog.message = [`Enter the instance url (e.g. ${Invidious.DEFAULT_INSTANCE})`]
keyboardDialog.text = m.top.text keyboardDialog.text = m.top.text
keyboardDialog.buttons = ["OK", "Cancel"] keyboardDialog.buttons = ["OK", "Cancel"]
keyboardDialog.observeField("buttonSelected", FuncName(OnKeyboardButton)) keyboardDialog.observeField("buttonSelected", FuncName(OnKeyboardButton))
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="InvidiousInstanceSettings" extends="Group" includes="AutoBind,Focus"> <component name="InvidiousInstanceSettings" extends="Group" includes="AutoBind,Focus">
<interface> <interface>
<field id="text" type="string" alias="textEditBox.text" /> <field id="text" type="string" alias="textEditBox.text" />
@@ -23,7 +21,6 @@
translation="[326,13]" /> translation="[326,13]" />
<TextEditBox <TextEditBox
id="textEditBox" id="textEditBox"
hintText="e.g. https://https://vid.puffyan.us"
width="480" width="480"
height="50" height="50"
translation="[200,50]" /> translation="[200,50]" />
@@ -1,9 +1,9 @@
import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/components/Navigation/Navigation.bs"
import "pkg:/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingTask.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/utils/FocusManagement.bs" import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/Types.bs" import "pkg:/source/utils/Types.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingTask.bs"
import "pkg:/components/Navigation/Navigation.bs"
import "pkg:/components/Dialog/DialogUtils.bs"
function Init() function Init()
m.titleLabel = m.top.findNode("titleLabel") m.titleLabel = m.top.findNode("titleLabel")
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="InvidiousInstanceTesting" extends="Group" includes="AutoBind,Focus"> <component name="InvidiousInstanceTesting" extends="Group" includes="AutoBind,Focus">
<interface> <interface>
<field id="instance" type="string" /> <field id="instance" type="string" />
@@ -37,9 +35,9 @@
<Button <Button
id="closeButton" id="closeButton"
text="Close" text="Close"
minWidth="0" minWidth="160"
showFocusFootprint="true" showFocusFootprint="true"
translation="[404,506]" /> translation="[400,506]" />
</Rectangle> </Rectangle>
</children> </children>
</component> </component>
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="InvidiousInstanceTestingItem" extends="Group"> <component name="InvidiousInstanceTestingItem" extends="Group">
<interface> <interface>
<field id="itemContent" type="node" onChange="OnContentSet" /> <field id="itemContent" type="node" onChange="OnContentSet" />
@@ -53,6 +53,10 @@ function RunTests(instance as string, content as object) as void
m[testNode.func](instance, testNode) m[testNode.func](instance, testNode)
testNode.duration = timer.TotalMilliseconds() testNode.duration = timer.TotalMilliseconds()
if testNode.state = "failed"
LogError(testNode.details)
end if
if m.top.cancel if m.top.cancel
return return
end if end if
@@ -1,13 +1,11 @@
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesTask.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/components/Dialog/DialogUtils.bs" import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesTask.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/source/utils/Logging.bs"
function Init() function Init()
m.log = new log.Logger("InvidiousPublicInstances")
m.failedLabel = m.top.findNode("failedLabel") m.failedLabel = m.top.findNode("failedLabel")
m.refreshButton = m.top.findNode("refreshButton") m.refreshButton = m.top.findNode("refreshButton")
m.instances = m.top.findNode("instances") m.instances = m.top.findNode("instances")
@@ -71,7 +69,7 @@ function OnInvidiousPublicInstancesTaskResults(output as object) as void
error = output.result.error error = output.result.error
end if end if
error = ErrorUtils.Format(error) error = ErrorUtils.Format(error)
m.log.error(output.error) LogError(output.error)
message = `Failed to load Invidious public instances\n${error}` message = `Failed to load Invidious public instances\n${error}`
DialogUtils.ShowDialog(message, "Invidious public instances load error", true) DialogUtils.ShowDialog(message, "Invidious public instances load error", true)
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="InvidiousPublicInstances" extends="Group" includes="Focus"> <component name="InvidiousPublicInstances" extends="Group" includes="Focus">
<interface> <interface>
<field id="instance" type="string" /> <field id="instance" type="string" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="InvidiousPublicInstancesListItem" extends="Group"> <component name="InvidiousPublicInstancesListItem" extends="Group">
<interface> <interface>
<field id="itemContent" type="node" onChange="OnContentSet" /> <field id="itemContent" type="node" onChange="OnContentSet" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="InvidiousPublicInstancesListItemContent" extends="ContentNode"> <component name="InvidiousPublicInstancesListItemContent" extends="ContentNode">
<interface> <interface>
<field id="name" type="string" /> <field id="name" type="string" />
@@ -1,5 +1,5 @@
import "pkg:/source/services/HttpClient.bs"
import "pkg:/components/Services/Invidious/InvidiousService.bs" import "pkg:/components/Services/Invidious/InvidiousService.bs"
import "pkg:/source/services/HttpClient.bs"
@asynctask @asynctask
function InvidiousPublicInstancesTask(input as object) as object function InvidiousPublicInstancesTask(input as object) as object
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="RadioControl" extends="LayoutGroup" includes="Focus"> <component name="RadioControl" extends="LayoutGroup" includes="Focus">
<interface> <interface>
<field id="displayText" type="string" alias="DisplayTextLabel.text" /> <field id="displayText" type="string" alias="DisplayTextLabel.text" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="SettingCategory" extends="Button"> <component name="SettingCategory" extends="Button">
<interface> <interface>
<field id="padding" type="integer" value="10" onChange="Resize" /> <field id="padding" type="integer" value="10" onChange="Resize" />
@@ -1,6 +1,6 @@
import "pkg:/components/Navigation/Navigation.bs" import "pkg:/components/Navigation/Navigation.bs"
import "pkg:/source/utils/FocusManagement.bs"
import "pkg:/components/Navigation/ScrollTo.bs" import "pkg:/components/Navigation/ScrollTo.bs"
import "pkg:/source/utils/FocusManagement.bs"
function Init() function Init()
m.container = m.top.findNode("Container") m.container = m.top.findNode("Container")
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="SettingsScreen" extends="Group" includes="AutoBind,Focus"> <component name="SettingsScreen" extends="Group" includes="AutoBind,Focus">
<interface> <interface>
<field id="navBar" type="node" bind="/NavBar" /> <field id="navBar" type="node" bind="/NavBar" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="StringControl" extends="LayoutGroup" includes="Focus"> <component name="StringControl" extends="LayoutGroup" includes="Focus">
<interface> <interface>
<field id="displayText" type="string" alias="DisplayTextLabel.text" /> <field id="displayText" type="string" alias="DisplayTextLabel.text" />
@@ -1,6 +1,6 @@
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/Screens/WebAppScreen/GenerateQrCodeTask.bs" import "pkg:/components/Screens/WebAppScreen/GenerateQrCodeTask.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/utils/StringUtils.bs"
function Init() function Init()
end function end function
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="WebAppScreen" extends="Group" includes="AutoBind"> <component name="WebAppScreen" extends="Group" includes="AutoBind">
<interface> <interface>
<field id="webServer" type="node" bind="/WebServer" /> <field id="webServer" type="node" bind="/WebServer" />
@@ -9,9 +7,9 @@
<children> <children>
<Group id="noInternet" visible="false"> <Group id="noInternet" visible="false">
<Label <Label
height='720' height="720"
width='1280' width="1280"
font='font:MediumBoldSystemFont' font="font:MediumBoldSystemFont"
horizAlign="center" horizAlign="center"
vertAlign="center" vertAlign="center"
text="Could not get IP address: are we connected to the internet?" text="Could not get IP address: are we connected to the internet?"
@@ -19,26 +17,26 @@
</Group> </Group>
<Group id="yesInternet" visible="false"> <Group id="yesInternet" visible="false">
<Label <Label
height='60' height="60"
width='1280' width="1280"
font='font:MediumBoldSystemFont' font="font:MediumBoldSystemFont"
horizAlign="center" horizAlign="center"
translation="[0,92]" translation="[0,92]"
text="Scan the QR code with your phone camera, or open the URL in a web browser:" text="Scan the QR code with your phone camera, or open the URL in a web browser:"
/> />
<Poster <Poster
id='QrCodePoster' id="QrCodePoster"
height='400' height="400"
width='400' width="400"
loadHeight='400' loadHeight="400"
loadWidth='400' loadWidth="400"
translation='[440, 160]' /> translation="[440, 160]" />
<Label <Label
id='UrlLabel' id="UrlLabel"
height='50' height="50"
width='1280' width="1280"
font='font:MediumBoldSystemFont' font="font:MediumBoldSystemFont"
horizAlign="center" horizAlign="center"
translation="[0,600]" translation="[0,600]"
/> />
@@ -1,5 +1,5 @@
import "pkg:/source/asyncTask/asyncTask.bs"
import "LatestLibVersionTask.bs" import "LatestLibVersionTask.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/source/services/ApplicationInfo.bs" import "pkg:/source/services/ApplicationInfo.bs"
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ApplicationInfo" extends="Node"> <component name="ApplicationInfo" extends="Node">
<interface> <interface>
<field id="lib_version_latest" type="string" /> <field id="lib_version_latest" type="string" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="Invidious" extends="Node"> <component name="Invidious" extends="Node">
<interface> <interface>
<field id="applicationInfo" type="node" /> <field id="applicationInfo" type="node" />
@@ -1,14 +1,15 @@
import "pkg:/components/VideoFeed/PaginationType.bs"
import "pkg:/source/services/HttpClient.bs"
import "pkg:/source/utils/CryptoUtils.bs"
import "pkg:/source/utils/Logging.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"
import "pkg:/source/utils/TimeUtils.bs" import "pkg:/source/utils/TimeUtils.bs"
import "pkg:/source/utils/CryptoUtils.bs"
import "pkg:/source/services/HttpClient.bs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
namespace Invidious namespace Invidious
const INSTANCES_API = "https://api.invidious.io/instances.json?sort_by=type,users" const INSTANCES_API = "https://api.invidious.io/instances.json?sort_by=type,users"
const DEFAULT_INSTANCE = "https://vid.puffyan.us" const DEFAULT_INSTANCE = "https://invidious.fdn.fr"
const TOKEN_CALLBACK = "/invidious/token_callback" const TOKEN_CALLBACK = "/invidious/token_callback"
@@ -34,8 +35,6 @@ namespace Invidious
public node as object public node as object
function new(node as object) function new(node as object)
m.log = new log.Logger("InvidiousService")
m.node = node m.node = node
' TODO:P2 api definitions are not needed everytime, move them to a separate function and lazy load ' TODO:P2 api definitions are not needed everytime, move them to a separate function and lazy load
apiDefinitions = node.apiDefinitions apiDefinitions = node.apiDefinitions
@@ -50,7 +49,9 @@ namespace Invidious
DefaultHandler: m.DefaultHandler, DefaultHandler: m.DefaultHandler,
AuthFeedHandler: m.AuthFeedHandler, AuthFeedHandler: m.AuthFeedHandler,
PlaylistHandler: m.PlaylistHandler, PlaylistHandler: m.PlaylistHandler,
ChannelHandler: m.ChannelHandler ChannelVideosHandler: m.ChannelVideosHandler,
ChannelPlaylistsHandler: m.ChannelPlaylistsHandler,
ChannelRelatedChannelsHandler: m.ChannelRelatedChannelsHandler
} }
end function end function
@@ -157,18 +158,26 @@ namespace Invidious
requestData = contentNode.feed requestData = contentNode.feed
endpoint = m.endpoints[requestData.endpoint] endpoint = m.endpoints[requestData.endpoint]
if endpoint = invalid or endpoint.pagination <> true if endpoint = invalid or StringUtils.IsNullOrEmpty(endpoint.paginationType)
return return
end if end if
contentNode.pagination = true
contentNode.page += 1
if not requestData.DoesExist("queryParams") if not requestData.DoesExist("queryParams")
requestData.queryParams = {} requestData.queryParams = {}
end if end if
requestData.queryParams.page = contentNode.page contentNode.paginationType = endpoint.paginationType
if endpoint.paginationType = PaginationType.Pages
contentNode.page += 1
requestData.queryParams.page = contentNode.page
else if endpoint.paginationType = PaginationType.Continuation
continuation = contentNode.continuation
if not StringUtils.IsNullOrEmpty(continuation)
requestData.queryParams.continuation = continuation
end if
end if
contentNode.feed = requestData contentNode.feed = requestData
end function end function
@@ -256,21 +265,54 @@ namespace Invidious
end function end function
function DefaultHandler(m as object, requestData as object, response as object) as object function DefaultHandler(m as object, requestData as object, response as object) as object
return response.Json() if response.StatusCode() = 200
json = response.Json()
return {
items: json
}
end if
return invalid
end function end function
function PlaylistHandler(m as object, requestData as object, response as object) as object function PlaylistHandler(m as object, requestData as object, response as object) as object
if response.StatusCode() = 200 if response.StatusCode() = 200
json = response.Json() json = response.Json()
return json.videos return {
items: json.videos
}
end if end if
return invalid return invalid
end function end function
function ChannelHandler(m as object, requestData as object, response as object) as object function ChannelVideosHandler(m as object, requestData as object, response as object) as object
if response.StatusCode() = 200 if response.StatusCode() = 200
json = response.Json() json = response.Json()
return json.videos return {
items: json.videos,
continuation: json.continuation
}
end if
return invalid
end function
function ChannelPlaylistsHandler(m as object, requestData as object, response as object) as object
if response.StatusCode() = 200
json = response.Json()
return {
items: json.playlists,
continuation: json.continuation
}
end if
return invalid
end function
function ChannelRelatedChannelsHandler(m as object, requestData as object, response as object) as object
if response.StatusCode() = 200
json = response.Json()
return {
items: json.relatedChannels,
continuation: json.continuation
}
end if end if
return invalid return invalid
end function end function
@@ -283,15 +325,17 @@ namespace Invidious
videos = [] videos = []
videos.Append(json.notifications) videos.Append(json.notifications)
videos.Append(json.videos) videos.Append(json.videos)
return videos return {
items: videos
}
end if end if
return invalid return invalid
end function end function
function DeleteExpiredToken(response as object) function DeleteExpiredToken(response as object)
if response.StatusCode() = 403 if response.StatusCode() = 403
m.log.warn(`Invidious instance responded with 403: ${response.Text()}`) LogWarn(`Invidious instance responded with 403: ${response.Text()}`)
m.log.warn("Deleting Invidious token...") LogWarn("Deleting Invidious token...")
m.DeleteAuthToken() m.DeleteAuthToken()
end if end if
end function end function
@@ -1,5 +1,5 @@
import "pkg:/source/utils/TimeUtils.bs"
import "pkg:/components/VideoFeed/FeedLoadState.bs" import "pkg:/components/VideoFeed/FeedLoadState.bs"
import "pkg:/source/utils/TimeUtils.bs"
namespace InvidiousContent namespace InvidiousContent
@@ -115,22 +115,7 @@ namespace InvidiousContent
node.videoCountText = GetVideoCountText(item) node.videoCountText = GetVideoCountText(item)
node.thumbnail = GetChannelThumbnail(item.authorThumbnails) node.thumbnail = GetChannelThumbnail(item.authorThumbnails)
node.banner = GetChannelBanner(item.authorBanners) node.banner = GetChannelBanner(item.authorBanners)
SetIfExists(node, "tabs", item, "tabs")
if item.latestVideos <> invalid
newNodes = []
for each video in item.latestVideos
video.type = "video"
videoNode = ToVideoContentNode(invalid, video, instance)
if videoNode <> invalid
newNodes.push(videoNode)
end if
end for
if newNodes.Count() > 0
node.latestVideos.appendChildren(newNodes)
end if
end if
return node return node
end function end function
@@ -245,7 +230,7 @@ namespace InvidiousContent
if authorBanners = invalid or authorBanners.Count() = 0 if authorBanners = invalid or authorBanners.Count() = 0
return "" return ""
end if end if
return authorBanners[authorBanners.Count() - 1].url return authorBanners[0].url
end function end function
function GetVideoCountText(item as object) as string function GetVideoCountText(item as object) as string
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="Preferences" extends="Node"> <component name="Preferences" extends="Node">
<interface> <interface>
<field id="__version" type="integer" value="1" /> <field id="__version" type="integer" value="1" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="SponsorBlockNotification" extends="Group"> <component name="SponsorBlockNotification" extends="Group">
<interface> <interface>
<field id="segment" type="assocarray" onChange="OnSegmentSet" /> <field id="segment" type="assocarray" onChange="OnSegmentSet" />
@@ -1,6 +1,6 @@
import "pkg:/source/services/HttpClient.bs"
import "pkg:/source/utils/ColorUtils.bs" import "pkg:/source/utils/ColorUtils.bs"
import "pkg:/source/utils/CryptoUtils.bs" import "pkg:/source/utils/CryptoUtils.bs"
import "pkg:/source/services/HttpClient.bs"
namespace SponsorBlock namespace SponsorBlock
const SKIP_SEGMENT_ENDPOINT = "/api/skipSegments" const SKIP_SEGMENT_ENDPOINT = "/api/skipSegments"
@@ -107,9 +107,9 @@ namespace SponsorBlock
pixelEnd = (segment.segment[1] / videoDuration) * width pixelEnd = (segment.segment[1] / videoDuration) * width
color = m.SegmentColor(segment.category) color = m.SegmentColor(segment.category)
' highlight's duration is zero, so it is not visble on the bar. ' highlight's duration is zero, so it is not visble on the bar.
' Add a couple of pixels to see it ' Add a few pixels to see it
if pixelStart = pixelEnd if pixelStart = pixelEnd
pixelEnd += 2 pixelEnd += 5
end if end if
bar.DrawRect(pixelStart, 0, pixelEnd - pixelStart, height, color) bar.DrawRect(pixelStart, 0, pixelEnd - pixelStart, height, color)
end for end for
@@ -0,0 +1,4 @@
enum PaginationType
Pages = "Pages"
Continuation = "Continuation"
end enum
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ActionRowCell" extends="Group"> <component name="ActionRowCell" extends="Group">
<interface> <interface>
<field id="itemContent" type="node" onChange="OnContentSet" /> <field id="itemContent" type="node" onChange="OnContentSet" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ChannelRowCell" extends="Group"> <component name="ChannelRowCell" extends="Group">
<interface> <interface>
<field id="itemContent" type="node" onChange="OnContentSet" /> <field id="itemContent" type="node" onChange="OnContentSet" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="LoadingRowCell" extends="Group"> <component name="LoadingRowCell" extends="Group">
<interface> <interface>
<field id="itemContent" type="node" onChange="OnContentSet" /> <field id="itemContent" type="node" onChange="OnContentSet" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="PlaylistRowCell" extends="Group"> <component name="PlaylistRowCell" extends="Group">
<interface> <interface>
<field id="itemContent" type="node" onChange="OnContentSet" /> <field id="itemContent" type="node" onChange="OnContentSet" />
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="RowCell" extends="Group"> <component name="RowCell" extends="Group">
<interface> <interface>
<field id="type" type="string" /> <field id="type" type="string" />
@@ -1,3 +1,4 @@
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/TimeUtils.bs" import "pkg:/source/utils/TimeUtils.bs"
import "pkg:/source/utils/Types.bs" import "pkg:/source/utils/Types.bs"
@@ -23,36 +24,30 @@ function OnContentSet() as void
m.titleLabel.text = content.title m.titleLabel.text = content.title
m.authorLabel.text = content.author m.authorLabel.text = content.author
if content.isUpcoming = true if not StringUtils.IsNullOrEmpty(content.publishedText)
m.viewCountDateLabel.text = content.premiereTimestampText label = content.publishedText
else if not StringUtils.IsNullOrEmpty(content.viewCountText)
publishedText = ValidString(content.publishedText) label = `${label} • ${content.viewCountText}`
viewCountText = ValidString(content.viewCountText)
if publishedText = "" and viewCountText = ""
m.viewCountDateLabel.text = ""
else
m.viewCountDateLabel.text = `${publishedText} • ${viewCountText}`
end if end if
m.viewCountDateLabel.text = label
else if content.isUpcoming = true
m.viewCountDateLabel.text = content.premiereTimestampText
end if end if
m.thumbnail.uri = content.thumbnail m.thumbnail.uri = content.thumbnail
if content.isUpcoming = true m.durationRect.visible = false
m.upcomingRect.visible = true m.upcomingRect.visible = false
m.liveRect.visible = false m.liveRect.visible = false
m.durationRect.visible = false
else if content.liveNow if ValidInt(content.lengthSeconds) <> 0
m.upcomingRect.visible = false SetDurationText(content.lengthText)
m.liveRect.visible = true m.durationRect.visible = true
m.durationRect.visible = false
else else
m.upcomingRect.visible = false if content.isUpcoming = true
m.liveRect.visible = false m.upcomingRect.visible = true
if ValidInt(content.lengthSeconds) <> 0 else if content.liveNow
SetDurationText(content.lengthText) m.liveRect.visible = true
m.durationRect.visible = true
else
m.durationRect.visible = false
end if end if
end if end if
end function end function
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="VideoRowCell" extends="Group"> <component name="VideoRowCell" extends="Group">
<interface> <interface>
<field id="itemContent" type="node" onChange="OnContentSet" /> <field id="itemContent" type="node" onChange="OnContentSet" />
@@ -1,21 +1,21 @@
import "pkg:/source/utils/Types.bs" import "pkg:/components/ChannelView/ChannelUtils.bs"
import "pkg:/source/roku_modules/log/LogMixin.brs" import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/source/asyncTask/asyncTask.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:/source/utils/ErrorUtils.bs"
import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs" import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/components/PlaylistView/PlaylistUtils.bs" import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/ChannelView/ChannelUtils.bs" import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/Types.bs"
' TODO:P1 add the option to remove a row if it does not have any content
' E.g. NBC News does not return any related chnanels
function Init() function Init()
m.pendingLoadTasks = {} m.pendingLoadTasks = {}
end function end function
function OnNodeReady() function OnNodeReady()
m.log = new log.Logger("VideoRowList")
m.top.ObserveField("itemFocused", FuncName(OnItemFocused)) m.top.ObserveField("itemFocused", FuncName(OnItemFocused))
m.top.ObserveField("rowItemFocused", FuncName(OnRowItemFocused)) m.top.ObserveField("rowItemFocused", FuncName(OnRowItemFocused))
m.top.ObserveField("rowItemSelected", FuncName(OnRowItemSelected)) m.top.ObserveField("rowItemSelected", FuncName(OnRowItemSelected))
@@ -70,15 +70,15 @@ function OnRowItemSelected(event as object)
if rowItem.type = "video" if rowItem.type = "video"
videoId = rowItem.videoId videoId = rowItem.videoId
m.log.info("Play video: " + videoId) LogInfo("Play video: " + videoId)
m.playQueue@.Play(rowItem, -1) m.playQueue@.Play(rowItem, -1)
else if rowItem.type = "playlist" else if rowItem.type = "playlist"
playlistId = rowItem.playlistId playlistId = rowItem.playlistId
m.log.info("Open playlist: " + playlistId) LogInfo("Open playlist: " + playlistId)
PlaylistUtils.Open(rowItem) PlaylistUtils.Open(rowItem)
else if rowItem.type = "channel" else if rowItem.type = "channel"
authorId = rowItem.authorId authorId = rowItem.authorId
m.log.info("Open channel: " + authorId) LogInfo("Open channel: " + authorId)
ChannelUtils.Open(rowItem) ChannelUtils.Open(rowItem)
else if rowItem.type = "action" else if rowItem.type = "action"
if rowItem.action = "LoginDialog" if rowItem.action = "LoginDialog"
@@ -90,7 +90,7 @@ function OnRowItemSelected(event as object)
end function end function
function OnAuthTokenChange() function OnAuthTokenChange()
' TODO:P1: Reload only content that is authenticated ' TODO:P2: Reload only content that is authenticated
' Should not reload if the page is not visible. Instead, capture state and reload when the page becomes visible ' Should not reload if the page is not visible. Instead, capture state and reload when the page becomes visible
InitContent() InitContent()
end function end function
@@ -154,7 +154,7 @@ function GetRowsToLoad() as object
end if end if
subContentNodes = [] subContentNodes = []
range = m.top.numRows + 2 range = m.top.numRows + 1
for i = -range to range for i = -range to range
index = focus + i index = focus + i
if index < 0 if index < 0
@@ -174,6 +174,8 @@ function GetRowsToLoad() as object
end function end function
function LoadRowContent(contentNode as object) function LoadRowContent(contentNode as object)
LogInfo("Loading row content:", contentNode.title)
contentNode.loadState = FeedLoadState.Loading contentNode.loadState = FeedLoadState.Loading
task = StartAsyncTask(VideoRowListRowContentTask, { task = StartAsyncTask(VideoRowListRowContentTask, {
node: m.top, node: m.top,
@@ -197,7 +199,7 @@ function OnVideoRowListRowContentTaskResult(output as object) as void
error = output.result.error error = output.result.error
end if end if
error = ErrorUtils.Format(error) error = ErrorUtils.Format(error)
m.log.error(error) LogError(error)
m.top.onError = error m.top.onError = error
message = `Failed to load feed\n${error}` message = `Failed to load feed\n${error}`
DialogUtils.ShowDialog(message, "Feed load fail", true) DialogUtils.ShowDialog(message, "Feed load fail", true)
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="VideoRowList" extends="RowList" includes="AutoBind"> <component name="VideoRowList" extends="RowList" includes="AutoBind">
<interface> <interface>
<field id="appController" type="node" bind="/AppController" /> <field id="appController" type="node" bind="/AppController" />
@@ -43,7 +43,7 @@ function VideoRowListRowContentTask(input as object) as object
instance = service.GetInstance() instance = service.GetInstance()
itemNodes = [] itemNodes = []
for each item in response.result for each item in response.result.items
itemNode = InvidiousContent.ToRowCellContentNode(item, instance) itemNode = InvidiousContent.ToRowCellContentNode(item, instance)
if itemNode <> invalid if itemNode <> invalid
itemNodes.Push(itemNode) itemNodes.Push(itemNode)
@@ -53,8 +53,20 @@ function VideoRowListRowContentTask(input as object) as object
RemovePlaceHolderItems(contentNode) RemovePlaceHolderItems(contentNode)
contentNode.appendChildren(itemNodes) contentNode.appendChildren(itemNodes)
if contentNode.pagination = true and response.result.Count() > 0 hasContinuation = not StringUtils.IsNullOrEmpty(response.result.continuation)
contentNode.loadState = FeedLoadState.LoadedPage if hasContinuation
contentNode.continuation = response.result.continuation
end if
if response.result.items.Count() > 0
pageType = contentNode.paginationType
if pageType = PaginationType.Continuation and hasContinuation
contentNode.loadState = FeedLoadState.LoadedPage
else if pageType = PaginationType.Pages
contentNode.loadState = FeedLoadState.LoadedPage
else
contentNode.loadState = FeedLoadState.Loaded
end if
else else
contentNode.loadState = FeedLoadState.Loaded contentNode.loadState = FeedLoadState.Loaded
end if end if
@@ -1,7 +1,7 @@
import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/Services/SponsorBlock/SponsorBlockTask.bs"
import "pkg:/components/Services/SponsorBlock/SponsorBlockSegmentViewedTask.bs"
import "pkg:/components/Services/SponsorBlock/Notifications/SponsorBlockNotificationUtils.bs" import "pkg:/components/Services/SponsorBlock/Notifications/SponsorBlockNotificationUtils.bs"
import "pkg:/components/Services/SponsorBlock/SponsorBlockSegmentViewedTask.bs"
import "pkg:/components/Services/SponsorBlock/SponsorBlockTask.bs"
import "pkg:/source/asyncTask/asyncTask.bs"
namespace SponsorBlock namespace SponsorBlock
@@ -95,7 +95,7 @@ namespace SponsorBlock
if not output.success if not output.success
error = ErrorUtils.Format(output.error) error = ErrorUtils.Format(output.error)
m.log.error(error) LogError(error)
return return
end if end if
@@ -136,7 +136,7 @@ namespace SponsorBlock
if action = "AutoSkip" if action = "AutoSkip"
m.top.seek = segmentEnd m.top.seek = segmentEnd
m.log.info("Skipping section:", segment["category"]) LogInfo("Skipping section:", segment["category"])
SendSkippedSectionEvent(segment.UUID) SendSkippedSectionEvent(segment.UUID)
return return
end if end if
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="VideoContainer" extends="Group"> <component name="VideoContainer" extends="Group">
<interface> <interface>
<field id="fullscreen" type="boolean" value="true" /> <field id="fullscreen" type="boolean" value="true" />
@@ -1,16 +1,15 @@
import "pkg:/source/asyncTask/asyncTask.bs" import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
import "pkg:/components/VideoPlayer/MarkVideoWatchedTask.bs"
import "pkg:/components/VideoPlayer/SponsorBlock.bs"
import "pkg:/components/VideoPlayer/VideoContentTask.bs" import "pkg:/components/VideoPlayer/VideoContentTask.bs"
import "pkg:/components/VideoPlayer/VideoPlayerStyle.bs" import "pkg:/components/VideoPlayer/VideoPlayerStyle.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs" import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/components/VideoPlayer/MarkVideoWatchedTask.bs" import "pkg:/source/asyncTask/asyncTask.bs"
import "pkg:/components/Dialog/DialogUtils.bs"
import "pkg:/source/utils/ErrorUtils.bs" import "pkg:/source/utils/ErrorUtils.bs"
import "pkg:/components/VideoPlayer/SponsorBlock.bs" import "pkg:/source/utils/Logging.bs"
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
function Init() function Init()
m.log = new log.Logger("VideoPlayer")
SetPlayerStyle() SetPlayerStyle()
SetupAnimation() SetupAnimation()
@@ -90,7 +89,7 @@ function OnVideoContentTaskResults(output as object) as void
error = output.result.error error = output.result.error
end if end if
error = ErrorUtils.Format(error) error = ErrorUtils.Format(error)
m.log.error(error) LogError(error)
videoId = output.task.input.content.videoId videoId = output.task.input.content.videoId
message = `Failed to load video information for ${videoId}\n${error}` message = `Failed to load video information for ${videoId}\n${error}`
DialogUtils.ShowDialog(message, "Video load fail", true) DialogUtils.ShowDialog(message, "Video load fail", true)
@@ -145,13 +144,13 @@ function OnVideoPlayerStateChange() as void
' If we successfully played the video, then any error that comes later is not due to a 403 (FORBIDDEN). ' If we successfully played the video, then any error that comes later is not due to a 403 (FORBIDDEN).
' This is to reduce false positives, as we do not want retry another link if the first link is working fine. ' This is to reduce false positives, as we do not want retry another link if the first link is working fine.
if state = "playing" and not m.videoPlayingSuccess if state = "playing" and not m.videoPlayingSuccess
m.log.info(`Now playing video ${m.top.content.url}`) LogInfo(`Now playing video ${m.top.content.url}`)
m.videoPlayingSuccess = true m.videoPlayingSuccess = true
end if end if
if state = "error" if state = "error"
errorInfo = m.top.errorInfo errorInfo = m.top.errorInfo
m.log.error(`Error playing video ${m.top.content.videoId}`, errorInfo) LogError(`Error playing video ${m.top.content.videoId}`, errorInfo)
if m.videoPlayingSuccess <> true if m.videoPlayingSuccess <> true
' http for stream format, mediaerror for DASH ' http for stream format, mediaerror for DASH
if errorInfo.category = "http" or errorInfo.category = "mediaerror" if errorInfo.category = "http" or errorInfo.category = "mediaerror"
@@ -162,7 +161,7 @@ function OnVideoPlayerStateChange() as void
m.top.content.playletStreamUrlIndex = playletStreamUrlIndex m.top.content.playletStreamUrlIndex = playletStreamUrlIndex
if playletStreamUrlIndex < playletStreamUrls.Count() if playletStreamUrlIndex < playletStreamUrls.Count()
nextUrl = playletStreamUrls[playletStreamUrlIndex] nextUrl = playletStreamUrls[playletStreamUrlIndex]
m.log.error(`Stream ${currentUrl} failed to play. Trying next stream ${nextUrl}`) LogError(`Stream ${currentUrl} failed to play. Trying next stream ${nextUrl}`)
m.top.content.url = nextUrl m.top.content.url = nextUrl
' This video errored, and is about to finish, so don't close the video yet ' This video errored, and is about to finish, so don't close the video yet
@@ -231,7 +230,7 @@ function PlayNextRecommendedVideo(recommendedVideos as object) as boolean
continue for continue for
end if end if
if not m.container@.watchedVideosContain(videoId) if not m.container@.watchedVideosContain(videoId)
m.log.info(`Playing next recommended video (${videoId})`) LogInfo(`Playing next recommended video (${videoId})`)
node = InvidiousContent.ToVideoContentNode(invalid, metadata, invalid) node = InvidiousContent.ToVideoContentNode(invalid, metadata, invalid)
VideoUtils.PlayVideo(node) VideoUtils.PlayVideo(node)
return true return true
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="VideoPlayer" extends="Video" includes="AutoBind"> <component name="VideoPlayer" extends="Video" includes="AutoBind">
<interface> <interface>
<field id="appController" type="node" bind="/AppController" /> <field id="appController" type="node" bind="/AppController" />
@@ -1,5 +1,5 @@
import "pkg:/components/VideoPlayer/VideoUtils.bs"
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs" import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
import "pkg:/components/VideoPlayer/VideoUtils.bs"
namespace Http namespace Http
Loaded 100 of 135 files, more files were not shown because too many files have changed in this diff. Show more