Fix baseball custom fonts and abbreviation KeyError#63
Closed
ChuckBuilds wants to merge 4 commits intomainfrom
Closed
Fix baseball custom fonts and abbreviation KeyError#63ChuckBuilds wants to merge 4 commits intomainfrom
ChuckBuilds wants to merge 4 commits intomainfrom
Conversation
Some NCAA baseball teams lack the 'abbreviation' field in ESPN API responses, causing KeyError crashes. Use .get() with fallback to team name truncated to 3 chars, matching the pattern already used in sports.py and data_manager.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ismatch Baseball game_renderer was hardcoding fonts instead of reading from customization config like basketball and football do. Also fixes textbbox using 'time' font instead of 'detail' font for odds y-position calculation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dates Fix TypeError when team name is None by using `or` coalescing instead of passing potentially-None values to [:3] slice. Log default font fallback failures instead of silently swallowing them. Update last_updated and latest_version in manifests and registry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
BDF fonts can't be loaded via ImageFont.truetype(). Look for pre-converted .pil/.pbm files and use ImageFont.load(), matching the football renderer pattern. Also adds OTF support and better logging for missing/unknown fonts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe PR updates version metadata for the baseball-scoreboard and odds-ticker plugins, introduces defensive fallback logic for extracting team abbreviations in both plugins, and adds configurable font loading with enhanced error handling to the baseball scoreboard renderer. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3 tasks
Owner
Author
|
Closing — these changes are already on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ImageFont.loadinstead oftruetype)abbreviationfield in ESPN API (uses.get()with fallback)Supersedes #61 which is a subset of these changes.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Chores