mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2025-12-30 19:38:36 +03:00
Merge branch 'main' into autoplay
This commit is contained in:
23
.github/workflows/build_docker_images.yml
vendored
23
.github/workflows/build_docker_images.yml
vendored
@@ -25,12 +25,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Get the repository's code
|
# Get the repository's code
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Generate docker tags
|
# Generate docker tags
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/dmunozv04/isponsorblocktv, dmunozv04/isponsorblocktv
|
images: ghcr.io/dmunozv04/isponsorblocktv, dmunozv04/isponsorblocktv
|
||||||
tags: |
|
tags: |
|
||||||
@@ -42,36 +42,35 @@ jobs:
|
|||||||
|
|
||||||
# https://github.com/docker/setup-qemu-action
|
# https://github.com/docker/setup-qemu-action
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v3
|
||||||
# https://github.com/docker/setup-buildx-action
|
# https://github.com/docker/setup-buildx-action
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
# if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to GHCR
|
- name: Login to GHCR
|
||||||
# if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
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 }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=registry,ref=ghcr.io/dmunozv04/isponsorblocktv:buildcache
|
cache-from: type=registry,ref=ghcr.io/dmunozv04/isponsorblocktv:buildcache
|
||||||
# Only cache if it's not a pull request
|
# 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: ${{ 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
|
|
||||||
|
|||||||
4
.github/workflows/release_pypi.yml
vendored
4
.github/workflows/release_pypi.yml
vendored
@@ -22,9 +22,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
2
.github/workflows/update_docker_readme.yml
vendored
2
.github/workflows/update_docker_readme.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
|
|
||||||
# Update description
|
# Update description
|
||||||
- name: Update repo description
|
- name: Update repo description
|
||||||
uses: peter-evans/dockerhub-description@v3
|
uses: peter-evans/dockerhub-description@v4
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|||||||
10
Dockerfile
10
Dockerfile
@@ -16,12 +16,12 @@ COPY requirements.txt .
|
|||||||
|
|
||||||
RUN apk add --no-cache gcc musl-dev && \
|
RUN apk add --no-cache gcc musl-dev && \
|
||||||
pip install --upgrade pip wheel && \
|
pip install --upgrade pip wheel && \
|
||||||
pip install --user -r requirements.txt && \
|
pip install -r requirements.txt && \
|
||||||
pip uninstall -y pip wheel && \
|
pip uninstall -y pip wheel && \
|
||||||
apk del gcc musl-dev && \
|
apk del gcc musl-dev && \
|
||||||
python3 -m compileall -b -f /root/.local/lib/python3.11/site-packages && \
|
python3 -m compileall -b -f /usr/local/lib/python3.11/site-packages && \
|
||||||
find /root/.local/lib/python3.11/site-packages -name "*.py" -type f -delete && \
|
find /usr/local/lib/python3.11/site-packages -name "*.py" -type f -delete && \
|
||||||
find /root/.local/lib/python3.11/ -name "__pycache__" -type d -exec rm -rf {} +
|
find /usr/local/lib/python3.11/ -name "__pycache__" -type d -exec rm -rf {} +
|
||||||
|
|
||||||
FROM base
|
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 requirements.txt .
|
||||||
|
|
||||||
COPY --from=dep_installer /root/.local /root/.local
|
COPY --from=dep_installer /usr/local /usr/local
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "iSponsorBlockTV"
|
name = "iSponsorBlockTV"
|
||||||
version = "2.0.7"
|
version = "2.0.8"
|
||||||
authors = [
|
authors = [
|
||||||
{"name" = "dmunozv04"}
|
{"name" = "dmunozv04"}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -52,13 +52,13 @@ class DeviceListener:
|
|||||||
# Main subscription loop
|
# Main subscription loop
|
||||||
async def loop(self):
|
async def loop(self):
|
||||||
lounge_controller = self.lounge_controller
|
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 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:
|
while not (await self.is_available()) and not self.cancelled:
|
||||||
await asyncio.sleep(10)
|
await asyncio.sleep(10)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user