feat: add static icy-name headers to R357 proxy response

This commit is contained in:
2026-09-18 23:26:19 +02:00
parent 5c96820d6d
commit 8af2e6aa64
+8 -1
View File
@@ -661,8 +661,15 @@ def live_stream_redirect(station: str, request: Request, db: Session = Depends(d
if station == "radio357": if station == "radio357":
config_url = db.query(Config).filter_by(key="r357_live_url").first() config_url = db.query(Config).filter_by(key="r357_live_url").first()
target_url = config_url.value if config_url else "https://stream.rcs.revma.com/ye5kghkgcm0uv" target_url = config_url.value if config_url else "https://stream.rcs.revma.com/ye5kghkgcm0uv"
# Statyczne metadane nagłówkowe dla Mopidy (ponieważ FFmpeg gubi te dynamiczne wbudowane w strumień)
resp_headers = {
"icy-name": "Radio 357",
"icy-description": "RadioSync Proxy (AAC to MP3 Transcode)"
}
# Proxy + Transkodowanie AAC -> MP3 w locie! # Proxy + Transkodowanie AAC -> MP3 w locie!
return StreamingResponse(iter_stream_transcode(target_url), media_type="audio/mpeg") return StreamingResponse(iter_stream_transcode(target_url), media_type="audio/mpeg", headers=resp_headers)
elif station == "rns": elif station == "rns":
config_url = db.query(Config).filter_by(key="rns_live_url").first() config_url = db.query(Config).filter_by(key="rns_live_url").first()