Skip to content

Commit bd3dc69

Browse files
committed
Add 'Number of unique files played' statistic
1 parent e08cf17 commit bd3dc69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

data_generators.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ def gen_text_general_info(xml, r):
440440
long_mcombo_str = "[please load replay data]"
441441

442442
scores = list(iter_scores(xml))
443+
num_charts = len(list(xml.iter("Chart")))
443444
hours = sum(float(s.findtext("SurviveSeconds")) / 3600 for s in scores)
444445
first_play_date = min([parsedate(s.findtext("DateTime")) for s in scores])
445446
duration = relativedelta(datetime.now(), first_play_date)
@@ -452,6 +453,7 @@ def gen_text_general_info(xml, r):
452453
f"You started playing {duration.years} years {duration.months} months ago",
453454
f"Total hours spent playing: {round(hours)} hours",
454455
f"Number of scores: {len(scores)}",
456+
f"Number of unique files played: {num_charts}",
455457
f"Total arrows hit: {total_notes_string}",
456458
f"Longest combo: {long_combo_str}",
457459
f"Longest marvelous combo: {long_mcombo_str}",

0 commit comments

Comments
 (0)