- Python 78.8%
- TypeScript 19.2%
- CSS 1.7%
- HTML 0.1%
- Dockerfile 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
publish-image / Build the one container (linux/amd64), e2e inside it, push it to the registry (push) Successful in 56s
|
||
| .gitea/workflows | ||
| backend | ||
| brand | ||
| docs | ||
| frontend | ||
| openspec | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| AGENTS.md | ||
| BACKLOG.md | ||
| docker-compose.novpn.yml | ||
| docker-compose.vpn.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Live sports as channels for your media server. Sports Breaker lists the day's games, finds a stream for each one on the free streaming hubs, checks that it really plays, and serves the ready games to Emby, Jellyfin or Plex as a channel list with a program guide. A small web app shows what is ready, which teams you follow, and has an admin panel to show what the backend is doing.
It is built for one home network and has no login, so keep its port off the internet.
Deploy
One container for the app and one for a Cloudflare solver, which reads the hubs' pages for it. Run docker compose up -d with this file, or paste it into Portainer as a stack:
services:
sports-breaker:
image: forgejo.underthere.xyz/cmoriarty/sports-breaker:latest # or build: .
restart: unless-stopped
stop_grace_period: 20s
ports:
- "7000:8000"
environment:
CLOUDFLARE_SOLVER_URL: http://flaresolverr:8191 # or http://byparr:8191
volumes:
- data:/app/data
- recordings:/app/recordings
flaresolverr:
image: ghcr.io/flaresolverr/flaresolverr:latest
restart: unless-stopped
byparr: # a drop-in alternative to FlareSolverr; the app talks to one of the two
image: ghcr.io/thephaseless/byparr:latest
restart: unless-stopped
volumes:
data:
recordings:
Then:
- Open
http://<host>:7000for the web app: the Games page, the Watchlist page and the Admin page. - In Emby or Jellyfin, add an M3U tuner at
http://<host>:7000/playlist.m3u?ready=1and an XMLTV guide athttp://<host>:7000/guide.xml?ready=1. Withready=1only games with a verified stream are listed; addart=portraitfor tall channel posters. - Plex has no M3U tuner. Run Threadfin, which reads those two URLs and presents them to Plex as an HDHomeRun tuner on port 34400; add it in Plex's Live TV & DVR setup with the guide URL as the XMLTV source. Plex Pass is required, and the guide-refresh nudge below reaches Emby and Jellyfin only. Reported to work; not tested here.
- To have the server's channels follow the lineup within a minute instead of at its daily refresh, set
EMBY_URL+EMBY_API_KEYand/orJELLYFIN_URL+JELLYFIN_API_KEY(an API key from the server's dashboard): the app then starts the server's own Refresh Guide task whenever the ready lineup changes, at most once every two minutes.
docker-compose.vpn.yml runs the same app behind a VPN: gluetun owns the network, the app and the solver run inside it, and the VPN credentials come from the stack's environment. Swap it in as docker-compose.yml, the file Portainer deploys, to use it.
Every push to main builds the image in CI, so pulling latest is the upgrade. The game list comes from ESPN's scoreboard; SCOREBOARD_BASE_URL points it at another feed.
Sports and coverage
The Watchlist tab's "On the Games tab" panel chooses which sports and leagues are listed. A sport's box switches every league under it; open a sport to pick leagues one by one. A sport left on "all" takes in a league added later, one with a picked list does not, and a newly added sport starts off. A game in a league that is off still appears when you follow one of its teams or its league. The choice is kept on the server (leagues.json in the data folder), so every browser sees the same list.
Streams are checked only for the teams and leagues you follow. How many games get one depends on the league:
- Most games covered: NFL, NBA, MLB, NHL, college football, men's college basketball and the major soccer competitions, which the free hubs list game by game.
- Few games covered: women's college basketball. The hubs list few of its games, and most air on ESPN+ and conference channels that none of them carry. Expect a followed women's game to show no stream more often than not.
Run it bare (no Docker)
With Python 3.12, Node 22 and ffmpeg installed, make install then make run serves the same app on port 8000. ffmpeg measures the streams and records them.
Built with
Thanks to the projects this app is made of:
- FastAPI, Uvicorn, httpx and Playwright, on Python 3.12
- React, Vite, TypeScript and hls.js
- FlareSolverr and Byparr, for the Cloudflare challenges
- FFmpeg, for measuring and recording streams, and Pillow, for the channel art
- The Archivo and Big Shoulders Display typefaces, via Fontsource
- ESPN's public scoreboard, for the game list
- pytest, Vitest and OpenSpec, for the tests and the specs
License
MIT.