feat: make sponsored blocks skippable
This commit is contained in:
@@ -136,6 +136,15 @@ struct ConfigurationChecks {
|
||||
try require(try PlayerConfiguration.load(from: sponsor) == PlayerConfiguration(sponsorBlock: enabled),
|
||||
"SponsorBlock opt-in and explicit opt-out load without changing other defaults")
|
||||
}
|
||||
for enabled in [true, false] {
|
||||
try Data("[playback]\nsponsorblock_autoskip = \(enabled)\n".utf8).write(to: sponsor)
|
||||
try require(try PlayerConfiguration.load(from: sponsor) == PlayerConfiguration(sponsorBlockAutoSkip: enabled),
|
||||
"sponsor autoskip loads independently without enabling network lookups")
|
||||
}
|
||||
for value in ["\"true\"", "1", "[]"] {
|
||||
try Data("[playback]\nsponsorblock_autoskip = \(value)\n".utf8).write(to: sponsor)
|
||||
try requireLoadError(at: sponsor, "non-boolean sponsor autoskip", containing: ["sponsorblock_autoskip"])
|
||||
}
|
||||
let miruro = root.appendingPathComponent("miruro.toml")
|
||||
for (settings, video, captions) in [
|
||||
("video_provider = \"new-Host_2\"", "new-Host_2", ""),
|
||||
|
||||
Reference in New Issue
Block a user