mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 15:07:02 +03:00
Always import chapters when segments
This commit is contained in:
@@ -958,11 +958,7 @@ async function sponsorsLookup(keepOldSubmissions = true) {
|
||||
}
|
||||
|
||||
function importExistingChapters(wait: boolean) {
|
||||
const containsChapter = sponsorTimes?.some((segment) => segment.actionType === ActionType.Chapter)
|
||||
|| sponsorTimesSubmitting.some((segment) => segment.actionType === ActionType.Chapter);
|
||||
|
||||
if ((Config.config.renderSegmentsAsChapters || containsChapter)
|
||||
&& !existingChaptersImported
|
||||
if (!existingChaptersImported
|
||||
&& (sponsorTimes?.length > 0 || sponsorTimesSubmitting.length > 0)) {
|
||||
GenericUtils.wait(() => video && getExistingChapters(sponsorVideoID, video.duration),
|
||||
wait ? 5000 : 0, 100, (c) => c?.length > 0).then((chapters) => {
|
||||
|
||||
Reference in New Issue
Block a user