From 497dbc2b09660252e286f9f9956e7ea54e8288b2 Mon Sep 17 00:00:00 2001 From: baliasnyifeliks Date: Tue, 13 Jan 2026 11:31:12 +0200 Subject: [PATCH] fix(media): handle stream URL transformation for proxy URLs The change ensures that when a stream URL is returned from the proxy, it is properly transformed using accsArgs if it starts with the proxy path. This fixes an issue where proxy URLs were not being processed correctly before redirection. --- CikavaIdeya/Controller.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CikavaIdeya/Controller.cs b/CikavaIdeya/Controller.cs index f9206c5..68a6b98 100644 --- a/CikavaIdeya/Controller.cs +++ b/CikavaIdeya/Controller.cs @@ -67,7 +67,13 @@ namespace CikavaIdeya.Controllers forceProxy = true; } - string streamUrl = HostStreamProxy(init, accsArgs(streamLink), headers: streamHeaders, force_streamproxy: forceProxy); + string streamUrl = HostStreamProxy(init, streamLink, headers: streamHeaders, force_streamproxy: forceProxy); + if (!string.IsNullOrEmpty(streamUrl) && + streamUrl.StartsWith($"{host}/proxy/", StringComparison.OrdinalIgnoreCase)) + { + streamUrl = accsArgs(streamUrl); + } + OnLog($"Controller: redirecting to stream URL: {streamUrl}"); return Redirect(streamUrl); }