diff options
author | emkael <emkael@tlen.pl> | 2019-02-23 17:20:07 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-02-23 17:20:07 +0100 |
commit | dd7902ef7b46f598973cf85541d2e5f63ec2943d (patch) | |
tree | 21bc8a68463cac933805cfa7db888f08e421593d /jfr_playoff/data.py | |
parent | 0bf3209ac695379ad0e3ebc3f52a19b226fa73ba (diff) |
Team name aliases
Fixes #32
Diffstat (limited to 'jfr_playoff/data.py')
-rw-r--r-- | jfr_playoff/data.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jfr_playoff/data.py b/jfr_playoff/data.py index 6adf00c..723a38d 100644 --- a/jfr_playoff/data.py +++ b/jfr_playoff/data.py @@ -17,6 +17,9 @@ class PlayoffData(object): self.swiss = [] if settings.has_section('swiss'): self.swiss = settings.get('swiss') + self.aliases = {} + if settings.has_section('team_aliases'): + self.aliases = settings.get('team_aliases') self.grid = [] self.match_info = {} self.leaderboard = [] @@ -56,7 +59,7 @@ class PlayoffData(object): self.match_info = {} for phase in self.phases: for match in phase['matches']: - match_info = MatchInfo(match, self.teams, self.database) + match_info = MatchInfo(match, self.teams, self.database, self.aliases) if 'link' in phase: match_info.set_phase_link(phase['link']) self.match_info[match['id']] = match_info.get_info() |