siku2/script.service.sponsorblock

Short sponsor segments can cause an endless loop

nickrbogdanov opened this issue · 1 comments

There is a short segment around the 7:00 mark in this video: https://www.youtube.com/watch?v=bmIVWe3Cux8

The database entry for that segment is here:

bmIVWe3Cux8,423.637,424.684,3,1,1,3d4615af6d689f7a269e098ff12bb78acd24627da08a459f7a31bf7dc399dc116,379d4ddf44438eb16515cffb897e741e63f6b36ec0b7893251f089888e8bcd91,1664851019278,8751,sponsor,skip,YouTube,577.801,0,27,0,59cfdc261dee0a7be88d5d03e76cc7b572ccaff25758fc507574d9e08735e0de,mnjggcdmjocbbbhaepdhchncahnbgone/v5.0.6,""

Usually, when I play this video on my newly flashed CoreELEC Kodi box:

  1. The video jumps
  2. I see the SponsorBlock notification on screen
  3. Instead of skipping ahead by about a second, the YouTube add-in rewinds back to about 7:00
  4. This process keeps repeating over and over again. Sometimes it proceeds on its own (maybe by confusing SponsorBlock), and sometimes it just goes forever

There are no warnings/backtraces recorded in the log when this happens.

I don't really see the point in skipping such a tiny segment anyway -- seems like it's more disruptive to the viewer than just leaving it in. Would it be possible for SponsorBlock users to specify a minimum segment length and ignore anything shorter than that?

siku2 commented

@siku2 There is such a problem. Is it possible to add an option to configure the minimum segment duration?

Yes, such an option could be added here:

self.seekTime(seg_target_seek_time - reduce_skips_seconds)

The logic should be relatively straight-forward.