From 8b319533f6ad8e3fcfe548ae0b6ca6278b0daf9c Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 17 Feb 2018 14:10:25 +0100 Subject: Ability to indicate the state (board count) of a manually defined match Fixes #8 Fixes #9 --- jfr_playoff/matchinfo.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jfr_playoff/matchinfo.py b/jfr_playoff/matchinfo.py index 7141113..9473238 100644 --- a/jfr_playoff/matchinfo.py +++ b/jfr_playoff/matchinfo.py @@ -121,7 +121,10 @@ class MatchInfo: (scores_fetched, teams_fetched, self.info.teams) = self.__get_predefined_scores() if scores_fetched: - self.info.running = -1 + if 'running' in self.config: + self.info.running = int(self.config['running']) + else: + self.info.running = -1 if not teams_fetched: try: self.info.teams = self.__get_db_teams(self.info.teams, not scores_fetched) @@ -155,8 +158,6 @@ class MatchInfo: self.info.running = -1 \ if boards_played >= boards_to_play \ else boards_played - else: - self.info.running = 0 def __determine_outcome(self): -- cgit v1.2.3