Skip to content

Add sponsorblock support#742

Merged
AndreyPavlenko merged 1 commit into
AndreyPavlenko:masterfrom
apollotsantos:tsa/add-sponsorblock
May 3, 2026
Merged

Add sponsorblock support#742
AndreyPavlenko merged 1 commit into
AndreyPavlenko:masterfrom
apollotsantos:tsa/add-sponsorblock

Conversation

@apollotsantos
Copy link
Copy Markdown
Contributor

@apollotsantos apollotsantos commented Apr 25, 2026

Implements sponsorblock according to https://wiki.sponsor.ajay.app/w/API_Docs docs. Allows user to customise segments to auto skip

Solves #672

@apollotsantos apollotsantos changed the title Tsa/add sponsorblock Add sponsorblock support Apr 25, 2026
@AndreyPavlenko AndreyPavlenko requested a review from Copilot April 26, 2026 13:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds SponsorBlock integration to the YouTube web addon, enabling optional skipping of crowd-sourced segments based on user-selected categories (issue #672).

Changes:

  • Added SponsorBlock-related settings strings and preference UI entries (enable toggle + per-category toggles).
  • Injected a new youtube_sponsorblock.js script into the YouTube WebView and wired it to preference changes.
  • Implemented YoutubeSponsorBlock helper to load the script and generate the runtime configuration JSON.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
modules/web/src/main/res/values/strings.xml Adds UI strings for SponsorBlock settings and categories.
modules/web/src/main/res/raw/youtube_sponsorblock.js New injected runtime that fetches SponsorBlock segments and skips them during playback.
modules/web/src/main/java/me/aap/fermata/addon/web/yt/YoutubeWebView.java Injects/configures SponsorBlock on page load and reconfigures on pref changes.
modules/web/src/main/java/me/aap/fermata/addon/web/yt/YoutubeSponsorBlock.java New settings contribution + script loader + config JSON builder.
modules/web/src/main/java/me/aap/fermata/addon/web/yt/YoutubeAddon.java Hooks SponsorBlock settings into the YouTube addon settings screen.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/web/src/main/res/raw/youtube_sponsorblock.js Outdated
@apollotsantos
Copy link
Copy Markdown
Contributor Author

@AndreyPavlenko could you check if this is a secrets permission problem in the pipeline? Seems like because I was the one who triggered it, secrets are unaccessible

@AndreyPavlenko
Copy link
Copy Markdown
Owner

Please rebase on the last commit. It should skip this step if secrets are unavailable.
You can probably configure your own secrets in your fork. Then you'll get apks signed by your certificate.

@apollotsantos
Copy link
Copy Markdown
Contributor Author

Should be done now

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/web/src/main/res/raw/youtube_sponsorblock.js Outdated
Comment thread modules/web/src/main/java/me/aap/fermata/addon/web/yt/YoutubeSponsorBlock.java Outdated
@AndreyPavlenko AndreyPavlenko merged commit b9cc97f into AndreyPavlenko:master May 3, 2026
1 check passed
@AndreyPavlenko
Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants