ajayyy / SponsorBlock

Skip YouTube video sponsors (browser extension)
https://sponsor.ajay.app
GNU General Public License v3.0
10.25k stars 323 forks source link

"Skip chapter" should not skip sections than are smaller than some buffer #1507

Open joshinils opened 2 years ago

joshinils commented 2 years ago

When the uploader has put timestamps in the description i can skip to the next chapter via ctrl + right/left arrow.

i would like the same for submitted chapters

ajayyy commented 2 years ago

Interesting, I didn't know there was an existing keybind for this, but I implemented my own which is Ctrl + [ and Ctrl + ]

joshinils commented 2 years ago

huh, when trying to change it to ctrl+arrow i get this warning:

This is a built-in YouTube shortcut. Are you sure you want to use it?

(i have to change it, my german qwerty layout does not have dedicated [ or ] keys, they are on the numberline and would need to be accessed via alt gr + 8 / alt gr + 9 which is rather annoying)

is there an example video you have which has submitted chapters but also timestamps from the uploader? i want to see what happens with the conflicting keybinding

joshinils commented 2 years ago

oh and maybe only skip to starts of chapters? since when they do not share the same frame for the start and end i have to skip twice... or use a buffer length so as to merge very short segments without chapters (a few frames with nothing for wexample would be between chapters and thus not part of the previous or next chapter)

ajayyy commented 2 years ago

The current implementation was a design decision. It skips to the next break that isn't a segment. This also allows you to now skip a normal segment even if you've dismissed the manual skip prompt

ajayyy commented 2 years ago

Maybe a buffer could be useful though

joshinils commented 2 years ago

Maybe a buffer could be useful though

I mean, the youtube chapters have to have a minimum length of 10sec, otherwise they are not recognized and ignored. so skipping to the next chapter start/end which is more than nsec away from the last start/end would make sense and avoid very short chapters and very short gaps between chapters.

maybe even depending on the current view.-time, so when i am two frames before the end of a chapter it will skip to the end of the next chapter, not the start which would only skip forward two frames

ajayyy commented 2 years ago

Hmm yea, I'm kind of growing to this idea, since if there are two named chapters next to eachother, with some small gap in between, then the gap is probably not content and would be nice to skip.

But the threshold needs to be low enough to allow incomplete videos to still be alright, as in those cases, the empty chapters are just areas that people couldn't think of a name for