Skip to content

Add Cricket scoreboard plugin#181

Open
ChuckBuilds wants to merge 3 commits into
mainfrom
claude/cricket-scoreboard
Open

Add Cricket scoreboard plugin#181
ChuckBuilds wants to merge 3 commits into
mainfrom
claude/cricket-scoreboard

Conversation

@ChuckBuilds

@ChuckBuilds ChuckBuilds commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

A new from-scratch Cricket Scoreboard plugin (plugins/cricket-scoreboard/) covering both international matches (Test / ODI / T20I) and the major domestic T20 leagues (IPL, Big Bash, The Hundred, PSL, CPL, SA20, ILT20, MLC, and more). Data is from ESPN's public cricket API (no auth). Unlike AFL/NRL, cricket has no reusable precedent, so the data model and renderer are new — but the lifecycle, config surface, and conventions mirror soccer-scoreboard.

Display modes: cricket_live, cricket_recent, cricket_upcoming.

Series-ID discovery (the core design problem)

Cricket has no single stable league id on ESPN (unlike AFL afl / NRL 3). It is organised as dozens of concurrent, per-tour/per-season numeric series ids that change every season. So the fetcher discovers them instead of hardcoding:

  1. competitions.json seeds human keys (ipl, bbl, the-hundred, …) → stable search terms (names are far more stable than ids).
  2. Every series_discovery_interval (default 24h) it queries the header endpoint (site.web.api.espn.com/apis/v2/scoreboard/header?sport=cricket), lists active series, and resolves them — domestic by matching favorite_competitions search terms against the series name; international by matching favorite_teams national-team names inside the series/event names (e.g. "India tour of England 2026").
  3. Each resolved id's /scoreboard (site.api.espn.com/apis/site/v2/sports/cricket/{id}/scoreboard) is fetched and parsed. Resolved ids are cached via the host cache_manager.

Overs math (base-6)

Cricket overs are base-6 in the fractional part: 18.4 overs = 18 overs + 4 balls = 18 + 4/6 = 18.667 decimal overs, not 18.4. The plugin converts before any division — current run rate = runs / decimal_overs, required run rate = runs_needed / (balls_remaining / 6). Dedicated unit tests cover this.

ESPN source / fields used

Per-competitor score string (e.g. "161/5 (18/20 ov, target 156)"), linescores[] (runs/wickets/overs/isBatting/description), class.eventType for format, status.type.state (pre/in/post), and status.summary for the result string. No rosters/lineups exist, so no per-ball detail (see limitations).

Config parity

All standard scoreboard fields (durations, update intervals, recent/upcoming_games_to_show, display_modes toggles, celebration_*, dynamic_duration + mode_durations, background_service) plus cricket's dual filter (favorite_teams national teams + favorite_competitions domestic keys) and a customization fonts/colors block. Draft-07, additionalProperties: false.

Known v1 limitations

  • No per-ball / per-player detail (striker, bowler figures, economy) — ESPN's scoreboard response has no rosters; a boxscore endpoint would be a fast-follow.
  • Placeholder flags: assets/flags/*.png are generated placeholders (solid national colors + abbreviation) so the wiring is complete and functional; replace with real 48×48 art (same filenames) for nicer output. Franchise logos auto-download from ESPN.
  • The Hundred counts balls (100), so its run rates are best-effort.

Test plan

  • python3 -m py_compile plugins/cricket-scoreboard/*.py — clean
  • All JSON (manifest.json, config_schema.json, competitions.json, test/harness.json, plugins.json) parses
  • 21 unit tests pass (test_cricket_plugin.py): base-6 overs conversion, run-rate math, format normalization, all 4 renderer branches at 64×32/128×32/128×64/256×32, manager update/display + live-priority + Vegas smoke tests
  • Parser verified against a real series scoreboard response; live series discovery verified against the header endpoint
  • scripts/check_module_collisions.py — OK (cricket-prefixed module names avoid collisions)
  • update_registry.py --dry-run — cricket-scoreboard 1.0.0 in sync
  • Install via plugin store on devpi/ledpi and eyeball live/recent/upcoming rendering

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a Cricket Scoreboard plugin with live, recent, and upcoming match displays.
    • Supports international and major domestic competitions, favorite/excluded teams, configurable display timing, venues, records, colors, and celebration overlays.
    • Displays scores, overs, run rates, match status, schedules, venues, team logos, and flags.
    • Includes automatic match discovery, data updates, logo downloads, and placeholder imagery.
  • Documentation
    • Added setup, configuration, supported competitions, limitations, and testing documentation.
  • Tests
    • Added coverage for score calculations, match formats, rendering, configuration, and display behavior.

New from-scratch cricket-scoreboard plugin covering international matches
(Test/ODI/T20I) and major domestic T20 leagues (IPL, Big Bash, The Hundred,
PSL, CPL, SA20, ILT20, MLC, and more), sourced from ESPN's public cricket API.

Highlights:
- Series-ID discovery: cricket has no stable league id on ESPN, so numeric
  per-tour/per-season series ids are re-resolved periodically from the header
  endpoint, matched against favorite_competitions (by search terms in
  competitions.json) and favorite_teams (national teams in series names).
- Base-6 overs math: 18.4 overs -> 18.667 decimal overs before any run-rate
  division; current + required run rate; unit-tested.
- Four render branches: live limited-overs, live Test (day/session, no clock),
  recent (result summary), upcoming (date/venue/format).
- Config parity with the other sports scoreboards plus the dual favorite_teams
  / favorite_competitions filter, customization fonts+colors, dynamic duration,
  live priority, and Vegas hooks.
- Franchise logos auto-download; bundled national-team flag placeholders.

Validated: py_compile clean, all JSON parses, 21 unit tests pass, parser and
live series discovery verified against the real ESPN endpoints.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@ChuckBuilds, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1c75ab27-e01b-4562-a49f-c1fefc51f19e

📥 Commits

Reviewing files that changed from the base of the PR and between 946c905 and 0c4fb9d.

📒 Files selected for processing (6)
  • plugins.json
  • plugins/cricket-scoreboard/config_schema.json
  • plugins/cricket-scoreboard/cricket_data_fetcher.py
  • plugins/cricket-scoreboard/cricket_logo_downloader.py
  • plugins/cricket-scoreboard/manager.py
  • plugins/cricket-scoreboard/manifest.json
📝 Walkthrough

Walkthrough

Changes

Adds and registers a cricket scoreboard plugin that discovers ESPN cricket series, normalizes match data, renders multiple match states, manages logos, integrates with display and Vegas modes, and includes configuration, documentation, deterministic fixtures, and unit tests.

Cricket scoreboard

Layer / File(s) Summary
Plugin metadata and configuration
plugins.json, plugins/cricket-scoreboard/{manifest.json,competitions.json,config_schema.json,requirements.txt,.gitignore,LICENSE}
Registers the plugin, defines supported competitions and display settings, and adds repository metadata and support files.
ESPN discovery and match normalization
plugins/cricket-scoreboard/cricket_data_fetcher.py
Discovers configured ESPN series, caches responses, parses scoreboard events, and normalizes match, innings, format, target, and timing data.
Match rendering and team assets
plugins/cricket-scoreboard/cricket_renderer.py, plugins/cricket-scoreboard/logo_downloader.py
Renders live, Test, recent, and upcoming cards while loading, downloading, or generating team images.
Plugin lifecycle and display integration
plugins/cricket-scoreboard/manager.py
Filters and categorizes matches, rotates and displays rendered cards, supports Vegas hooks, handles configuration changes, and reports plugin state.
Harness, tests, and documentation
plugins/cricket-scoreboard/README.md, plugins/cricket-scoreboard/test/*, plugins/cricket-scoreboard/test_cricket_plugin.py
Documents behavior and validates overs math, format handling, rendering, manager behavior, and display integrations with mocked fixtures.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DisplayManager
  participant CricketScoreboardPlugin
  participant CricketDataFetcher
  participant CricketRenderer
  CricketScoreboardPlugin->>CricketDataFetcher: update match data
  CricketDataFetcher-->>CricketScoreboardPlugin: categorized source matches
  CricketScoreboardPlugin->>CricketRenderer: render selected match
  CricketRenderer-->>CricketScoreboardPlugin: PIL image
  CricketScoreboardPlugin->>DisplayManager: push image
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.36% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a new cricket scoreboard plugin.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/cricket-scoreboard

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Jul 10, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 3 high · 1 medium

Alerts:
⚠ 4 issues (≤ 0 issues of at least minor severity)

Results:
4 new issues

Category Results
ErrorProne 3 high
Security 1 medium

View in Codacy

🟢 Metrics 468 complexity

Metric Results
Complexity 468

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@ChuckBuilds

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (5)
plugins/cricket-scoreboard/test_cricket_plugin.py (3)

14-18: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove unused os import.

Static analysis (Ruff F401) flags os as imported but never used in this file.

💚 Proposed fix
 import json
-import os
 import sys
 import unittest
 from pathlib import Path
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/cricket-scoreboard/test_cricket_plugin.py` around lines 14 - 18,
Remove the unused os import from the imports in test_cricket_plugin.py, leaving
the remaining imports unchanged.

Source: Linters/SAST tools


97-107: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a test case for "The Hundred" format normalization.

_normalize_format explicitly handles "HUNDRED" → "The Hundred", but TestFormatNormalization doesn't cover it. Since The Hundred is a documented supported format with known limitations, it should have test coverage.

💚 Proposed fix
         self.assertEqual(n("First-class"), "First-class")
+        self.assertEqual(n("The Hundred"), "The Hundred")
+        self.assertEqual(n("Hundred"), "The Hundred")
         self.assertEqual(n(""), "T20")  # defensive default
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/cricket-scoreboard/test_cricket_plugin.py` around lines 97 - 107, Add
a test case in TestFormatNormalization.test_formats covering
_normalize_format("HUNDRED") and asserting it returns "The Hundred", alongside
the existing format normalization cases.

193-196: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Unused dm variable in test_display_recent_and_upcoming.

Static analysis (Ruff RUF059) flags the unpacked dm as never used. Unlike test_display_live which asserts dm.updated, this test doesn't verify the display was actually updated. Consider either using dm or prefixing with underscore.

💚 Proposed fix
     def test_display_recent_and_upcoming(self):
-        plugin, dm = self._make_plugin()
+        plugin, _ = self._make_plugin()
         self.assertTrue(plugin.display("cricket_recent"))
         self.assertTrue(plugin.display("cricket_upcoming"))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/cricket-scoreboard/test_cricket_plugin.py` around lines 193 - 196, In
test_display_recent_and_upcoming, avoid the unused dm binding flagged by Ruff:
either assert the display manager was updated after the display calls, or rename
the unpacked variable to _dm if no verification is intended.

Source: Linters/SAST tools

plugins/cricket-scoreboard/README.md (1)

107-109: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Testing description slightly overstates renderer size coverage.

The README states tests cover "all four renderer branches at every matrix size," but test_all_sizes in test_cricket_plugin.py (lines 134–139) only exercises render_live_limited_overs across multiple sizes. The other three branches (render_live_test, render_recent, render_upcoming) are only tested at 128×32.

Consider rewording to "all four renderer branches, plus multiple matrix sizes" or add size-variation tests for the remaining branches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/cricket-scoreboard/README.md` around lines 107 - 109, Update the
README testing description to avoid claiming every renderer branch is tested at
every matrix size; replace it with wording such as “all four renderer branches,
plus multiple matrix sizes,” unless extending test_all_sizes to cover
render_live_test, render_recent, and render_upcoming across those sizes.
plugins/cricket-scoreboard/manager.py (1)

437-438: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Log the swallowed exception in on_config_change.

Silently passing on super().on_config_change() failures hides potential base class errors. Ruff flags this as S110 (try-except-pass).

🔍 Proposed fix
             try:
                 super().on_config_change(new_config)
             except Exception:
-                pass
+                self.logger.debug("BasePlugin on_config_change failed", exc_info=True)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/cricket-scoreboard/manager.py` around lines 437 - 438, In
on_config_change, replace the bare except Exception/pass with exception logging
for failures from super().on_config_change(). Preserve the existing exception
handling while recording the exception and traceback through the class’s
available logger, resolving Ruff S110.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/cricket-scoreboard/config_schema.json`:
- Around line 12-21: Reject empty or whitespace-only entries in the
favorite_teams schema by requiring each string to contain non-whitespace
characters, and update cricket_data_fetcher.py to defensively trim and discard
blank team values before performing series/match name checks. Use the
favorite_teams validation and team-matching logic as the relevant code
locations.

In `@plugins/cricket-scoreboard/cricket_data_fetcher.py`:
- Around line 248-253: Scope the discovery cache to the active configuration in
the series discovery method surrounding _cache_get: normalize favorite_teams and
favorite_competitions, incorporate both normalized filters into the cache key,
and use that same key for reads and writes so configuration changes cannot reuse
stale series IDs.
- Around line 201-209: Validate the parsed response in _get_json before
returning it: only return the value when resp.json() produces a dictionary, and
log a warning and return None for arrays, scalars, or other invalid shapes so
callers can safely use .get(...).
- Around line 103-116: Update overs_to_balls to reject negative values after
converting the input to float, returning 0 when overs is less than zero;
preserve the existing handling for None and non-numeric inputs.

In `@plugins/cricket-scoreboard/logo_downloader.py`:
- Line 65: In download_missing_logo, validate logo_url before session.get() so
only HTTPS URLs are accepted and malformed or disallowed schemes are rejected.
Sanitize team_abbr at the point logo_path is constructed in manager.py, ensuring
path separators and traversal components cannot escape the logos directory;
restrict it to a safe filename form and verify the resolved path remains under
logos_dir. Apply the same protections to the related download path around the
alternate referenced lines.
- Around line 1-177: Rename the module file from logo_downloader.py to
cricket_logo_downloader.py, preserving the LogoDownloader,
download_missing_logo, and create_placeholder_logo implementations. Update
manager.py and any other references or dynamic loader paths to import or load
cricket_logo_downloader instead of logo_downloader, and verify no stale
references remain.

In `@plugins/cricket-scoreboard/manager.py`:
- Around line 433-441: Replace the self.__init__() call in on_config_change with
an in-place _apply_config() method that updates configuration-dependent
durations, filters, and mode flags while preserving _lock, fetcher, renderer,
and background_service. Ensure any resources that genuinely must be replaced are
explicitly cleaned up before replacement, and keep concurrent update/display
operations synchronized with the existing lock.

---

Nitpick comments:
In `@plugins/cricket-scoreboard/manager.py`:
- Around line 437-438: In on_config_change, replace the bare except
Exception/pass with exception logging for failures from
super().on_config_change(). Preserve the existing exception handling while
recording the exception and traceback through the class’s available logger,
resolving Ruff S110.

In `@plugins/cricket-scoreboard/README.md`:
- Around line 107-109: Update the README testing description to avoid claiming
every renderer branch is tested at every matrix size; replace it with wording
such as “all four renderer branches, plus multiple matrix sizes,” unless
extending test_all_sizes to cover render_live_test, render_recent, and
render_upcoming across those sizes.

In `@plugins/cricket-scoreboard/test_cricket_plugin.py`:
- Around line 14-18: Remove the unused os import from the imports in
test_cricket_plugin.py, leaving the remaining imports unchanged.
- Around line 97-107: Add a test case in TestFormatNormalization.test_formats
covering _normalize_format("HUNDRED") and asserting it returns "The Hundred",
alongside the existing format normalization cases.
- Around line 193-196: In test_display_recent_and_upcoming, avoid the unused dm
binding flagged by Ruff: either assert the display manager was updated after the
display calls, or rename the unpacked variable to _dm if no verification is
intended.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 84cdded7-2817-48c2-978a-2b3a785f587e

📥 Commits

Reviewing files that changed from the base of the PR and between 25780e7 and 946c905.

⛔ Files ignored due to path filters (29)
  • plugins/cricket-scoreboard/assets/flags/AFG.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/AUS.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/BAN.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/ENG.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/IND.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/IRE.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/NZ.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/PAK.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/RSA.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/SA.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/SL.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/WI.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/ZIM.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/afghanistan.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/australia.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/bangladesh.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/england.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/india.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/ireland.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/new_zealand.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/pakistan.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/south_africa.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/south_africa2.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/sri_lanka.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/west_indies.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/flags/zimbabwe.png is excluded by !**/*.png
  • plugins/cricket-scoreboard/assets/fonts/4x6-font.ttf is excluded by !**/*.ttf
  • plugins/cricket-scoreboard/assets/fonts/5by7.regular.ttf is excluded by !**/*.ttf
  • plugins/cricket-scoreboard/assets/fonts/PressStart2P-Regular.ttf is excluded by !**/*.ttf
📒 Files selected for processing (14)
  • plugins.json
  • plugins/cricket-scoreboard/.gitignore
  • plugins/cricket-scoreboard/LICENSE
  • plugins/cricket-scoreboard/README.md
  • plugins/cricket-scoreboard/competitions.json
  • plugins/cricket-scoreboard/config_schema.json
  • plugins/cricket-scoreboard/cricket_data_fetcher.py
  • plugins/cricket-scoreboard/cricket_renderer.py
  • plugins/cricket-scoreboard/logo_downloader.py
  • plugins/cricket-scoreboard/manager.py
  • plugins/cricket-scoreboard/manifest.json
  • plugins/cricket-scoreboard/requirements.txt
  • plugins/cricket-scoreboard/test/harness.json
  • plugins/cricket-scoreboard/test_cricket_plugin.py

Comment thread plugins/cricket-scoreboard/config_schema.json
Comment thread plugins/cricket-scoreboard/cricket_data_fetcher.py
Comment thread plugins/cricket-scoreboard/cricket_data_fetcher.py
Comment thread plugins/cricket-scoreboard/cricket_data_fetcher.py Outdated
Comment thread plugins/cricket-scoreboard/cricket_logo_downloader.py
Comment thread plugins/cricket-scoreboard/cricket_logo_downloader.py Outdated
Comment thread plugins/cricket-scoreboard/manager.py
- Require non-empty favorite_teams entries in config schema
- Reject negative overs in overs_to_balls
- Validate ESPN JSON response is a dict before returning from _get_json
- Scope the series discovery cache key by favorite_teams/favorite_competitions
- Rename logo_downloader.py -> cricket_logo_downloader.py to avoid
  cross-plugin module collisions (deferred import from manager.py)
- Require HTTPS logo URLs and sanitize team abbreviations before building
  logo file paths to prevent SSRF/path traversal
- Preserve the update lock across on_config_change instead of replacing it
  via self.__init__(), which broke mutual exclusion with in-flight
  update()/display() calls

Bump version to 1.0.1.
- Drop the http:// adapter mount in LogoDownloader's session now that
  download_missing_logo only ever requests HTTPS logo URLs (fixes the
  CWE-319 cleartext-transmission finding)
- Fix implicit-Optional type annotation on download_missing_logo's
  logo_url parameter (PEP 484 / Ruff RUF013)

Bump version to 1.0.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants