diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 6313b56c..00000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text=auto eol=lf diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e7a88a65..00000000 --- a/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -.DS_Store -build -###BrightScript specific -dist/apps -out/ - -#Rooibos generated -rooibosFunctionMap.brs - -### Eclipse project files - -.metadata -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.settings/ -.loadpath -.recommenders - -# Eclipse Core -.project -.classpath - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -node_modules/ -out -**/roku_modules/ -package-lock.json - -!.vscode -.vscode/.env -dist/ - -.history \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 8bbba6a8..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "brightscript", - "request": "launch", - "name": "Roku Youtube App", - "preLaunchTask": "roku-youtube", - "internalConsoleOptions": "neverOpen", - "envFile": "${workspaceFolder}/.vscode/.env", - "host": "${env:ROKU_DEV_TARGET}", - "password": "${env:ROKU_DEVPASSWORD}", - "outDir": "${workspaceFolder}/out", - "rootDir": "${workspaceFolder}/build", - "consoleOutput": "normal", - "stopOnEntry": false, - "retainDeploymentArchive": true, - "retainStagingFolder": true, - "autoRunSgDebugCommands": [], - "files": [ - "manifest", - "*.*", - "**/*.*", - "!*.zip", - "!**/*.zip" - ] - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 28e94581..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "cSpell.ignorePaths": [ - "**/package-lock.json", - "**/node_modules/**", - "**/vscode-extension/**", - "**/.git/objects/**", - ".vscode", - "dist", - "build" - ], - "files.exclude": { - ".history": true, - "node_modules": true, - "out": true, - "**/.classpath": true, - "**/.project": true, - "**/.settings": true, - "**/.factorypath": true, - "/tmp/**": true, - "**/dist": true, - "**/out": true - }, - "search.exclude": { - "**/.git/objects/**": true, - "**/.git/subtree-cache/**": true, - "**/node_modules/**": true, - "**/.meteor/local": true, - "**/build/**": true, - "build/**": true, - "**/.history/**": true, - ".history/**": true, - ".history/**/*": true, - "out/**": true, - "**/out/**": true, - "/tmp/**": true, - "**/dist": true, - "**/build": true, - "**/out": true - }, - "files.useExperimentalFileWatcher": true, - "files.watcherExclude": { - "**/.git/objects/**": true, - "**/.git/subtree-cache/**": true, - "**/node_modules/**": true, - "**/.meteor/local": true, - "**/build/**": true, - "**/.history/**": true, - ".history/**": true, - "**/out/**": true, - "**/dist": true, - "**/build": true, - "**/out": true - }, - "cSpell.enableFiletypes": ["markdown"], - - "xml.fileAssociations": [ - { - "systemId": ".vscode/project.xsd", - "pattern": "**/*.xml" - } - ], - "xml.format.splitAttributes": true, - "xml.validation.enabled": false, - "xml.format.preserveEmptyContent": true, - "xml.preferences.quoteStyle": "single", - "xml.format.enforceQuoteStyle": "preferred", - "editor.tabSize": 4, - "[brightscript]": { - "editor.tabSize": 2 - }, - "[brighterscript]": { - "editor.tabSize": 2 - }, - "[xml]": { - "editor.tabSize": 2 - }, - "editor.insertSpaces": true, - "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, - "files.trimTrailingWhitespace": true, - "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true, - "[javascript]": { - "editor.defaultFormatter": "vscode.typescript-language-features" - }, - "workbench.colorCustomizations": { - "statusBar.background": "#FF4658", - "statusBar.debuggingBackground": "#932b35", - "panelTitle.activeBorder": "#ff0000", - "activityBar.background": "#304f7d", - "titleBar.activeBackground": "#6A9CE6", - "titleBar.activeForeground": "#FAFBFE" - }, - "launches": { - "Run": "Run" - }, - "eslint.validate": ["javascript", "typescript"], - "eslint.format.enable": true, - "gotoNextPreviousMember.symbolKinds": [ - "constructor", - "function", - "method", - "module", - "namespace", - "class", - "struct", - "interface" - ], - "cSpell.enabledLanguageIds": [ - "brightscript", - "javascript", - "markdown", - "plaintext", - "text", - "typescript", - "yml", - "brighterscript" - ], - "brightscript.output.clearOnLaunch": true, - "brightscript.output.focusOnLaunch": true, - "brightscript.format.removeTrailingWhiteSpace": false, - "brightscript.output.includeStackTraces": true, - "brightscript.debug.enableDebugProtocol": false, - "brightscript.outputPanelStartupBehavior": "focus", - "brightscript.format.keywordCase": "lower", - "brightscript.enableLanguageServer": true, - "brightscript.deviceDiscovery.enabled": false, - "editor.tokenColorCustomizations": { - "textMateRules": [ - { - "scope": "meta.function-call.brs,punctuation.decorator.brs", - "settings": { - "foreground": "#34BEB0", - "fontStyle": "" - } - } - ] - }, - "brightscript.bsdk": "node_modules/brighterscript", - "brightscript.output.hyperlinkFormat": "FilenameAndFunction", - "cx.server": { - "url": "https://checkmarx.nba-hq.com/", - "alias": "nba", - "username": "", - "password": "", - "project_id": 0, - "team_id": 0, - "project_name": "" - }, - "macros": { - "restart": [ - "extension.maestro.navigation.updateTDDTarget", - "workbench.action.debug.stop", - "workbench.action.debug.start" - ] - } -} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index c30e9480..00000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "roku-youtube", - "type": "shell", - "command": "npm run build", - "problemMatcher": [], - "presentation": { - "echo": true, - "reveal": "silent", - "focus": false, - "panel": "shared", - "showReuseMessage": false, - "clear": true - }, - "group": { - "kind": "build", - "isDefault": true - } - } - ] -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8abb7d5e..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [0.2.0] - 2022-11-06 -### Added -- QrCode component to take user to invidious token page -- Web server allowing the recption of the token through call back - - The web server can also be used to serve a web app, facilitating the - configuration of the Roku app, as well as controlling the app itself -- `auth/feed`, to read the subscriptions of the current user -- Video information (Author, view count, release date) -- Trending categories, subscription view, and custom (hardcoded) search categories -- User Playlist support -- Added basic instructions - -## [0.1.0] - 2022-10-30 -### Added -- Initial version -- Reads feeds from popular and trending videos using Invidious APIs -- Skips sections using SponsorBlock diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 6585fb21..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Brahim Hadriche - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 7ccad739..00000000 --- a/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Youtube for Roku -Unofficial Youtube client for Roku. - -## Features -- No Ads (I guess that's a feature) -- Privacy driven (uses [Invidious](https://invidious.io/) backend) -- [SponsorBlock](https://sponsor.ajay.app/) integration (skips undesirable sections in videos) - -## Preview -preview - -## Installation - -### Enable Roku Developer Mode -First, you need to enable developer mode on your Roku TV (if you have not done that already). - -Using your Roku remote, enter the following sequence: - -DevSequence - -For full instructions, see [Set up your Roku device to enable Developer Settings](https://developer.roku.com/en-ca/docs/developer-program/getting-started/developer-setup.md#step-1-set-up-your-roku-device-to-enable-developer-settings) - -Make sure to remember the password you set during this step, you will need it later. - -### Gather your info -By now, you show have the following -- Your Roku Dev password (setup in the previous step) -- Your Roku TV local IP address - - You can find this information in your TV network settings. It should look like 192.168.X.X or so - -### Install Youbtube for Roku (command line) - -Install Youbtube for Roku as a dev channel using this command, and replace: -- `REPLACE_PASSWORD_HERE` : with your Roku Dev password -- `REPLACE_IP_ADDRESS_HERE` : with your Roku TV local IP address -``` -curl https://raw.githubusercontent.com/iBicha/roku-youtube/main/install.sh | ROKU_DEV_TARGET=REPLACE_IP_ADDRESS_HERE DEVPASSWORD=REPLACE_PASSWORD_HERE sh -``` -Example: -``` -curl https://raw.githubusercontent.com/iBicha/roku-youtube/main/install.sh | ROKU_DEV_TARGET=192.168.1.2 DEVPASSWORD=1234 sh -``` - - -If successful, you should see some output on your terminal, with `Status: 200`. - -You should see a new channel on your Roku TV, with "Roku Developers" Logo (we'll get this thing a logo) - -### Install Youbtube for Roku (Manual) -1. Go to `https://github.com/iBicha/roku-youtube/releases` and download `roku-youtube.zip` -2. Open `http://REPLACE_IP_ADDRESS_HERE/` (e.g. http://192.168.1.2/) in your browser -3. If prompted for username and password - - The username is `rokudev` - - The password is whatever you set when you enabled Developer mode -4. Click on `Upload` button and select the `roku-youtube.zip` file you downloaded in step 1 -6. Click `Install with zip` button - - If you're updating the app (or you already have a dev channel) the button would say `Replace with zip` - -## Development -1. `git clone https://github.com/iBicha/roku-youtube.git` -1. `cd roku-youtube` -1. `npm install` - -Create a file under `roku-youtube/.vscode/.env` containing: -``` -ROKU_DEV_TARGET=REPLACE_IP_ADDRESS_HERE -ROKU_DEVPASSWORD=REPLACE_PASSWORD_HERE -``` - -Then you can open the project using VS Code and deploy to your Roku TV using the Debug button. diff --git a/bsconfig.json b/bsconfig.json deleted file mode 100644 index 7b8a2180..00000000 --- a/bsconfig.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "rootDir": "src", - "files": [ - "manifest", - "source/**/*.*", - "images/**/*.*", - "meta/**/*.*", - "components/**/*.*", - "!**/*.spec.bs", - "www/**/*.*" - ], - "autoImportComponentScript": true, - "createPackage": false, - "stagingFolderPath": "build", - "diagnosticFilters": [ - { - "src": "**/roku_modules/**/*.*" - }, - { - "src": "**/*spec.bs", - "codes": ["LINT3011"] - }, - { - "src": "**/RALETrackerTask.*" - }, - { - "src": "**/*.*" - } - ], - "emitDefinitions": true, - "plugins": [ - "maestro-roku-bsc-plugin", - "roku-log-bsc-plugin", - "@rokucommunity/bslint" - ], - "rooibos": { - "isRecordingCodeCoverage": false, - "testsFilePattern": null, - "tags": ["!integration", "!deprecated", "!fixme"], - "showOnlyFailures": true, - "catchCrashes": true, - "lineWidth": 70 - }, - "rokuLog": { - "strip": false, - "insertPkgPath": true - }, - "sourceMap": true, - "maestro": { - "excludeFilters": ["**/roku_modules/**/*", "**/rooibos/**/*"], - "buildForIDE": false, - "paramStripExceptions": ["onKeyEvent"] - } -} diff --git a/bslint.json b/bslint.json deleted file mode 100644 index a4571896..00000000 --- a/bslint.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "rules": { - "inline-if-style": "no-then", - "block-if-style": "no-then", - "condition-style": "no-group", - "named-function-style": "no-sub", - "anon-function-style": "no-sub", - "type-annotations": "args", - "assign-all-paths": "off", - "unsafe-path-loop": "error", - "unsafe-iterators": "error", - "unreachable-code": "warn", - "case-sensitivity": "warn", - "unused-variable": "warn", - "consistent-return": "error", - "aa-comma-style": "never" - } -} diff --git a/install.sh b/install.sh deleted file mode 100755 index eaa8fe06..00000000 --- a/install.sh +++ /dev/null @@ -1,30 +0,0 @@ -# Installs the roku-youtube.zip app as a dev channel - -if [ -z "$ROKU_DEV_TARGET" ]; -then - echo "Variable ROKU_DEV_TARGET is not set. What is your Roku TV IP address? Example: 192.168.1.2"; - read ROKU_DEV_TARGET -fi - -if [ -z "$DEVPASSWORD" ]; -then - echo "Variable DEVPASSWORD is not set. What is your Roku Dev password? Example: 1234"; - read DEVPASSWORD -fi - -tmp_folder=$(mktemp -d) -tmp_zip_file="$tmp_folder/roku-youtube.zip" -tmp_http_response_file="$tmp_folder/roku-response.html" - -echo "Downloading archive to temporary folder ..." - -# TODO: Check for curl, use wget if curl is not available -curl -L https://github.com/iBicha/roku-youtube/releases/latest/download/roku-youtube.zip -o $tmp_zip_file - -echo "Installing app on device at $ROKU_DEV_TARGET ..." - -curl --user rokudev:$DEVPASSWORD --digest --silent --show-error -F "mysubmit=Install" -F "archive=@$tmp_zip_file" --output $tmp_http_response_file --write-out "Status: %{http_code}" http://$ROKU_DEV_TARGET/plugin_install - -echo "\nDeleting temporary folder ..." - -rm -rf $tmp_folder \ No newline at end of file diff --git a/package.json b/package.json deleted file mode 100644 index 5382531f..00000000 --- a/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "youtube-roku", - "version": "0.2.0", - "description": "Unofficial Youtube client for Roku", - "dependencies": { - "bslib": "npm:@rokucommunity/bslib@^0.1.1", - "log": "npm:roku-log@^0.8.0", - "maestro": "npm:maestro-roku@^0.47.0", - "roku-requests": "^0.2.0" - }, - "devDependencies": { - "@rokucommunity/bslint": "^0.7.5", - "brighterscript": "^0.60.4", - "maestro-roku-bsc-plugin": "^0.25.7", - "roku-log-bsc-plugin": "^0.6.1", - "rooibos-roku": "^5.2.3", - "ropm": "^0.10.10", - "semver": "^7.3.8" - }, - "ropm": { - "rootDir": "src", - "packageRootDir": "dist", - "noprefix": [ - "maestro", - "roku-requests" - ] - }, - "scripts": { - "build": "npm run manifest-version && node scripts/run-roku-youtube.js", - "test": "echo \"Error: no test specified\" && exit 1", - "manifest-version": "node scripts/update-manifest-version.js", - "postinstall": "npx ropm copy", - "lint": "npx bsc" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } -} diff --git a/scripts/run-roku-youtube.js b/scripts/run-roku-youtube.js deleted file mode 100644 index 63f0d3c1..00000000 --- a/scripts/run-roku-youtube.js +++ /dev/null @@ -1,18 +0,0 @@ -const path = require('path'); -const ProgramBuilder = require('brighterscript').ProgramBuilder; -const DiagnosticSeverity = require('brighterscript').DiagnosticSeverity; - -let programBuilder = new ProgramBuilder(); -programBuilder.run({ - project: path.join(__dirname, '../', 'bsconfig.json') -}).then(() => { - //fail if there are diagnostics - if (programBuilder.program.getDiagnostics().filter((x) => x.severity === DiagnosticSeverity.Error).length > 0) { - throw new Error('Encountered error diagnostics'); - } else { - console.log('\nBuild is finished'); - } -}).catch(e => { - console.log('error', e.message); - process.exit(1); -}); diff --git a/scripts/update-manifest-version.js b/scripts/update-manifest-version.js deleted file mode 100644 index b492deeb..00000000 --- a/scripts/update-manifest-version.js +++ /dev/null @@ -1,21 +0,0 @@ -const path = require('path'); -const fs = require('fs'); -const semverParse = require('semver/functions/parse') - -const packageJsonContent = fs.readFileSync("./package.json", {encoding:'utf8', flag:'r'}) -const packageJson = JSON.parse(packageJsonContent) - -const version = packageJson.version -const parsedVersion = semverParse(version) - -let appManifestContent = fs.readFileSync("./src/manifest", {encoding:'utf8', flag:'r'}) - -const majorPattern = /major_version=(\d+)/ -const minorPattern = /minor_version=(\d+)/ -const buildPattern = /build_version=(\d+)/ - -appManifestContent = appManifestContent.replace(majorPattern, `major_version=${parsedVersion.major}`) -appManifestContent = appManifestContent.replace(minorPattern, `minor_version=${parsedVersion.minor}`) -appManifestContent = appManifestContent.replace(buildPattern, `build_version=${String(parsedVersion.patch).padStart(5, '0')}`) - -fs.writeFileSync("./src/manifest", appManifestContent) \ No newline at end of file diff --git a/src/components/GridScreen/GridScreen.brs b/src/components/GridScreen/GridScreen.brs deleted file mode 100644 index a1f52a27..00000000 --- a/src/components/GridScreen/GridScreen.brs +++ /dev/null @@ -1,13 +0,0 @@ -import "pkg:/source/utils/Utils.bs" - -sub Init() - m.rowList = m.top.FindNode("rowList") - m.rowList.SetFocus(true) - m.top.ObserveField("visible", "onVisibleChange") -end sub - -sub OnVisibleChange() ' invoked when GridScreen change visibility - if m.top.visible = true - m.rowList.SetFocus(true) ' set focus to rowList if GridScreen visible - end if -end sub \ No newline at end of file diff --git a/src/components/GridScreen/GridScreen.xml b/src/components/GridScreen/GridScreen.xml deleted file mode 100644 index 30b93fa9..00000000 --- a/src/components/GridScreen/GridScreen.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - -