From 26f8b6b5658fce72ec72c309e80df9d26ba5bf6b Mon Sep 17 00:00:00 2001 From: Mateus Souza Date: Mon, 12 Feb 2024 22:38:07 -0300 Subject: [PATCH 1/6] Build: update compactor install process (rollup now is included) --- .github/workflows/release.yml | 3 +-- .github/workflows/test.yml | 3 +-- Dockerfile | 10 ++++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69c1ba6..fbbc4b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,9 +22,8 @@ jobs: - name: Install dependencies run: | - curl https://mateussouzaweb.github.io/compactor/install.sh | bash + curl https://mateussouzaweb.github.io/compactor/install.sh | bash - npm install - npm install --global rollup - name: Build package run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d347f1..446fe5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,9 +22,8 @@ jobs: - name: Install dependencies run: | - curl https://mateussouzaweb.github.io/compactor/install.sh | bash + curl https://mateussouzaweb.github.io/compactor/install.sh | bash - npm install - npm install --global rollup - name: Build package run: | diff --git a/Dockerfile b/Dockerfile index 200f0e0..636bf98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,13 @@ LABEL org.opencontainers.image.source https://github.com/mateussouzaweb/crunchyr LABEL maintainer="Mateus Souza " ENV DEBIAN_FRONTEND=noninteractive -# Install dependencies +# Install system packages RUN apt update && apt install -y make sed curl -RUN mkdir -p /usr/local/bin -RUN curl https://mateussouzaweb.github.io/compactor/install.sh | bash -RUN npm install -g rollup +RUN npm install -g npm + +# Install compactor +RUN mkdir -p /usr/local/bin && \ + curl https://mateussouzaweb.github.io/compactor/install.sh | bash - # Create app directory WORKDIR /app \ No newline at end of file From a958352b39ef74a8ef2b932f502f300316584710 Mon Sep 17 00:00:00 2001 From: Mateus Souza Date: Mon, 12 Feb 2024 22:38:59 -0300 Subject: [PATCH 2/6] Build: update docker build to avoid caching --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f0c872..990e684 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ git clone git@github.com:mateussouzaweb/crunchyroll-webos.git cd crunchyroll-webos/ # Build the container from Dockerfile -docker build -t crunchyroll-webos:latest . +docker build --no-cache -t crunchyroll-webos:latest . # Run the container with user environment docker run -it --rm \ From 0716dac17777acdfc127fcb18230917f5442a8bf Mon Sep 17 00:00:00 2001 From: Mateus Souza Date: Mon, 12 Feb 2024 22:39:55 -0300 Subject: [PATCH 3/6] Feat: remove extra sed replacement as this is not necessary --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 87698a4..e0e6fdb 100644 --- a/Makefile +++ b/Makefile @@ -16,9 +16,7 @@ build: --progressive false \ --hashed false \ && rollup --config $(PROOT)/rollup.config.js \ - && sed -i 's/type="module"/defer="defer"/g' $(PROOT)/dist/index.html \ - && sed -i 's/href="\//href=".\//g' $(PROOT)/dist/index.html \ - && sed -i 's/src="\//src=".\//g' $(PROOT)/dist/index.html + && sed -i 's/type="module"/defer="defer"/g' $(PROOT)/dist/index.html develop: compactor \ From f2616d45004b71b92f407360d00884d551b46191 Mon Sep 17 00:00:00 2001 From: Mateus Souza Date: Mon, 12 Feb 2024 22:40:55 -0300 Subject: [PATCH 4/6] Docs: update running on browser instructions with better commands --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 990e684..b4d444c 100644 --- a/README.md +++ b/README.md @@ -92,11 +92,14 @@ Please note that the developer mode is enabled only for a few hours, so you will You can also test this project in the browser, but it requires a few necessary steps. First, you need to start the browser without CORS. You also will need to access the project from the ``index.html`` file located on the ``dist/`` folder using the ``file://`` protocol, otherwise, Crunchyroll API response and video playback will be blocked by the security rules of the navigator: ```bash -# Step 1 - Start the browser without CORS -flatpak run com.google.Chrome --user-data-dir="/tmp/chrome_dev_test" --disable-web-security - -# Step 2 - Access the project from the dist/ folder -# Open in the browser the address in the format: -# file://{PATH_TO_DIST_FOLDER}/index.html +# Give flatpak permissions +flatpak override com.google.Chrome --filesystem=host + +# Start the browser without CORS and access the project from the dist/ folder +flatpak run com.google.Chrome \ + --user-data-dir="/tmp/chrome-dev-test" \ + --disable-web-security \ + --no-first-run \ + file://$PWD/dist/index.html ``` From 0beec57aaaa5854995725952c1f9bef347054c66 Mon Sep 17 00:00:00 2001 From: Mateus Souza Date: Mon, 12 Feb 2024 22:46:29 -0300 Subject: [PATCH 5/6] Feat: add app description --- src/appinfo.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/appinfo.json b/src/appinfo.json index 32eaec7..ba5f04f 100755 --- a/src/appinfo.json +++ b/src/appinfo.json @@ -5,6 +5,7 @@ "type": "web", "main": "index.html", "title": "Crunchyroll", + "appDescription": "Unofficial Crunchyroll app for WebOS TV", "icon": "images/80px.png", "largeIcon": "images/130px.png", "splashBackground": "images/background.png", From 7b20d3c3b7552e7538d4028b91f20acd85e8984d Mon Sep 17 00:00:00 2001 From: Mateus Souza Date: Mon, 12 Feb 2024 22:46:45 -0300 Subject: [PATCH 6/6] Version 1.10.2 --- Makefile | 2 +- src/appinfo.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e0e6fdb..db0bd22 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ export PROOT=$(shell pwd) export BINARIES=${PROOT}/node_modules/.bin -export VERSION=1.10.1 +export VERSION=1.10.2 export ID=com.crunchyroll.webos export HOMEPAGE="https://github.com/mateussouzaweb/crunchyroll-webos" export THUMBNAIL="https://raw.githubusercontent.com/mateussouzaweb/crunchyroll-webos/master/src/images/80px.png" diff --git a/src/appinfo.json b/src/appinfo.json index ba5f04f..cc882b4 100755 --- a/src/appinfo.json +++ b/src/appinfo.json @@ -1,6 +1,6 @@ { "id": "com.crunchyroll.webos", - "version": "1.10.1", + "version": "1.10.2", "vendor": "Mateus Souza", "type": "web", "main": "index.html",