Skip to content

Commit

Permalink
Fix misplacement of in text box
Browse files Browse the repository at this point in the history
  • Loading branch information
kangalio committed Nov 12, 2019
1 parent d4ce199 commit e08cf17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,6 @@ def gen_text_general_info(xml, r):
if r: # If ReplaysAnalysis is avilable
total_notes_string = util.abbreviate(r.total_notes, min_precision=3)

chart, combo = find_longest_combo(xml)
long_combo_chart = f'"{chart.get("Pack")} -> "{chart.get("Song")}"'
long_combo_str = f"{combo} on {long_combo_chart}"

chart = r.longest_mcombo[1]
long_mcombo_chart = f'"{chart.get("Pack")} -> "{chart.get("Song")}"'
long_mcombo_str = f"{r.longest_mcombo[0]} on {long_mcombo_chart}"
Expand All @@ -448,6 +444,10 @@ def gen_text_general_info(xml, r):
first_play_date = min([parsedate(s.findtext("DateTime")) for s in scores])
duration = relativedelta(datetime.now(), first_play_date)

chart, combo = find_longest_combo(xml)
long_combo_chart = f'"{chart.get("Pack")} -> "{chart.get("Song")}"'
long_combo_str = f"{combo} on {long_combo_chart}"

return "<br>".join([
f"You started playing {duration.years} years {duration.months} months ago",
f"Total hours spent playing: {round(hours)} hours",
Expand Down

0 comments on commit e08cf17

Please sign in to comment.