dmunozv04 / iSponsorBlockTV

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

Adjustable offset for the start of a skip #75

Closed cr3ative closed 8 months ago

cr3ative commented 8 months ago

Is your feature request related to a problem? Please describe.

This is my first time using sponsorblock type programs, and I've found it can skip quite unexpectedly, which is a little confusing. It would almost be reassuring to hear the person in the video say "And now, a word from our sponsors", then the skip to happen - because at the moment, some skip segments don't even get that far, so you just have to assume the sponsorblock detected something worth skipping, but you can't... be sure.

Describe the solution you'd like

I'd like to be able to configure something like "allow first N milliseconds of segment". So, for example, I'd set a configuration variable to 4000 which would allow 4000ms of the segment to play before the skip is executed. That would allow the video to play the start of the segment, then the skip reason would be quite apparent.

Describe alternatives you've considered

I have considered not being so alarmed by the skip happening and trusting that it is correct.

Additional context

This, running in Docker on unRAID, is almost magical. This is a very impressive project and idea!

dmunozv04 commented 8 months ago

This isn’t either tested or documented, but setting an offset parameter on a device with a negative number should do the trick. Let me know if that works. The skips are done that way on purpose, and I’m very happy to hear that you can’t even notice sometimes that the program skipped a segment. A couple of tricks are performed to try to make it as seamless as possible, but I can understand that a notification would be nice. The web client sends a notification, but doing it here would be hard (but maybe doable)

cr3ative commented 8 months ago

Thank you! That appears to have worked as expected. With offset on -4000 I appear to get 4 seconds of segment playing.

I think milliseconds is correct in the config due to this: https://github.com/dmunozv04/iSponsorBlockTV/blob/ace8f3564ffceea2a87e3a1c290abaaebd0557a3/iSponsorBlockTV/helpers.py#L22 and it appearing to work.

dmunozv04 commented 8 months ago

It’s great to know that the offset works with negative numbers.