dmunozv04 / iSponsorBlockTV

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

Problems with saving the config-file #166

Open pimpmytechno opened 1 month ago

pimpmytechno commented 1 month ago

I am using iSponsorBlock as an add-on for HomeAssistant. The plugin starts successfully, but it does not work on my LG OLED C1.

My cfg file looks as follows:

screen_id: dj**** name: YouTube on TV screen_id: ak**** name: YouTube on TV

In the "Options" section of the plugin, it looks like this:

apikey: *********************************
devices:

screen_id: dj************************
name: YouTube on TV
screen_id: dj************************
name: YouTube on TV
channel_whitelist: []
skip_categories:
sponsor
skip_count_tracking: false
mute_ads: false
skip_ads: true

When I try to put it into the correct format, I get an error:

_Failed to save add-on configuration, Missing option 'devices' in root in iSponsorBlockTV add-on (932a64e5_isponsorblocktv). Got {'apikey': 'myapikey', 'channel_whitelist': [], 'skip_categories': ['sponsor'], 'skip_count_tracking': False, 'mute_ads': False, 'skipads': True}

Is there any solution for this problem?

dmunozv04 commented 2 weeks ago

This seems to be related with the home assistant add-on. I'm sure @bertybuttface can be more helpful than me debugging this issue

bertybuttface commented 2 weeks ago

I did take a look when this was posted but didn't see the root cause, apologies for not responding.

pimpmytechno commented 2 weeks ago

Do you need any additional information from me?

bertybuttface commented 2 weeks ago

No idea why its not working, here is an example config:

apikey: <redacted>
devices:
  - screen_id: <redacted>
    name: Device 1
  - screen_id: <redacted>
    name: Device 2
  - screen_id: <redacted>
    name: Device 3
channel_whitelist: []
skip_categories:
  - sponsor
  - selfpromo
  - exclusive_access
  - interaction
  - preview
  - filler
  - music_offtopic
  - intro
  - outro
skip_count_tracking: false
mute_ads: false
skip_ads: true
data_dir: data
pimpmytechno commented 2 weeks ago

Yes, in the Configuration > Options section, I clicked on the three dots and selected "Edit in YAML", after which I inserted this config. Here's what I got in the add-on menu. It seems that all the settings are saved except for skip_categories. If I select from the dropdown list, I still get the save error "Failed to save add-on configuration, Invalid list for option 'skip_categories' in iSponsorBlockTV add-on".

Also, if it matters, in the YouTube app under 'Settings > Connected devices' there are no connected devices.

2 Снимок экрана 2024-06-22 в 02 33 46
bertybuttface commented 2 weeks ago

Plausibly something to do with this commit from a recently accepted PR: https://github.com/bertybuttface/addons/commit/a95c25ea46684b635eb44825c543beb97cbd8fc8

Try setting more than one skip_category, there may be a bug with setting exactly 1 skip category now.

pimpmytechno commented 2 weeks ago

Yes, i commit all categories

Снимок экрана 2024-06-22 в 02 55 31

Also, if it matters, in the YouTube app under 'Settings > Connected devices' there are no connected devices.

dmunozv04 commented 2 weeks ago

No connected devices appearing is completely normal

pimpmytechno commented 1 week ago

Maybe I can log in via SSH and manually enter the information into the configuration file? Where is the configuration file located?

pimpmytechno commented 1 week ago

I opened the file options.json, and here is its content. I don't see any errors.

{ "apikey": "myapikey", "devices": [ { "screen_id": "myid1", "name": "Device 1" }, { "screen_id": "myid2", "name": "Device 2" } ], "channel_whitelist": [], "skip_categories": [ "sponsor", "selfpromo", "exclusive_access", "interaction", "preview", "filler", "music_offtopic", "intro", "outro" ], "skip_count_tracking": false, "mute_ads": false, "skip_ads": true }

bertybuttface commented 1 week ago

Looks fine to me, what happens when you try and start the addon?

pimpmytechno commented 1 week ago

The addon starts without errors, here is the information from the logs.

[00:31:57] INFO: Starting... s6-rc: info: service legacy-services successfully started 2024-06-24 00:31:58,790 - iSponsorBlockTV-myid1 - INFO - Starting device 2024-06-24 00:31:58,790 - iSponsorBlockTV-myid2 - INFO - Starting device