Skip to content

Commit 4b609b0

Browse files
committed
Update isponsorblocktv
1 parent 3d51230 commit 4b609b0

File tree

8 files changed

+155
-31
lines changed

8 files changed

+155
-31
lines changed

isponsorblocktv/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog -->
2+
3+
## 2.2.0
4+
5+
- Add help text to config page (translation PRs highly encouraged)
6+
- Add automatic translations to config page (de, en, es, fr, ro)
7+
- Fix schema UI for skip_categories
8+
- Fix schema for channel whitelisting
9+
- Fix schema so api_key is not required
10+
- Switch from pip to uv to speed up builds
11+
- Update python 3.12 --> 3.13
12+
- Update alpine 3.19 --> 3.21
13+
- Update upstream to latest (and a patch for latest aiohttp)
14+
215
## 2.1.2
316

417
- Fix --data-dir renamed to --data upstream issue with previous release

isponsorblocktv/Dockerfile

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,28 @@
11
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile
22
ARG BUILD_FROM
33
FROM $BUILD_FROM as compiler
4-
5-
# Execute during the build of the image
64
ARG TEMPIO_VERSION BUILD_ARCH
7-
RUN \
8-
curl -sSLf -o /usr/bin/tempio \
9-
"https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}"
10-
11-
RUN apk add --no-cache git
12-
5+
RUN curl -sSLf -o /usr/bin/tempio "https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}"
6+
RUN apk add --no-cache uv git
7+
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy UV_PYTHON_DOWNLOADS=0
138
WORKDIR /app
14-
159
RUN git clone https://github.com/dmunozv04/iSponsorBlockTV /repo
16-
RUN cp -r /repo/src/* .
17-
10+
# START PATCH (remove patch once isponsorblock is updated to aiohttp 3.11.12)
11+
RUN sed -i 's/aiohttp==3.9.5/aiohttp==3.11.12/g' /repo/requirements.txt && \
12+
sed -i 's/pyytlounge==2.1.1/pyytlounge==2.1.2/g' /repo/requirements.txt
13+
RUN cd /repo && git config user.email "none" && git config user.name "none" && \
14+
git revert ae6da834e492554d40c279fadff7cfa00b70ac0e && cd ..
15+
# END PATCH
16+
RUN cp -r /repo/src/* /app/ && cp /repo/requirements.txt /app/
17+
RUN uv pip install --system -r requirements.txt
18+
# TODO: we need the below as UV_COMPILE_BYTECODE=1 is not working as expected, remove once fixed
1819
RUN python3 -m compileall -b -f . && \
1920
find . -name "*.py" -type f -delete
2021

2122
FROM $BUILD_FROM
22-
23-
ENV PIP_NO_CACHE_DIR=off iSPBTV_docker=True iSPBTV_data_dir=data TERM=xterm-256color COLORTERM=truecolor
23+
ENV iSPBTV_docker=True iSPBTV_data_dir=data TERM=xterm-256color COLORTERM=truecolor
2424
WORKDIR /app
25-
26-
COPY --from=compiler /repo/requirements.txt .
2725
COPY --from=compiler /usr/bin/tempio /usr/bin/tempio
28-
29-
RUN pip install --upgrade pip wheel && \
30-
pip install -r requirements.txt && \
31-
pip uninstall -y pip wheel && \
32-
python3 -m compileall -b -f /usr/local/lib/python3.*/site-packages && \
33-
find /usr/local/lib/python3.*/site-packages -name "*.py" -type f -delete && \
34-
find /usr/local/lib/python3.*/ -name "__pycache__" -type d -exec rm -rf {} +
35-
3626
COPY --from=compiler /app .
27+
COPY --from=compiler /usr/local/lib/python*/site-packages /usr/local/lib/python3.13/site-packages/
3728
COPY rootfs/ /

isponsorblocktv/config.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
22
name: iSponsorBlockTV add-on
3-
version: "2.1.2"
3+
version: "2.2.0"
44
slug: isponsorblocktv
55
description: SponsorBlock client for all YouTube TV clients.
66
url: "https://github.com/bertybuttface/addons/tree/main/isponsorblocktv"
@@ -12,7 +12,6 @@ init: false
1212
map:
1313
- share:rw
1414
options:
15-
apikey: null # get youtube apikey: https://developers.google.com/youtube/registering_an_application
1615
devices: []
1716
channel_whitelist: []
1817
skip_categories: []
@@ -21,16 +20,16 @@ options:
2120
skip_ads: true
2221
auto_play: true
2322
schema:
24-
apikey: password
23+
apikey: password? # get youtube apikey: https://developers.google.com/youtube/registering_an_application
2524
devices:
2625
- name: str?
2726
screen_id: str
2827
offset: int?
2928
channel_whitelist:
3029
- id: str
31-
- name: str
30+
name: str
3231
skip_categories:
33-
- list(sponsor|selfpromo|exclusive_access|interaction|poi_highlight|intro|outro|preview|filler|music_offtopic)
32+
- match(^.*(sponsor|selfpromo|exclusive_access|interaction|poi_highlight|intro|outro|preview|filler|music_offtopic).*$)
3433
skip_count_tracking: bool
3534
mute_ads: bool
3635
skip_ads: bool
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
configuration:
2+
apikey:
3+
name: YouTube API-Schlüssel (optional)
4+
description: "Holen Sie sich Ihren API-Schlüssel unter: https://developers.google.com/youtube/registering_an_application"
5+
devices:
6+
name: Geräte
7+
description: "Liste der zu überwachenden Geräte. YAML-Format erforderlich: - screen_id: ABC123 (erforderlich), name: Wohnzimmer TV (optional), offset: 0 (optional, in Millisekunden)"
8+
channel_whitelist:
9+
name: Kanal-Whitelist
10+
description: "Liste der YouTube-Kanäle, die vom Überspringen ausgenommen werden sollen. YAML-Format erforderlich: - id: UC1234567890 (erforderlich), name: Kanalname (erforderlich)"
11+
skip_categories:
12+
name: Zu überspringende Kategorien hinzufügen
13+
description: "Fügen Sie eine oder mehrere Kategorien hinzu: sponsor, selfpromo, exclusive_access, interaction, poi_highlight, intro, outro, preview, filler, music_offtopic"
14+
skip_count_tracking:
15+
name: Übersprungene Segmente zählen
16+
description: "Aktivieren oder deaktivieren der Erfassung und Meldung übersprungener Segmente an den iSponsorBlock-Server"
17+
mute_ads:
18+
name: Werbung stummschalten
19+
description: "Werbung stummschalten anstatt zu überspringen"
20+
skip_ads:
21+
name: Werbung überspringen
22+
description: "Werbung automatisch überspringen wenn möglich"
23+
auto_play:
24+
name: Automatische Wiedergabe
25+
description: "Automatische Wiedergabe des nächsten Videos aktivieren oder deaktivieren"
Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
configuration:
2-
message:
3-
name: Message
4-
description: The message that will be printed to the log when starting this example add-on.
2+
apikey:
3+
name: YouTube API Key (optional)
4+
description: "Get your API key at: https://developers.google.com/youtube/registering_an_application"
5+
devices:
6+
name: Devices
7+
description: "List of devices to monitor. YAML format required: - screen_id: ABC123 (required), name: Living Room TV (optional), offset: 0 (optional, in milliseconds)"
8+
channel_whitelist:
9+
name: Channel Whitelist
10+
description: "List of YouTube channels to exclude from skipping. YAML format required: - id: UC1234567890 (required), name: Channel Name (required)"
11+
skip_categories:
12+
name: Add categories to skip
13+
description: "Add one or more of: sponsor, selfpromo, exclusive_access, interaction, poi_highlight, intro, outro, preview, filler, music_offtopic"
14+
skip_count_tracking:
15+
name: Skip Count Tracking
16+
description: "Enable or disable tracking and reporting of skipped segments to isponsorblock server"
17+
mute_ads:
18+
name: Mute Ads
19+
description: "Mute ads instead of skipping them"
20+
skip_ads:
21+
name: Skip Ads
22+
description: "Automatically skip ads when possible"
23+
auto_play:
24+
name: Auto Play
25+
description: "Enable or disable automatic playback of next video"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
configuration:
2+
apikey:
3+
name: Clave API de YouTube (opcional)
4+
description: "Obtenga su clave API en: https://developers.google.com/youtube/registering_an_application"
5+
devices:
6+
name: Dispositivos
7+
description: "Lista de dispositivos para monitorear. Formato YAML requerido: - screen_id: ABC123 (obligatorio), name: TV Sala (opcional), offset: 0 (opcional, en milisegundos)"
8+
channel_whitelist:
9+
name: Lista blanca de canales
10+
description: "Lista de canales de YouTube excluidos del salto automático. Formato YAML requerido: - id: UC1234567890 (obligatorio), name: Nombre del Canal (obligatorio)"
11+
skip_categories:
12+
name: Agregar categorías para saltar
13+
description: "Agregue una o más categorías: sponsor, selfpromo, exclusive_access, interaction, poi_highlight, intro, outro, preview, filler, music_offtopic"
14+
skip_count_tracking:
15+
name: Seguimiento de segmentos saltados
16+
description: "Activar o desactivar el seguimiento y reporte de segmentos saltados al servidor iSponsorBlock"
17+
mute_ads:
18+
name: Silenciar anuncios
19+
description: "Silenciar anuncios en lugar de saltarlos"
20+
skip_ads:
21+
name: Saltar anuncios
22+
description: "Saltar automáticamente los anuncios cuando sea posible"
23+
auto_play:
24+
name: Reproducción automática
25+
description: "Activar o desactivar la reproducción automática del siguiente video"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
configuration:
2+
apikey:
3+
name: Clé API YouTube (facultatif)
4+
description: "Obtenez votre clé API sur : https://developers.google.com/youtube/registering_an_application"
5+
devices:
6+
name: Appareils
7+
description: "Liste des appareils à surveiller. Format YAML requis: - screen_id: ABC123 (obligatoire), name: TV Salon (facultatif), offset: 0 (facultatif, en millisecondes)"
8+
channel_whitelist:
9+
name: Liste blanche des chaînes
10+
description: "Liste des chaînes YouTube à exclure du saut automatique. Format YAML requis: - id: UC1234567890 (obligatoire), name: Nom de la Chaîne (obligatoire)"
11+
skip_categories:
12+
name: Ajouter des catégories à sauter
13+
description: "Ajoutez une ou plusieurs catégories : sponsor, selfpromo, exclusive_access, interaction, poi_highlight, intro, outro, preview, filler, music_offtopic"
14+
skip_count_tracking:
15+
name: Suivi du nombre de sauts
16+
description: "Activer ou désactiver le suivi et le rapport des segments sautés au serveur isponsorblock"
17+
mute_ads:
18+
name: Couper le son des publicités
19+
description: "Couper le son des publicités au lieu de les sauter"
20+
skip_ads:
21+
name: Sauter les publicités
22+
description: "Sauter automatiquement les publicités lorsque possible"
23+
auto_play:
24+
name: Lecture automatique
25+
description: "Activer ou désactiver la lecture automatique de la vidéo suivante"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
configuration:
2+
apikey:
3+
name: Cheie API YouTube (opțional)
4+
description: "Obțineți cheia API de la: https://developers.google.com/youtube/registering_an_application"
5+
devices:
6+
name: Dispozitive
7+
description: "Lista dispozitivelor de monitorizat. Format YAML necesar: - screen_id: ABC123 (obligatoriu), name: TV Camera de zi (opțional), offset: 0 (opțional, în milisecunde)"
8+
channel_whitelist:
9+
name: Lista albă de canale
10+
description: "Lista canalelor YouTube excluse de la omitere. Format YAML necesar: - id: UC1234567890 (obligatoriu), name: Numele Canalului (obligatoriu)"
11+
skip_categories:
12+
name: Adăugați categorii de omis
13+
description: "Adăugați una sau mai multe categorii: sponsor, selfpromo, exclusive_access, interaction, poi_highlight, intro, outro, preview, filler, music_offtopic"
14+
skip_count_tracking:
15+
name: Urmărirea segmentelor omise
16+
description: "Activați sau dezactivați urmărirea și raportarea segmentelor omise către serverul iSponsorBlock"
17+
mute_ads:
18+
name: Dezactivare sunet reclame
19+
description: "Dezactivați sunetul reclamelor în loc să le omiteți"
20+
skip_ads:
21+
name: Omitere reclame
22+
description: "Omiteți automat reclamele când este posibil"
23+
auto_play:
24+
name: Redare automată
25+
description: "Activați sau dezactivați redarea automată a următorului videoclip"

0 commit comments

Comments
 (0)