mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Move segment times from encoded array to normal js object
This commit is contained in:
@@ -509,8 +509,9 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
const inputActionType = this.actionTypeOptionRef?.current?.value as ActionType;
|
||||
sponsorTimesSubmitting[this.props.index].actionType = this.getNextActionType(category, inputActionType);
|
||||
|
||||
Config.config.segmentTimes.set(this.props.contentContainer().sponsorVideoID, sponsorTimesSubmitting);
|
||||
|
||||
Config.config.unsubmittedSegments[this.props.contentContainer().sponsorVideoID] = sponsorTimesSubmitting;
|
||||
Config.forceUpdate("unsubmittedSegments");
|
||||
|
||||
this.props.contentContainer().updatePreviewBar();
|
||||
|
||||
if (sponsorTimesSubmitting[this.props.index].actionType === ActionType.Full
|
||||
@@ -555,7 +556,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
sponsorTimes.splice(index, 1);
|
||||
|
||||
//save this
|
||||
Config.config.segmentTimes.set(this.props.contentContainer().sponsorVideoID, sponsorTimes);
|
||||
Config.config.unsubmittedSegments[this.props.contentContainer().sponsorVideoID] = sponsorTimes;
|
||||
Config.forceUpdate("unsubmittedSegments");
|
||||
|
||||
this.props.contentContainer().updatePreviewBar();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user