mirror of
https://github.com/rommapp/romm.git
synced 2026-07-01 08:16:21 +00:00
The /stats endpoint is called on both the homepage and the server stats page, but only the stats page displays metadata coverage and region breakdown. Add an `include_platform_stats` query param (default false) so the homepage avoids the expensive per-platform queries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
454 B
Python
23 lines
454 B
Python
from typing import TypedDict
|
|
|
|
|
|
class MetadataCoverageItem(TypedDict):
|
|
source: str
|
|
matched: int
|
|
|
|
|
|
class RegionBreakdownItem(TypedDict):
|
|
region: str
|
|
count: int
|
|
|
|
|
|
class StatsReturn(TypedDict, total=False):
|
|
PLATFORMS: int
|
|
ROMS: int
|
|
SAVES: int
|
|
STATES: int
|
|
SCREENSHOTS: int
|
|
TOTAL_FILESIZE_BYTES: int
|
|
METADATA_COVERAGE: dict[int, list[MetadataCoverageItem]]
|
|
REGION_BREAKDOWN: dict[int, list[RegionBreakdownItem]]
|