diff --git a/danmaku2ass.py b/danmaku2ass.py index f9043c2..1eb91d4 100755 --- a/danmaku2ass.py +++ b/danmaku2ass.py @@ -731,10 +731,10 @@ def export(func): @export -def Danmaku2ASS(input_files, input_format, output_file, stage_width, stage_height, reserve_blank=0, font_face=_('(FONT) sans-serif')[7:], font_size=25.0, text_opacity=1.0, duration_marquee=5.0, duration_still=5.0, comment_filter=None, comment_filters_json=None, is_reduce_comments=False, progress_callback=None): +def Danmaku2ASS(input_files, input_format, output_file, stage_width, stage_height, reserve_blank=0, font_face=_('(FONT) sans-serif')[7:], font_size=25.0, text_opacity=1.0, duration_marquee=5.0, duration_still=5.0, comment_filter=None, comment_filters_file=None, is_reduce_comments=False, progress_callback=None): comment_filters = [comment_filter] - if comment_filters_json: - with open(comment_filters_json, 'r') as f: + if comment_filters_file: + with open(comment_filters_file, 'r') as f: d = f.readlines() comment_filters.extend([i.strip() for i in d]) filters_regex = []