Skip to content

Commit fd45941

Browse files
committed
Add video duration to skip rules
1 parent 4296ea3 commit fd45941

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/skipRule.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export enum SkipRuleAttribute {
1919
Description = "chapter.name",
2020
Source = "chapter.source",
2121
ChannelID = "channel.id",
22-
ChannelName = "channel.name"
22+
ChannelName = "channel.name",
23+
VideoDuration = "video.duration"
2324
}
2425

2526
export enum SkipRuleOperator {
@@ -116,6 +117,8 @@ function getSkipRuleValue(segment: SponsorTime | VideoLabelsCacheData, rule: Adv
116117
case SkipRuleAttribute.ChannelName:
117118
getChannelIDInfo()
118119
return getChannelIDInfo().author;
120+
case SkipRuleAttribute.VideoDuration:
121+
return getVideoDuration();
119122
default:
120123
return undefined;
121124
}

0 commit comments

Comments
 (0)