Don't require preview for segments ending at end of the video

Fixes #1959
This commit is contained in:
Ajay
2024-01-23 14:25:07 -05:00
parent a662c3e04f
commit 516d624f16

View File

@@ -2274,7 +2274,8 @@ async function sendSubmitMessage() {
if (!previewedSegment
&& !sponsorTimesSubmitting.every((segment) =>
[ActionType.Full, ActionType.Chapter, ActionType.Poi].includes(segment.actionType))) {
[ActionType.Full, ActionType.Chapter, ActionType.Poi].includes(segment.actionType)
|| segment.segment[1] >= getVideo()?.duration)) {
alert(`${chrome.i18n.getMessage("previewSegmentRequired")} ${keybindToString(Config.config.previewKeybind)}`);
return;
}