erdnaxeli / castblock

Automatically skip sponsor segments and ads in YouTube videos playing on Chromecast.
MIT License
182 stars 20 forks source link

[Feature] Merge multiple segments / skip adjacent segments with threshold parameter #21

Closed stephen304 closed 3 years ago

stephen304 commented 3 years ago

I got tired of waiting for 2 skips for ad reads before intro segments, so I made this and use 1.0 as a threshold and it seems to work great!

Note: This would change the default behavior to skipping multiple overlapping segments in 1 skip, I think that's a nice improvement if the code seems safe

stephen304 commented 3 years ago

I also adjusted the minimum segment length check to apply after merging segments and added some comments

erdnaxeli commented 3 years ago

Seems great, I'll look at it this afternoon. Do you have an example of such a video with two adjacent segments? I never saw that :thinking:

stephen304 commented 3 years ago

Linus tech tips is a good example, since nearly all of their videos have a sponsor right before the intro: https://www.youtube.com/watch?v=eWSQ7Cj_n5M

erdnaxeli commented 3 years ago

That's super smooth, thanks!