mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-18 13:38:25 +03:00
Add autogenerated type for source in advance skip options
This commit is contained in:
@@ -68,7 +68,9 @@ export function getExistingChapters(currentVideoID: VideoID, duration: number):
|
||||
const chaptersBox = document.querySelector("ytd-macro-markers-list-renderer");
|
||||
const title = chaptersBox?.closest("ytd-engagement-panel-section-list-renderer")?.querySelector("#title-text.ytd-engagement-panel-title-header-renderer");
|
||||
if (title?.textContent?.includes("Key moment")) return [];
|
||||
if (!Config.config.showAutogeneratedChapters && hasAutogeneratedChapters()) return [];
|
||||
|
||||
const autogenerated = hasAutogeneratedChapters();
|
||||
if (!Config.config.showAutogeneratedChapters && autogenerated) return [];
|
||||
|
||||
const chapters: SponsorTime[] = [];
|
||||
// .ytp-timed-markers-container indicates that key-moments are present, which should not be divided
|
||||
@@ -92,7 +94,7 @@ export function getExistingChapters(currentVideoID: VideoID, duration: number):
|
||||
category: "chapter" as Category,
|
||||
actionType: ActionType.Chapter,
|
||||
description: description.innerText,
|
||||
source: SponsorSourceType.YouTube,
|
||||
source: autogenerated ? SponsorSourceType.Autogenerated : SponsorSourceType.YouTube,
|
||||
UUID: null
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user