mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 03:57:09 +03:00
Use default action type from config
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"serverAddress": "https://sponsor.ajay.app",
|
||||
"testingServerAddress": "https://sponsor.ajay.app/test",
|
||||
"serverAddressComment": "This specifies the default SponsorBlock server to connect to",
|
||||
"categoryList": ["sponsor", "selfpromo", "interaction", "poi_highlight", "intro", "outro", "preview", "music_offtopic"],
|
||||
"categoryList": ["sponsor", "selfpromo", "interaction", "poi_highlight", "intro", "outro", "preview", "music_offtopic", "chapter"],
|
||||
"categorySupport": {
|
||||
"sponsor": ["skip", "mute"],
|
||||
"selfpromo": ["skip", "mute"],
|
||||
@@ -11,6 +11,7 @@
|
||||
"outro": ["skip"],
|
||||
"preview": ["skip"],
|
||||
"music_offtopic": ["skip"],
|
||||
"poi_highlight": ["skip"]
|
||||
"poi_highlight": ["skip"],
|
||||
"chapter": ["chapter"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,9 +365,11 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
}
|
||||
}
|
||||
|
||||
sponsorTimesSubmitting[this.props.index].category = this.categoryOptionRef.current.value as Category;
|
||||
const category = this.categoryOptionRef.current.value as Category
|
||||
sponsorTimesSubmitting[this.props.index].category = category;
|
||||
sponsorTimesSubmitting[this.props.index].actionType =
|
||||
this.actionTypeOptionRef?.current ? this.actionTypeOptionRef.current.value as ActionType : ActionType.Skip;
|
||||
this.actionTypeOptionRef?.current ? this.actionTypeOptionRef.current.value as ActionType
|
||||
: CompileConfig.categorySupport[category];
|
||||
|
||||
Config.config.segmentTimes.set(this.props.contentContainer().sponsorVideoID, sponsorTimesSubmitting);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user