dmunozv04 / iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.
GNU General Public License v3.0
2.42k stars 98 forks source link

Container error after setup #71

Closed Cassock closed 11 months ago

Cassock commented 11 months ago

Describe the bug Getting the following errors in my docker container. I used the run command with net-host to do the initial setup (which there really wasn't anything to configure), saw a "Youtube on TV" device which I assume is my CCwGTV, entered my YT API key, confirmed the generated config.json file. Ads are not muted or skipped on this device, however.

Traceback (most recent call last):
  File "main.py", line 3, in <module>
    helpers.app_start()
  File "/app/iSponsorBlockTV/helpers.py", line 120, in app_start
    config.validate()
  File "/app/iSponsorBlockTV/helpers.py", line 56, in validate
    self.devices = [Device(i) for i in self.devices]
  File "/app/iSponsorBlockTV/helpers.py", line 56, in <listcomp>
    self.devices = [Device(i) for i in self.devices]
  File "/app/iSponsorBlockTV/helpers.py", line 16, in __init__
    self.__validate()
  File "/app/iSponsorBlockTV/helpers.py", line 26, in __validate
    raise ValueError("No screen id found")
ValueError: No screen id found

To Reproduce run command for initial container:

docker run --rm -it \
-v /home/docker/isponsorblocktv:/app/data \
--net=host \
-e TERM=$TERM -e COLORTERM=$COLORTERM \
ghcr.io/dmunozv04/isponsorblocktv \
--setup

compose for permanent container:

  iSponsorBlockTV:
    image: ghcr.io/dmunozv04/isponsorblocktv
    container_name: iSponsorBlockTV
    restart: unless-stopped
    volumes:
      - /home/docker/isponsorblocktv:/app/data

Expected behavior Ads muted and skipped on my CCwGTV.

Screenshots image

iSponsorBlockTV server (please complete the following information):

Cassock commented 11 months ago

config.json contents:

{
    "data_dir": "data",
    "devices": [
        {
            "screen_id": "",
            "name": "YouTube on TV",
            "offset": 0
        }
    ],
    "apikey": "redacted",
    "skip_categories": [
        "sponsor"
    ],
    "channel_whitelist": [
        {
            "id": "",
            "name": ""
        }
    ],
    "skip_count_tracking": true,
    "mute_ads": true,
    "skip_ads": true
}
dmunozv04 commented 11 months ago

Did you take the config file from the template? Devices need to manually be added, and need to have a screen id to work. The configurator should let you add your device either via code or with auto discovery.

Cassock commented 11 months ago

I sure did. Deleted the original and repopulated with code (Auto discover didn't pick it up). I'm in business. Thanks!

dmunozv04 commented 11 months ago

You're welcome. Happy to hear it's working now!