dmunozv04 / iSponsorBlockTV

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

Adding Google Cloud API key for YouTube causes crash #121

Closed Nezteb closed 5 months ago

Nezteb commented 6 months ago

Describe the bug When running the docker run command from the docs to generate a config, this happens:

❯ docker run --rm -it \
    -v .:/app/data \
    ghcr.io/dmunozv04/isponsorblocktv \
    --setup-cli
Could not load config file
Blank config file created
Welcome to the iSponsorBlockTV cli setup wizard
Paired with 0 Device(s). Add more? (y/n) y
Enter pairing code (found in Settings - Link with TV code): REDACTED
Pairing...
Paired device: YouTube on TV
Paired with 1 Device(s). Add more? (y/n) n
API key only needed for the channel whitelist function. Add it? (y/n) y
Get youtube apikey here: https://developers.google.com/youtube/registering_an_application
Enter your API key: REDACTED
Traceback (most recent call last):
  File "/app/main.py", line 3, in <module>
    helpers.app_start()
  File "/app/iSponsorBlockTV/helpers.py", line 128, in app_start
    config_setup.main(config, args.debug)
  File "/app/iSponsorBlockTV/config_setup.py", line 59, in main
    config["apikey"] = apikey
    ~~~~~~^^^^^^^^^^
TypeError: 'Config' object does not support item assignment

Expected behavior

No crash? 😅

iSponsorBlockTV server (please complete the following information):

Apple TV (please complete the following information):

Screenshots

My Google Cloud console credentials page:

screenshot_2023-12-28_at_17 30 03@2x
dmunozv04 commented 6 months ago

Hi there, thanks for reporting the issue. I've managed to fix it and will push a new version soon. In the meantime, you could manually edit the config.json file that will be created on the data_dir directory or use the TUI setup wizard, which shouldn't have this problem (replace --setup-cli with --setup on your docker run command

Nezteb commented 6 months ago

Thanks for the quick response David, and for the tip!

In my case I don't actually need the whitelist functionality, so this isn't a blocker for me. I just wanted to report it. 😄