File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
packages/biliass/src/biliass Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def process_comments(
3838 alpha : float ,
3939 duration_marquee : float ,
4040 duration_still : float ,
41- filters_regex : list [re . Pattern [ str ] ],
41+ filters_regex : list [str ],
4242 reduced : bool ,
4343):
4444 styleid = f"biliass_{ random .randint (0 , 0xFFFF ):04x} "
@@ -73,13 +73,6 @@ def Danmaku2ASS(
7373 is_reduce_comments : bool = False ,
7474) -> str :
7575 comment_filters : list [str ] = [comment_filter ] if comment_filter is not None else []
76- filters_regex = []
77- for comment_filter in comment_filters :
78- try :
79- if comment_filter :
80- filters_regex .append (re .compile (comment_filter ))
81- except : # noqa: E722
82- raise ValueError (f"Invalid regular expression: { comment_filter } " ) from None
8376
8477 comments : list [Comment ] = []
8578 if not isinstance (inputs , list ):
@@ -114,6 +107,6 @@ def Danmaku2ASS(
114107 text_opacity ,
115108 duration_marquee ,
116109 duration_still ,
117- filters_regex ,
110+ comment_filters ,
118111 is_reduce_comments ,
119112 )
You can’t perform that action at this time.
0 commit comments