f1-stream: add real F1 stream extractors and iframe player support

Add three new extractors (Streamed.pk, DaddyLive, Aceztrims) for live
F1 streams. Extend ExtractedStream model with stream_type/embed_url
fields, skip health checks for embed streams, fix broken Akamai demo
stream, add variant playlist validation, and add iframe player support
in the frontend for embed-type streams.
This commit is contained in:
Viktor Barzin 2026-03-01 14:35:19 +00:00
parent 78c0956ab5
commit 51b8081594
9 changed files with 614 additions and 25 deletions

View file

@ -45,18 +45,29 @@ class ExtractionService:
# Run health checks on all extracted streams
if streams:
stream_dicts = [s.to_dict() for s in streams]
health_map = await self._health_checker.check_all(stream_dicts)
# Separate m3u8 streams (need health check) from embed streams (skip)
m3u8_streams = [s for s in streams if s.stream_type != "embed"]
embed_streams = [s for s in streams if s.stream_type == "embed"]
# Update stream objects with health check results
for stream in streams:
health = health_map.get(stream.url)
if health:
stream.is_live = health.is_live
stream.response_time_ms = health.response_time_ms
stream.checked_at = health.checked_at
if health.bitrate > 0:
stream.bitrate = health.bitrate
# Mark embed streams as live (no health check possible for iframes)
for stream in embed_streams:
stream.is_live = True
stream.response_time_ms = 0
stream.checked_at = start.isoformat()
# Health-check only m3u8 streams
if m3u8_streams:
stream_dicts = [s.to_dict() for s in m3u8_streams]
health_map = await self._health_checker.check_all(stream_dicts)
for stream in m3u8_streams:
health = health_map.get(stream.url)
if health:
stream.is_live = health.is_live
stream.response_time_ms = health.response_time_ms
stream.checked_at = health.checked_at
if health.bitrate > 0:
stream.bitrate = health.bitrate
# Group streams by site_key and update cache
new_cache: dict[str, list[ExtractedStream]] = {}