Skip to content

Commit

Permalink
Merge pull request #490 from MLB-LED-Scoreboard/dev
Browse files Browse the repository at this point in the history
Release v6.4.1
  • Loading branch information
ty-porter authored Jul 15, 2023
2 parents 6487899 + 7ef8414 commit c5160bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions data/config/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@ def font(self, keypath):

def coords(self, keypath):
try:
d = self.__find_at_keypath(keypath)
coord_dict = self.__find_at_keypath(keypath)
except KeyError as e:
raise e

if self.state in AVAILABLE_OPTIONAL_KEYS:
if self.state in d:
return d[self.state]
return d
if not isinstance(coord_dict, dict) or not self.state in AVAILABLE_OPTIONAL_KEYS:
return coord_dict

if self.state in coord_dict:
return coord_dict[self.state]

return coord_dict

def set_state(self, new_state=None):
if new_state in AVAILABLE_OPTIONAL_KEYS:
Expand Down
2 changes: 1 addition & 1 deletion renderers/games/teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def __render_team_text(canvas, layout, colors, team, homeaway, full_team_names,
def __render_record_text(canvas, layout, colors, team, homeaway, default_colors):
if "losses" not in team.record or "wins" not in team.record:
return
if not layout.coords("teams.record.enabled"):
if not layout.coords("teams.record").get("enabled", False):
return

text_color = colors.get("text", default_colors["text"])
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SCRIPT_NAME = "MLB LED Scoreboard"
SCRIPT_VERSION = "6.4.0"
SCRIPT_VERSION = "6.4.1"


if __name__ == "__main__":
Expand Down

0 comments on commit c5160bc

Please sign in to comment.