-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from dmunozv04/v2-test
V2
- Loading branch information
Showing
19 changed files
with
1,958 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,7 +154,9 @@ cython_debug/ | |
#.idea/ | ||
|
||
#config folder | ||
config/ | ||
config.json | ||
data/ | ||
data/config.json | ||
|
||
.DS_Store | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,18 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM python:alpine | ||
FROM python:alpine3.11 | ||
|
||
RUN python -m venv /opt/venv | ||
|
||
ENV PATH="/opt/venv/bin:$PATH" PIP_NO_CACHE_DIR=off iSPBTV_docker=True | ||
ENV PIP_NO_CACHE_DIR=off iSPBTV_docker=True TERM=xterm-256color COLORTERM=truecolor | ||
|
||
COPY requirements.txt . | ||
|
||
RUN apk add gcc musl-dev build-base linux-headers libffi-dev rust cargo openssl-dev git avahi && \ | ||
pip install --upgrade pip setuptools-rust wheel && \ | ||
pip install -r requirements.txt && \ | ||
apk del gcc musl-dev build-base linux-headers libffi-dev rust cargo openssl-dev git && \ | ||
rm -rf /root/.cache /root/.cargo | ||
|
||
RUN pip install --upgrade pip wheel && \ | ||
pip install -r requirements.txt | ||
|
||
COPY requirements.txt . | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
ENTRYPOINT ["/opt/venv/bin/python3", "-u", "main.py"] | ||
ENTRYPOINT ["python3", "-u", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,58 @@ | ||
# iSponsorBlockTV | ||
Skip sponsor segments in YouTube videos playing on a YouTube TV device (see below for compatibility details). | ||
|
||
Skip sponsor segments in YouTube videos playing on an Apple TV. Sponsor Block in YouTube for apple TV | ||
This project is written in asynchronous python and should be pretty quick. | ||
|
||
This project is written in asycronous python and should be pretty quick. | ||
|
||
# Installation | ||
## Installation | ||
Check the [wiki](https://github.com/dmunozv04/iSponsorBlockTV/wiki/Installation) | ||
|
||
Warning: armv7 builds have been deprecated. | ||
Warning: docker armv7 builds have been deprecated. Amd64 and arm64 builds are still available. | ||
|
||
# Usage | ||
## Compatibility | ||
Leyend: ✅ = Working, ❌ = Not working, ❔ = Not tested | ||
|
||
Run iSponsorBLockTV on the same network as the Apple TV. | ||
Open an issue/pull request if you have tested a device that isn't listed here. | ||
|
||
It connects to the Apple TV, watches its activity and skips any sponsor segment using the [SponsorBlock](https://sponsor.ajay.app/) API. | ||
| Device | Status | | ||
|:-------------------|:------:| | ||
| Apple TV | ✅ | | ||
| Samsung TV (Tizen) | ✅ | | ||
| LG TV (WebOS) | ✅ | | ||
| Android TV | ❔ | | ||
| Chromecast | ❔ | | ||
| Roku | ❔ | | ||
| Fire TV | ❔ | | ||
| Nintendo Switch | ✅ | | ||
| Xbox One/Series | ❔ | | ||
| Playstation 4/5 | ❔ | | ||
|
||
The last 5 videos' segments are cached to limit the number on queries on SponsorBlock and YouTube. | ||
## Usage | ||
Run iSponsorBlockTV on a computer that has network access. | ||
Auto discovery will require the computer to be on the same network as the device during setup. | ||
|
||
It connects to the device, watches its activity and skips any sponsor segment using the [SponsorBlock](https://sponsor.ajay.app/) API. | ||
It can also skip/mute YouTube ads. | ||
|
||
# Libraries used | ||
- [pyatv](https://github.com/postlund/pyatv) Used to connect to the Apple TV | ||
## Libraries used | ||
- [pyytlounge](https://github.com/FabioGNR/pyytlounge) Used to interact with the device | ||
- asyncio and [aiohttp](https://github.com/aio-libs/aiohttp) | ||
- [async-cache](https://github.com/iamsinghrajat/async-cache) | ||
- [Textual](https://github.com/textualize/textual/) Used for the amazing new graphical configurator | ||
- [ssdp](https://github.com/codingjoe/ssdp) Used for auto discovery | ||
|
||
# Projects using this proect | ||
## Projects using this project | ||
- [Home Assistant Addon](https://github.com/bertybuttface/addons/tree/main/isponsorblocktv) | ||
|
||
# Contributing | ||
|
||
## Contributing | ||
1. Fork it (<https://github.com/dmunozv04/iSponsorBlockTV/fork>) | ||
2. Create your feature branch (`git checkout -b my-new-feature`) | ||
3. Commit your changes (`git commit -am 'Add some feature'`) | ||
4. Push to the branch (`git push origin my-new-feature`) | ||
5. Create a new Pull Request | ||
|
||
## Contributors | ||
|
||
- [dmunozv04](https://github.com/dmunozv04) - creator and maintainer | ||
- [HaltCatchFire](https://github.com/HaltCatchFire) - updated dependencies and improved skip logic | ||
- [Oxixes](https://github.com/oxixes) - added support for channel whitelist and minor improvements | ||
# License | ||
## License | ||
[![GNU GPLv3](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
{ | ||
"atvs": [ | ||
{"identifier": "", "airplay_credentials": ""} | ||
"devices": [ | ||
{ | ||
"screen_id": "", | ||
"name": "YouTube on TV", | ||
"offset": 0 | ||
} | ||
], | ||
"apikey":"", | ||
"skip_categories": ["sponsor"], | ||
"channel_whitelist": [] | ||
"skip_categories": [ | ||
"sponsor" | ||
], | ||
"skip_count_tracking": true, | ||
"mute_ads": true, | ||
"skip_ads": true, | ||
"apikey": "", | ||
"channel_whitelist": [ | ||
{"id": "", | ||
"name": "" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: '3.3' | ||
services: | ||
iSponsorBlockTV: | ||
image: ghcr.io/dmunozv04/isponsorblocktv | ||
container_name: iSponsorBlockTV | ||
restart: unless-stopped | ||
volumes: | ||
- /PATH_TO_YOUR_DATA_DIR:/app/data |
Oops, something went wrong.