Fix readme

This commit is contained in:
dmunozv04
2022-04-02 15:39:36 +02:00
parent f0f8bddf92
commit 5de4aba92c
2 changed files with 17 additions and 20 deletions

View File

@@ -4,21 +4,18 @@ Skip sponsor segments in YouTube videos playing on an Apple TV.
This project is written in asycronous python and should be pretty quick. This project is written in asycronous python and should be pretty quick.
## Installation # Installation
### Docker ## Docker
## Setup ### Setup
You need to retrieve airplay keys to be able to connect to the Apple TV. (It will be made simpler in the future) You need to set up several things before you can run the project.
For now, use `atvremote`, a script included in pyatv: 1. Create blank config file: ```touch config.json```
1. ```docker run --rm -it --network=host --entrypoint /bin/bash ghcr.io/dmunozv04/isponsorblocktv``` 2. ```docker run --rm -it \
2. atvremote scan --network=host \
3. atvremote pair --protocol airplay --id `identifier you got on the previous step` --entrypoint /opt/venv/bin/python3 /app/create_config.py \
4. ```exit``` the container -v /PATH_TO_YOUR_CONFIG.json:/app/config.json \
ghcr.io/dmunozv04/isponsorblocktv```
Get [YouTube api key](https://developers.google.com/youtube/registering_an_application)
Edit config.json.template and save it as config.json (this is the /PATH_TO_YOUR_CONFIG.json file)
## Run ## Run
```sh ```sh
docker pull ghcr.io/dmunozv04/isponsorblocktv docker pull ghcr.io/dmunozv04/isponsorblocktv
@@ -29,14 +26,14 @@ docker run -d \
-v /PATH_TO_YOUR_CONFIG.json:/app/config.json \ -v /PATH_TO_YOUR_CONFIG.json:/app/config.json \
ghcr.io/dmunozv04/isponsorblocktv ghcr.io/dmunozv04/isponsorblocktv
``` ```
### From source ## From source
You need to install [python](https://www.python.org/downloads/) first, and to make it available in your PATH. After, clone the repo. You need to install [python](https://www.python.org/downloads/) first, and to make it available in your PATH. After, clone the repo.
Then you need to download the dependencies with pip: Then you need to download the dependencies with pip:
```python3 -m pip install -r requirements.txt``` ```python3 -m pip install -r requirements.txt```
Lastly, run ```main.py``` Lastly, run ```main.py```
## Setup ### Setup
You need to retrieve airplay keys to be able to connect to the Apple TV. (It will be made simpler in the future) You need to retrieve airplay keys to be able to connect to the Apple TV. (It will be made simpler in the future)
For now, use `atvremote`, a script included in pyatv: For now, use `atvremote`, a script included in pyatv:
@@ -46,7 +43,7 @@ For now, use `atvremote`, a script included in pyatv:
Get [YouTube api key](https://developers.google.com/youtube/registering_an_application) Get [YouTube api key](https://developers.google.com/youtube/registering_an_application)
Edit config.json.template and save it as config.json Edit config.json.template and save it as config.json
## Usage # Usage
Run iSponsorBLockTV in the same network as the Apple TV. Run iSponsorBLockTV in the same network as the Apple TV.
@@ -54,15 +51,14 @@ It connect to the Apple TV, watch its activity and skip any sponsor segment usin
The last 5 videos' segments are cached to limit the number on queries on SponsorBlock and YouTube. The last 5 videos' segments are cached to limit the number on queries on SponsorBlock and YouTube.
To exit press ENTER
## Libraries used # Libraries used
- [pyatv](https://github.com/postlund/pyatv) Used to connect to the Apple TV - [pyatv](https://github.com/postlund/pyatv) Used to connect to the Apple TV
- [asyncio] and [aiohttp] - [asyncio] and [aiohttp]
- [async_lru] - [async_lru]
- [json] - [json]
## Contributing # Contributing
1. Fork it (<https://github.com/dmunozv04/iSponsorBlockTV/fork>) 1. Fork it (<https://github.com/dmunozv04/iSponsorBlockTV/fork>)
2. Create your feature branch (`git checkout -b my-new-feature`) 2. Create your feature branch (`git checkout -b my-new-feature`)
@@ -74,5 +70,5 @@ To exit press ENTER
- [dmunozv04](https://github.com/dmunozv04) - creator and maintainer - [dmunozv04](https://github.com/dmunozv04) - creator and maintainer
- [HaltCatchFire](https://github.com/HaltCatchFire) - updated dependencies and improved skip logic - [HaltCatchFire](https://github.com/HaltCatchFire) - updated dependencies and improved skip logic
## License # License
[![GNU GPLv3](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![GNU GPLv3](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html)

View File

@@ -79,6 +79,7 @@ def main():
apikey = input("Enter your API key: ") apikey = input("Enter your API key: ")
config["apikey"] = apikey config["apikey"] = apikey
else: else:
print("get youtube apikey here: https://developers.google.com/youtube/registering_an_application")
apikey = input("Enter your API key: ") apikey = input("Enter your API key: ")
config["apikey"] = apikey config["apikey"] = apikey