From 5a5ebcfeb760743bcb79f685b388c749557d82ae Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:38:22 +0100 Subject: [PATCH 1/7] move directories and data path --- .github/workflows/main.yml | 75 ------------------- Dockerfile | 4 +- main-macos.py | 7 -- main-macos.spec | 47 ------------ requirements.txt | 2 +- .../iSponsorBlockTV}/__init__.py | 0 src/iSponsorBlockTV/__main__.py | 8 ++ .../iSponsorBlockTV}/api_helpers.py | 0 .../iSponsorBlockTV}/conditional_ttl_cache.py | 0 .../iSponsorBlockTV}/config_setup.py | 0 .../iSponsorBlockTV}/constants.py | 0 .../iSponsorBlockTV}/dial_client.py | 0 .../iSponsorBlockTV}/helpers.py | 6 +- .../iSponsorBlockTV}/macos_install.py | 0 .../iSponsorBlockTV}/main.py | 0 .../iSponsorBlockTV}/setup-wizard-style.tcss | 0 .../iSponsorBlockTV}/setup_wizard.py | 0 .../iSponsorBlockTV}/ytlounge.py | 0 main.py => src/main.py | 0 main_tui.py => src/main_tui.py | 0 20 files changed, 17 insertions(+), 132 deletions(-) delete mode 100644 .github/workflows/main.yml delete mode 100644 main-macos.py delete mode 100644 main-macos.spec rename {iSponsorBlockTV => src/iSponsorBlockTV}/__init__.py (100%) create mode 100644 src/iSponsorBlockTV/__main__.py rename {iSponsorBlockTV => src/iSponsorBlockTV}/api_helpers.py (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/conditional_ttl_cache.py (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/config_setup.py (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/constants.py (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/dial_client.py (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/helpers.py (93%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/macos_install.py (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/main.py (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/setup-wizard-style.tcss (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/setup_wizard.py (100%) rename {iSponsorBlockTV => src/iSponsorBlockTV}/ytlounge.py (100%) rename main.py => src/main.py (100%) rename main_tui.py => src/main_tui.py (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 26af9c7..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: build docker images - -# Controls when the workflow will run -on: - push: - branches: - - '*' - tags: - - 'v*' - pull_request: - branches: - - '*' - release: - types: [published] - - workflow_dispatch: - -permissions: - contents: read - packages: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - # Get the repository's code - - name: Checkout - uses: actions/checkout@v3 - - # Generate docker tags - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: ghcr.io/dmunozv04/isponsorblocktv, dmunozv04/isponsorblocktv - tags: | - type=raw,value=develop,priority=900,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} - type=ref,enable=true,priority=600,prefix=pr-,suffix=,event=pr - type=ref,event=tag - type=ref,event=branch - type=schedule - - # https://github.com/docker/setup-qemu-action - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - # https://github.com/docker/setup-buildx-action - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - 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' - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - platforms: linux/amd64, linux/arm64 - 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 - cache-to: type=registry,ref=ghcr.io/dmunozv04/isponsorblocktv:buildcache,mode=max diff --git a/Dockerfile b/Dockerfile index 653475f..a349cdf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM python:alpine3.11 -ENV PIP_NO_CACHE_DIR=off iSPBTV_docker=True TERM=xterm-256color COLORTERM=truecolor +ENV PIP_NO_CACHE_DIR=off iSPBTV_docker=True iSPBTV_data_dir=data TERM=xterm-256color COLORTERM=truecolor COPY requirements.txt . @@ -13,6 +13,8 @@ COPY requirements.txt . WORKDIR /app +RUN python -m compileall . + COPY . . ENTRYPOINT ["python3", "-u", "main.py"] \ No newline at end of file diff --git a/main-macos.py b/main-macos.py deleted file mode 100644 index ac7e117..0000000 --- a/main-macos.py +++ /dev/null @@ -1,7 +0,0 @@ -from iSponsorBlockTV import helpers -import sys -import os - -if getattr(sys, "frozen", False): - os.environ["SSL_CERT_FILE"] = os.path.join(sys._MEIPASS, "lib", "cert.pem") -helpers.app_start() diff --git a/main-macos.spec b/main-macos.spec deleted file mode 100644 index f0ee8d9..0000000 --- a/main-macos.spec +++ /dev/null @@ -1,47 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - -from PyInstaller.utils.hooks import exec_statement -cert_datas = exec_statement(""" - import ssl - print(ssl.get_default_verify_paths().cafile)""").strip().split() -cert_datas = [(f, 'lib') for f in cert_datas] - -block_cipher = None - -options = [ ('u', None, 'OPTION') ] - -a = Analysis(['main-macos.py'], - pathex=[], - binaries=[], - datas=cert_datas, - hiddenimports=['certifi'], - hookspath=[], - hooksconfig={}, - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher, - noarchive=False) -pyz = PYZ(a.pure, a.zipped_data, - cipher=block_cipher) - -exe = EXE(pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - [], - options, - name='iSponsorBlockTV-macos', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=True, - disable_windowed_traceback=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index ed6a004..03acb85 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +appdirs==1.4.4 aiohttp==3.8.6 argparse==1.4.0 async-cache==1.1.1 @@ -7,4 +8,3 @@ ssdp==1.3.0 textual==0.40.0 textual-slider==0.1.1 xmltodict==0.13.0 - diff --git a/iSponsorBlockTV/__init__.py b/src/iSponsorBlockTV/__init__.py similarity index 100% rename from iSponsorBlockTV/__init__.py rename to src/iSponsorBlockTV/__init__.py diff --git a/src/iSponsorBlockTV/__main__.py b/src/iSponsorBlockTV/__main__.py new file mode 100644 index 0000000..7a3a6f4 --- /dev/null +++ b/src/iSponsorBlockTV/__main__.py @@ -0,0 +1,8 @@ +from . import helpers + +def main(): + helpers.app_start() + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/iSponsorBlockTV/api_helpers.py b/src/iSponsorBlockTV/api_helpers.py similarity index 100% rename from iSponsorBlockTV/api_helpers.py rename to src/iSponsorBlockTV/api_helpers.py diff --git a/iSponsorBlockTV/conditional_ttl_cache.py b/src/iSponsorBlockTV/conditional_ttl_cache.py similarity index 100% rename from iSponsorBlockTV/conditional_ttl_cache.py rename to src/iSponsorBlockTV/conditional_ttl_cache.py diff --git a/iSponsorBlockTV/config_setup.py b/src/iSponsorBlockTV/config_setup.py similarity index 100% rename from iSponsorBlockTV/config_setup.py rename to src/iSponsorBlockTV/config_setup.py diff --git a/iSponsorBlockTV/constants.py b/src/iSponsorBlockTV/constants.py similarity index 100% rename from iSponsorBlockTV/constants.py rename to src/iSponsorBlockTV/constants.py diff --git a/iSponsorBlockTV/dial_client.py b/src/iSponsorBlockTV/dial_client.py similarity index 100% rename from iSponsorBlockTV/dial_client.py rename to src/iSponsorBlockTV/dial_client.py diff --git a/iSponsorBlockTV/helpers.py b/src/iSponsorBlockTV/helpers.py similarity index 93% rename from iSponsorBlockTV/helpers.py rename to src/iSponsorBlockTV/helpers.py index 481e45d..713acaa 100644 --- a/iSponsorBlockTV/helpers.py +++ b/src/iSponsorBlockTV/helpers.py @@ -5,6 +5,8 @@ import os import sys import time +from appdirs import user_data_dir + from . import config_setup, main, setup_wizard @@ -102,8 +104,10 @@ class Config: def app_start(): + #If env has a data dir use that, otherwise use the default + default_data_dir = os.getenv("iSPBTV_data_dir") or user_data_dir("iSponsorBlockTV", "dmunozv04") parser = argparse.ArgumentParser(description="iSponsorblockTV") - parser.add_argument("--data-dir", "-d", default="data", help="data directory") + parser.add_argument("--data-dir", "-d", default=default_data_dir, help="data directory") parser.add_argument("--setup", "-s", action="store_true", help="setup the program graphically") parser.add_argument("--setup-cli", "-sc", action="store_true", help="setup the program in the command line") parser.add_argument("--debug", action="store_true", help="debug mode") diff --git a/iSponsorBlockTV/macos_install.py b/src/iSponsorBlockTV/macos_install.py similarity index 100% rename from iSponsorBlockTV/macos_install.py rename to src/iSponsorBlockTV/macos_install.py diff --git a/iSponsorBlockTV/main.py b/src/iSponsorBlockTV/main.py similarity index 100% rename from iSponsorBlockTV/main.py rename to src/iSponsorBlockTV/main.py diff --git a/iSponsorBlockTV/setup-wizard-style.tcss b/src/iSponsorBlockTV/setup-wizard-style.tcss similarity index 100% rename from iSponsorBlockTV/setup-wizard-style.tcss rename to src/iSponsorBlockTV/setup-wizard-style.tcss diff --git a/iSponsorBlockTV/setup_wizard.py b/src/iSponsorBlockTV/setup_wizard.py similarity index 100% rename from iSponsorBlockTV/setup_wizard.py rename to src/iSponsorBlockTV/setup_wizard.py diff --git a/iSponsorBlockTV/ytlounge.py b/src/iSponsorBlockTV/ytlounge.py similarity index 100% rename from iSponsorBlockTV/ytlounge.py rename to src/iSponsorBlockTV/ytlounge.py diff --git a/main.py b/src/main.py similarity index 100% rename from main.py rename to src/main.py diff --git a/main_tui.py b/src/main_tui.py similarity index 100% rename from main_tui.py rename to src/main_tui.py From b88d2b61be9219a4eddb75d3385f163f49f77525 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:40:04 +0100 Subject: [PATCH 2/7] prepare for pypi packaging --- .github/workflows/build_docker_images.yml | 75 +++++++++++++++++++++++ .github/workflows/release_pypi.yml | 36 +++++++++++ pyproject.toml | 30 +++++++++ 3 files changed, 141 insertions(+) create mode 100644 .github/workflows/build_docker_images.yml create mode 100644 .github/workflows/release_pypi.yml create mode 100644 pyproject.toml diff --git a/.github/workflows/build_docker_images.yml b/.github/workflows/build_docker_images.yml new file mode 100644 index 0000000..26af9c7 --- /dev/null +++ b/.github/workflows/build_docker_images.yml @@ -0,0 +1,75 @@ +name: build docker images + +# Controls when the workflow will run +on: + push: + branches: + - '*' + tags: + - 'v*' + pull_request: + branches: + - '*' + release: + types: [published] + + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + # Get the repository's code + - name: Checkout + uses: actions/checkout@v3 + + # Generate docker tags + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/dmunozv04/isponsorblocktv, dmunozv04/isponsorblocktv + tags: | + type=raw,value=develop,priority=900,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} + type=ref,enable=true,priority=600,prefix=pr-,suffix=,event=pr + type=ref,event=tag + type=ref,event=branch + type=schedule + + # https://github.com/docker/setup-qemu-action + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + # https://github.com/docker/setup-buildx-action + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + 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' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64, linux/arm64 + 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 + cache-to: type=registry,ref=ghcr.io/dmunozv04/isponsorblocktv:buildcache,mode=max diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml new file mode 100644 index 0000000..b2bea71 --- /dev/null +++ b/.github/workflows/release_pypi.yml @@ -0,0 +1,36 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build wheel + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d40904d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[project] +name = "iSponsorBlockTV" +version = "2.0.3" +authors = [ + {"name" = "dmunozv04"} +] +description = "SponsorBlock client for all YouTube TV clients" +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Operating System :: OS Independent", + "Topic :: Home Automation" +] +dynamic = ["dependencies"] + +[tool.hatch.metadata.hooks.requirements_txt] +files = ["requirements.txt"] + +[project.urls] +"Homepage" = "https://github.com/dmunozv04/iSponsorBlockTV" +"Bug Tracker" = "https://github.com/dmunozv04/iSponsorBlockTV/issues" + +[project.scripts] +"iSponsorBlockTV" = "iSponsorBlockTV.__main__:main" + +[build-system] +requires = ["hatchling", "hatch-requirements-txt"] +build-backend = "hatchling.build" \ No newline at end of file From 93e3fd5720d6dc82968243ef8634fa29b5a03168 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:43:33 +0100 Subject: [PATCH 3/7] fix dockerfile copy --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a349cdf..3c81f71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,11 @@ COPY requirements.txt . RUN pip install --upgrade pip wheel && \ pip install -r requirements.txt -COPY requirements.txt . WORKDIR /app RUN python -m compileall . -COPY . . +COPY src . ENTRYPOINT ["python3", "-u", "main.py"] \ No newline at end of file From b90a5e317c66f811a2f84420453009f69b0d42de Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:50:50 +0100 Subject: [PATCH 4/7] remove . --- .github/workflows/release_pypi.yml | 3 ++- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml index b2bea71..0657473 100644 --- a/.github/workflows/release_pypi.yml +++ b/.github/workflows/release_pypi.yml @@ -21,7 +21,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v3 with: diff --git a/Dockerfile b/Dockerfile index 3c81f71..7eb7b47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN pip install --upgrade pip wheel && \ WORKDIR /app -RUN python -m compileall . +RUN python -m compileall COPY src . From 20c6870e4c825327f1802c8bf4fda83eb4cebd7c Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:53:04 +0100 Subject: [PATCH 5/7] fix branch --- .github/workflows/release_pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml index 0657473..467ee79 100644 --- a/.github/workflows/release_pypi.yml +++ b/.github/workflows/release_pypi.yml @@ -34,4 +34,4 @@ jobs: - name: Build package run: python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish \ No newline at end of file + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file From 7b6f9bd8a0e285762f74d9343dbf5f847109508f Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Wed, 29 Nov 2023 11:33:29 +0100 Subject: [PATCH 6/7] Sync with main Co-authored-by: tsia Co-authored-by: kot0dama <89980752+kot0dama@users.noreply.github.com> Co-authored-by: boltgolt --- requirements.txt | 5 ++--- src/iSponsorBlockTV/main.py | 19 +++++++++++-------- src/iSponsorBlockTV/setup_wizard.py | 6 +++--- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/requirements.txt b/requirements.txt index 03acb85..68cc155 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ -appdirs==1.4.4 -aiohttp==3.8.6 +aiohttp==3.9.0 argparse==1.4.0 async-cache==1.1.1 pyytlounge==1.6.3 @@ -7,4 +6,4 @@ rich==13.6.0 ssdp==1.3.0 textual==0.40.0 textual-slider==0.1.1 -xmltodict==0.13.0 +xmltodict==0.13.0 \ No newline at end of file diff --git a/src/iSponsorBlockTV/main.py b/src/iSponsorBlockTV/main.py index a059c26..bda1bd3 100644 --- a/src/iSponsorBlockTV/main.py +++ b/src/iSponsorBlockTV/main.py @@ -6,11 +6,13 @@ from . import api_helpers, ytlounge class DeviceListener: - def __init__(self, api_helper, config, screen_id, offset): + def __init__(self, api_helper, config, device): self.task: asyncio.Task = None self.api_helper = api_helper - self.lounge_controller = ytlounge.YtLoungeApi(screen_id, config, api_helper) - self.offset = offset + self.lounge_controller = ytlounge.YtLoungeApi( + device.screen_id, config, api_helper) + self.offset = device.offset + self.name = device.name self.cancelled = False # Ensures that we have a valid auth token @@ -53,6 +55,7 @@ class DeviceListener: await lounge_controller.connect() except: pass + print(f"Connected to device {lounge_controller.screen_name} ({self.name})") try: # print("Subscribing to lounge") sub = await lounge_controller.subscribe_monitored(self) @@ -103,10 +106,10 @@ class DeviceListener: # Skips to the next segment (waits for the time to pass) async def skip(self, time_to, position, UUID): await asyncio.sleep(time_to) - asyncio.create_task(self.lounge_controller.seek_to(position)) - asyncio.create_task( + await asyncio.gather( + self.lounge_controller.seek_to(position), self.api_helper.mark_viewed_segments(UUID) - ) # Don't wait for this to finish + ) # Stops the connection to the device async def cancel(self): @@ -133,7 +136,7 @@ def main(config, debug): web_session = aiohttp.ClientSession(loop=loop, connector=tcp_connector) api_helper = api_helpers.ApiHelper(config, web_session) for i in config.devices: - device = DeviceListener(api_helper, config, i.screen_id, i.offset) + device = DeviceListener(api_helper, config, i) devices.append(device) tasks.append(loop.create_task(device.loop())) tasks.append(loop.create_task(device.refresh_auth_loop())) @@ -143,4 +146,4 @@ def main(config, debug): print("Keyboard interrupt detected, cancelling tasks and exiting...") loop.run_until_complete(finish(devices)) finally: - loop.run_until_complete(web_session.close()) + loop.run_until_complete(web_session.close()) \ No newline at end of file diff --git a/src/iSponsorBlockTV/setup_wizard.py b/src/iSponsorBlockTV/setup_wizard.py index 69b0de7..da1f7de 100644 --- a/src/iSponsorBlockTV/setup_wizard.py +++ b/src/iSponsorBlockTV/setup_wizard.py @@ -481,7 +481,7 @@ class ApiKeyManager(Vertical): def compose(self) -> ComposeResult: yield Label("YouTube Api Key", classes="title") yield Label( - "You can get a YouTube Api Key from the [link=https://console.developers.google.com/apis/credentials]Google Cloud Console[/link]") + "You can get a YouTube Data API v3 Key from the [link=https://console.developers.google.com/apis/credentials]Google Cloud Console[/link]. This key is only required if you're whitelisting channels.") with Grid(id="api-key-grid"): yield Input(placeholder="YouTube Api Key", id="api-key-input", password=True, value=self.config.apikey) yield Button("Show key", id="api-key-view") @@ -559,9 +559,9 @@ class AdSkipMuteManager(Vertical): "This feature allows you to automatically mute and/or skip native YouTube ads. Skipping ads only works if that ad shows the 'Skip Ad' button, if it doesn't then it will only be able to be muted.", classes="subtitle", id="skip-count-tracking-subtitle") with Horizontal(id="ad-skip-mute-container"): - yield Checkbox(value=self.config.mute_ads, id="mute-ads-switch", - label="Enable skipping ads") yield Checkbox(value=self.config.skip_ads, id="skip-ads-switch", + label="Enable skipping ads") + yield Checkbox(value=self.config.mute_ads, id="mute-ads-switch", label="Enable muting ads") @on(Checkbox.Changed, "#mute-ads-switch") From 7a0a264caa15ce3637d7163864fa6141adc79048 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:02:26 +0100 Subject: [PATCH 7/7] Fix requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 68cc155..39ba4fc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ aiohttp==3.9.0 +appdirs==1.4.4 argparse==1.4.0 async-cache==1.1.1 pyytlounge==1.6.3