feat: add opening/ending autoskip and correct sponsor hover anchors

Sponsor hover labels used the overlapping chapter midpoint; retain chapter-title lookup but anchor the label to the sponsored range midpoint.
This commit is contained in:
2026-10-25 22:12:08 +01:00
parent a604810319
commit 599e2f548a
6 changed files with 143 additions and 27 deletions
+9
View File
@@ -145,6 +145,15 @@ struct ConfigurationChecks {
try Data("[playback]\nsponsorblock_autoskip = \(value)\n".utf8).write(to: sponsor)
try requireLoadError(at: sponsor, "non-boolean sponsor autoskip", containing: ["sponsorblock_autoskip"])
}
for enabled in [true, false] {
try Data("[playback]\nopening_ending_autoskip = \(enabled)\n".utf8).write(to: sponsor)
try require(try PlayerConfiguration.load(from: sponsor) == PlayerConfiguration(openingEndingAutoSkip: enabled),
"opening/ending autoskip is independent of SponsorBlock")
}
for value in ["\"true\"", "1", "[]"] {
try Data("[playback]\nopening_ending_autoskip = \(value)\n".utf8).write(to: sponsor)
try requireLoadError(at: sponsor, "non-boolean opening/ending autoskip", containing: ["opening_ending_autoskip"])
}
let miruro = root.appendingPathComponent("miruro.toml")
for (settings, video, captions) in [
("video_provider = \"new-Host_2\"", "new-Host_2", ""),