diff --git a/app/DataBase/exporter_html.py b/app/DataBase/exporter_html.py index 7175949..4b10e8c 100644 --- a/app/DataBase/exporter_html.py +++ b/app/DataBase/exporter_html.py @@ -303,7 +303,11 @@ class HtmlExporter(ExporterBase): else: self.progressSignal.emit(1) - flag = True # 如果选的种类很少会出现大量冗余的时间信息,如果当前消息并未被选中那么不分析时间 + if self.is_5_min(timestamp): + str_time = message[8] + f.write( + f'''{{ type:0, text: '{str_time}',is_send:0,avatar_path:'',timestamp:{timestamp}}},''' + ) if type_ == 1 and self.message_types.get(type_): self.text(f, message) elif type_ == 3 and self.message_types.get(type_): @@ -324,13 +328,6 @@ class HtmlExporter(ExporterBase): self.music_share(f, message) elif type_ == 49 and sub_type == 5 and self.message_types.get(4905): self.share_card(f, message) - else: - flag = False - if flag and self.is_5_min(timestamp): - str_time = message[8] - f.write( - f'''{{ type:0, text: '{str_time}',is_send:0,avatar_path:'',timestamp:{timestamp}}},''' - ) f.write(html_end) f.close() self.count_finish_num(1)