SponsorBlock: fix import (option mapping + enable) and enrich credit #45

Merged
365DevNet merged 0 commits from refs/pull/45/head into main 2026-07-14 01:02:23 +02:00
365DevNet commented 2026-07-14 01:01:00 +02:00 (Migrated from codeberg.org)

Fixes SponsorBlock import doing nothing, and expands the in-app explanation + credit (reported from a real SponsorBlock export).

Import was broken two ways:

  1. Wrong option mapping. SponsorBlock's CategorySkipOption enum is -1 Disabled, 0 ShowOverlay, 1 ManualSkip, 2 AutoSkip. The parser had 0→skip, 2→mute, so an auto-skip sponsor (option 2) imported as mute and a show-overlay category imported as skip. Now: 0→showonly, 1→manual, 2→skip, -1→disabled (export mirrors it; CleanWatch's mute, which SponsorBlock has no per-category equivalent for, exports as AutoSkip).
  2. Import didn't enable SponsorBlock. A first-time import applied categories but left the master toggle off — so nothing skipped. Importing is now an explicit opt-in that enables the feature (still preserving the private ID-sync toggle and display prefs).

Verified against a real SponsorBlock export: sponsor:2 now correctly imports as skip (was "mute"), poi_highlight:1→manual, exclusive_access:0→showonly, userID carried over, round-trip stable.

Copy/credit: extends the "what is SponsorBlock" description and rewrites the attribution to credit the creator Ajay Ramachandran and the volunteer community, in en/nl/de/fr.

Config-mapper tests updated to the real enum; 21/21 unit tests pass.

🤖 Generated with Claude Code

Fixes SponsorBlock import doing nothing, and expands the in-app explanation + credit (reported from a real SponsorBlock export). **Import was broken two ways:** 1. **Wrong option mapping.** SponsorBlock's `CategorySkipOption` enum is `-1 Disabled, 0 ShowOverlay, 1 ManualSkip, 2 AutoSkip`. The parser had `0→skip, 2→mute`, so an auto-skip sponsor (option 2) imported as *mute* and a show-overlay category imported as *skip*. Now: `0→showonly, 1→manual, 2→skip, -1→disabled` (export mirrors it; CleanWatch's `mute`, which SponsorBlock has no per-category equivalent for, exports as AutoSkip). 2. **Import didn't enable SponsorBlock.** A first-time import applied categories but left the master toggle off — so nothing skipped. Importing is now an explicit opt-in that enables the feature (still preserving the private ID-sync toggle and display prefs). Verified against a real SponsorBlock export: `sponsor:2` now correctly imports as **skip** (was "mute"), `poi_highlight:1`→manual, `exclusive_access:0`→showonly, userID carried over, round-trip stable. **Copy/credit:** extends the "what is SponsorBlock" description and rewrites the attribution to credit the creator **Ajay Ramachandran** and the volunteer community, in en/nl/de/fr. Config-mapper tests updated to the real enum; 21/21 unit tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
365DevNet/CleanWatch!45
No description provided.