mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 03:57:09 +03:00
Add video duration to skip rules
This commit is contained in:
@@ -19,7 +19,8 @@ export enum SkipRuleAttribute {
|
|||||||
Description = "chapter.name",
|
Description = "chapter.name",
|
||||||
Source = "chapter.source",
|
Source = "chapter.source",
|
||||||
ChannelID = "channel.id",
|
ChannelID = "channel.id",
|
||||||
ChannelName = "channel.name"
|
ChannelName = "channel.name",
|
||||||
|
VideoDuration = "video.duration"
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SkipRuleOperator {
|
export enum SkipRuleOperator {
|
||||||
@@ -116,6 +117,8 @@ function getSkipRuleValue(segment: SponsorTime | VideoLabelsCacheData, rule: Adv
|
|||||||
case SkipRuleAttribute.ChannelName:
|
case SkipRuleAttribute.ChannelName:
|
||||||
getChannelIDInfo()
|
getChannelIDInfo()
|
||||||
return getChannelIDInfo().author;
|
return getChannelIDInfo().author;
|
||||||
|
case SkipRuleAttribute.VideoDuration:
|
||||||
|
return getVideoDuration();
|
||||||
default:
|
default:
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user