diff --git a/output_functions.py b/output_functions.py index 75b422d..bef575b 100644 --- a/output_functions.py +++ b/output_functions.py @@ -1252,6 +1252,8 @@ def build_combat_resurrection_stats_tid(top_stats: dict, skill_data: dict, buff_ def build_main_tid(datetime, tag_list, guild_name): tag_str = "" for tag in tag_list: + if tag == "": + continue if tag == tag_list[-1] and len(tag_list) > 1: tag_str += f"and {tag}" if tag != tag_list[-1] and len(tag_list) > 1: @@ -1259,12 +1261,17 @@ def build_main_tid(datetime, tag_list, guild_name): if len(tag_list) == 1: tag_str += f"{tag} " - + if tag_str == "": + tag_str = " - No Tags" + else: + tag_str = f"with {tag_str}" + main_created = f"{datetime}" main_modified = f"{datetime}" main_tags = f"{datetime} Logs" main_title = f"{datetime}-Log-Summary" - main_caption = f"{datetime} - {guild_name} - Log Summary with {tag_str}" + + main_caption = f"{datetime} - {guild_name} - Log Summary {tag_str}" main_creator = f"Drevarr@github.com" main_text = "{{"+datetime+"-Tag_Stats}}\n\n{{"+datetime+"-Menu}}" diff --git a/parser_functions.py b/parser_functions.py index 2a8e2e5..8a24ba8 100644 --- a/parser_functions.py +++ b/parser_functions.py @@ -158,7 +158,7 @@ def get_commander_tag_data(fight_json): """Extract commander tag data from the fight JSON.""" commander_tag_positions = [] - earliest_death_time = float('inf') + earliest_death_time = fight_json['durationMS'] has_died = False for player in fight_json["players"]: