ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
2.62k stars 300 forks source link

feat(YouTube - SponsorBlock): SponsorBlock Chapters #2012

Open EatVanced opened 2 years ago

EatVanced commented 2 years ago

Application

SponsorBlock patch for YouTube

Issue

Showing crowdsourced chapters

Patch

Adding SponsorBlock chapter support

References: https://blog.ajay.app/chapters-sponsorblock https://discord.com/channels/603643120093233162/603643153798397952/1022339812641996812

Motivation

By adding this feature more people can use the SponsorBlock chapters therefore if they choose so they can donate to SponsorBlock to use the feature.

https://buy.ajay.app/l/sponsorblock https://www.patreon.com/ajayyy

SponsorBlock segment is now free people to use

Acknowledgements

venkat2305 commented 2 years ago

bump +1

LisoUseInAIKyrios commented 1 year ago

I spent some time researching adding chapters to the video seekbar (so they work the same as chapters added by the video creator)

I found it's easy to hide or change the chapter text/timing for a video that already has YouTube chapters, by patching the code that creates chapter timing objects and changing/removing the data.

But adding chapters to a video that does not already have chapters is much more complicated. The creation of a YouTube chapter data object is built using many layers of obfuscated classes, and the calling code that creates the chapters needs many modifications.

To me, it seems like a large effort for a small return (there are not many videos with custom SponsorBlock chapters), but maybe a simpler approach to patching will be found.

LisoUseInAIKyrios commented 1 year ago

A simpler solution is add (yet another) UI overlay button that opens a dialog box listing the video chapters. The button would only appear when chapters are available.

This would be fairly simple to implement.

bellehop commented 1 month ago

In Revanced, you have to have a start time and an end time even when it's a highlight segment, in browser you only need a single timestamp, and then you can immediately submit a highlight segment. Adding the 'Inspect' option would be helpful for a fix instead of just having the preview option that skips the segment.