Commit Graph
5 Commits
Author SHA1 Message Date
jschoubben 6474e109f1 Add 1920x1080 session thumbs with track overlay + episode YAML entries
posters_service:
- Standard / sprint episode-index → (label, slug) maps mirroring Kometa's
  F1 builder numbering
- _fetch_map_landscape: aerial tile stitcher in 1920x1080
- render_session_thumb: GP aerial bg + projected track outline + GP name
  + session label with red accent bar
- _draw_track_projected now takes canvas_w / geo_center_y so it can be
  reused for both 2:3 posters and 16:9 thumbs
- render_kometa_metadata now emits an episodes: block per Plex season
  pointing every Kometa-numbered episode at the matching session thumb;
  sprint vs standard format is detected from the Jolpica race entry

cdn-api:
- GET /posters/session/{name}/{year}/{slug}.png returns the thumb
2026-06-15 02:28:03 +02:00
jschoubben 9430d499cc Map backgrounds (aerial/osm/dark/light), bbox zoom, world locator, kometa YAML endpoint
posters_service:
- BackgroundStyle enum + tile stitcher for race posters
  (Esri aerial / OSM Carto / CartoDB dark / CartoDB light / none)
- _resolve_circuit_geo: GeoJSON bbox centre + auto-zoom (no hand tuning),
  falls back to Jolpica lat/lon + f1-locations.json zoom
- _draw_track_projected: project the layout's GeoJSON points into the
  same window as the tile background, so the white outline aligns with
  the actual track (the hand-drawn SVGs had arbitrary orientations)
- _render_world_locator: 140x140 CartoDB Dark inset at zoom 5 with a
  red marker pinning the circuit on the continent
- _race_dark_overlay: dimming so the heading + footer stay legible
  against any underlying tiles
- render_kometa_metadata: emits a Kometa-compatible YAML covering
  every season 1950..current+1 with per-show + per-round url_poster

cdn-api:
- GET /posters/race/{name}/{year}.png supports ?bg= query param
- GET /kometa/formula-1-metadata.yml serves the generated config so
  Kometa pulls it via metadata_files.url (auto-updates with schedule)
2026-06-14 17:42:02 +02:00
jschoubben 847ae2bae1 Add Plex-ready race + season poster endpoints
GET /posters/race/{grand_prix_name}/{season}.png
GET /posters/season/{season}.png

1000x1500 PNGs composed with Pillow + cairosvg:
checkered-flag strips top/bottom, F1 wordmark, round/year ribbon,
GP name, rasterised track outline (white), race date. Season poster
is wordmark + giant year + 'WORLD CHAMPIONSHIP'. Cached under
cache/posters/ so cold renders happen once.
2026-06-13 20:57:28 +02:00
jschoubben 83311a6079 Fix circular reference recursion in JSON serialization
Dataclass models have parent back-references (TrackLayout→Circuit→
Locality→Country) causing infinite recursion in dataclasses.asdict().
Add to_dict() methods that exclude parent refs, use them in API endpoints.
2026-05-08 03:01:42 +02:00
jschoubben c94ebcfb22 Add all local circuit work — year-by-year SVGs and tooling 2026-03-25 22:17:47 +01:00