feat: support file extensions in live stream URLs to bypass mopidy unwrapper timeout

This commit is contained in:
2026-09-18 22:50:12 +02:00
parent 4120739cce
commit 4dada6c3b1
+6
View File
@@ -614,6 +614,12 @@ def podcast_rss(station: str, slug_with_ext: str, request: Request, db: Session
@app.get("/live/{station}")
def live_stream_redirect(station: str, db: Session = Depends(db_session)):
# Usuwamy sztuczne rozszerzenia dodane dla Mopidy
if station.endswith(".aac"):
station = station[:-4]
elif station.endswith(".mp3"):
station = station[:-4]
if station == "radio357":
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"