diff options
author | Ajay <[email protected]> | 2022-10-11 18:24:52 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-10-11 18:24:52 -0400 |
commit | 6d05b2a84992a46a6a21ebda9da9daf946e7d766 (patch) | |
tree | 1a7b54ae66fcd4ae97d0ed7ae40ef99e5727fd32 | |
parent | 4729268083969af387cb9f302b4b8bc069bc840c (diff) | |
download | SponsorBlock-6d05b2a84992a46a6a21ebda9da9daf946e7d766.tar.gz SponsorBlock-6d05b2a84992a46a6a21ebda9da9daf946e7d766.zip |
Set endtime by default for outro
-rw-r--r-- | src/components/SponsorTimeEditComponent.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 7446c9ca..2530fe68 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -575,6 +575,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo saveEditTimes(): void { const sponsorTimesSubmitting = this.props.contentContainer().sponsorTimesSubmitting; + const category = this.categoryOptionRef.current.value as Category if (this.state.editing) { const startTime = GenericUtils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[0]); @@ -584,9 +585,11 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo if (startTime !== null && endTime !== null) { sponsorTimesSubmitting[this.props.index].segment = [startTime, endTime]; } + } else if (this.state.sponsorTimeEdits[1] === null && category === "outro") { + sponsorTimesSubmitting[this.props.index].segment[1] = this.props.contentContainer().v.duration; + this.props.contentContainer().updateEditButtonsOnPlayer(); } - const category = this.categoryOptionRef.current.value as Category sponsorTimesSubmitting[this.props.index].category = category; const actionType = this.getNextActionType(category, this.actionTypeOptionRef?.current?.value as ActionType); |