From 4dada6c3b12a509d4099a5209dc7a8114bb765b3 Mon Sep 17 00:00:00 2001 From: Karol Labus Date: Fri, 18 Sep 2026 22:50:12 +0200 Subject: [PATCH] feat: support file extensions in live stream URLs to bypass mopidy unwrapper timeout --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index ccaf860..e8a0d16 100644 --- a/main.py +++ b/main.py @@ -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"