From 5214190fd0cc8603759546a30e7d692d119e4c79 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Thu, 30 May 2024 12:35:59 +0200 Subject: [PATCH 1/5] revert last commit --- .github/workflows/build_docker_images.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_docker_images.yml b/.github/workflows/build_docker_images.yml index 62ffa26..ba8d1fc 100644 --- a/.github/workflows/build_docker_images.yml +++ b/.github/workflows/build_docker_images.yml @@ -49,14 +49,14 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - # if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GHCR - # if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: registry: ghcr.io @@ -68,10 +68,9 @@ jobs: with: context: . platforms: linux/amd64, linux/arm64, linux/arm/v7 - # push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=registry,ref=ghcr.io/dmunozv04/isponsorblocktv:buildcache # Only cache if it's not a pull request - # cache-to: ${{ github.event_name != 'pull_request' && 'type=registry,ref=ghcr.io/dmunozv04/isponsorblocktv:buildcache,mode=max' || '' }} - cache-to: type=registry,ref=ghcr.io/dmunozv04/isponsorblocktv:buildcache,mode=max \ No newline at end of file + cache-to: ${{ github.event_name != 'pull_request' && 'type=registry,ref=ghcr.io/dmunozv04/isponsorblocktv:buildcache,mode=max' || '' }} From e92ba897c4b50b910cb9da892e2d3ad9ddb58600 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Fri, 31 May 2024 15:26:58 +0200 Subject: [PATCH 2/5] Refresh auth after every disconnect, ensuring there's a fresh token. Fixes Shorts aren't handled anymore #162 and maybe changes something related to Disable Autoplay #82 --- src/iSponsorBlockTV/main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/iSponsorBlockTV/main.py b/src/iSponsorBlockTV/main.py index b624d00..bb8f1a2 100644 --- a/src/iSponsorBlockTV/main.py +++ b/src/iSponsorBlockTV/main.py @@ -52,13 +52,13 @@ class DeviceListener: # Main subscription loop async def loop(self): lounge_controller = self.lounge_controller - while not lounge_controller.linked(): - try: - self.logger.debug("Refreshing auth") - await lounge_controller.refresh_auth() - except: - await asyncio.sleep(10) while not self.cancelled: + while not lounge_controller.linked(): + try: + self.logger.debug("Refreshing auth") + await lounge_controller.refresh_auth() + except: + await asyncio.sleep(10) while not (await self.is_available()) and not self.cancelled: await asyncio.sleep(10) try: From 6e09db9994652e2a677f1ed4c55eebe59034e490 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Fri, 31 May 2024 15:35:16 +0200 Subject: [PATCH 3/5] bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c497a20..cd9e702 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iSponsorBlockTV" -version = "2.0.7" +version = "2.0.8" authors = [ {"name" = "dmunozv04"} ] From 94ba642af1abefa8c7a172cbc891d1cda9bad53f Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:27:42 +0200 Subject: [PATCH 4/5] update actions versions to latest --- .github/workflows/build_docker_images.yml | 14 +++++++------- .github/workflows/release_pypi.yml | 4 ++-- .github/workflows/update_docker_readme.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_docker_images.yml b/.github/workflows/build_docker_images.yml index ba8d1fc..8bbb573 100644 --- a/.github/workflows/build_docker_images.yml +++ b/.github/workflows/build_docker_images.yml @@ -25,12 +25,12 @@ jobs: steps: # Get the repository's code - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Generate docker tags - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ghcr.io/dmunozv04/isponsorblocktv, dmunozv04/isponsorblocktv tags: | @@ -42,29 +42,29 @@ jobs: # https://github.com/docker/setup-qemu-action - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 # https://github.com/docker/setup-buildx-action - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GHCR if: github.event_name != 'pull_request' - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64, linux/arm64, linux/arm/v7 diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml index 43c9298..180d5b9 100644 --- a/.github/workflows/release_pypi.yml +++ b/.github/workflows/release_pypi.yml @@ -22,9 +22,9 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install dependencies diff --git a/.github/workflows/update_docker_readme.yml b/.github/workflows/update_docker_readme.yml index ccf6c37..12a3e62 100644 --- a/.github/workflows/update_docker_readme.yml +++ b/.github/workflows/update_docker_readme.yml @@ -22,7 +22,7 @@ jobs: # Update description - name: Update repo description - uses: peter-evans/dockerhub-description@v3 + uses: peter-evans/dockerhub-description@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} From dc72db06094a217deff392c92a5ce17f3e0ae092 Mon Sep 17 00:00:00 2001 From: Raymond Ha Date: Wed, 5 Jun 2024 16:05:07 -0700 Subject: [PATCH 5/5] Fix deps permissions in docker build --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5947838..e2067f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,12 +16,12 @@ COPY requirements.txt . RUN apk add --no-cache gcc musl-dev && \ pip install --upgrade pip wheel && \ - pip install --user -r requirements.txt && \ + pip install -r requirements.txt && \ pip uninstall -y pip wheel && \ apk del gcc musl-dev && \ - python3 -m compileall -b -f /root/.local/lib/python3.11/site-packages && \ - find /root/.local/lib/python3.11/site-packages -name "*.py" -type f -delete && \ - find /root/.local/lib/python3.11/ -name "__pycache__" -type d -exec rm -rf {} + + python3 -m compileall -b -f /usr/local/lib/python3.11/site-packages && \ + find /usr/local/lib/python3.11/site-packages -name "*.py" -type f -delete && \ + find /usr/local/lib/python3.11/ -name "__pycache__" -type d -exec rm -rf {} + FROM base @@ -29,7 +29,7 @@ ENV PIP_NO_CACHE_DIR=off iSPBTV_docker=True iSPBTV_data_dir=data TERM=xterm-256c COPY requirements.txt . -COPY --from=dep_installer /root/.local /root/.local +COPY --from=dep_installer /usr/local /usr/local WORKDIR /app