mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Import chapters as chooseACategory if chapters is disabled
This commit is contained in:
parent
b52132e311
commit
5209c0ea04
1 changed files with 7 additions and 2 deletions
|
@ -271,8 +271,13 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
|
|||
for (const segment of importedSegments) {
|
||||
if (!sponsorTimesSubmitting.some(
|
||||
(s) => Math.abs(s.segment[0] - segment.segment[0]) < 1
|
||||
&& Math.abs(s.segment[1] - segment.segment[1]) < 1)
|
||||
&& (segment.category !== "chapter" || utils.getCategorySelection("chapter"))) {
|
||||
&& Math.abs(s.segment[1] - segment.segment[1]) < 1)) {
|
||||
if (segment.category === "chapter" && !utils.getCategorySelection("chapter")) {
|
||||
segment.category = "chooseACategory" as Category;
|
||||
segment.actionType = ActionType.Skip;
|
||||
segment.description = "";
|
||||
}
|
||||
|
||||
sponsorTimesSubmitting.push(segment);
|
||||
addedSegments = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue