Improve remote source detection for HTTP streams in M3U tuner

HTTP/HTTPS streams are now considered remote unless explicitly localhost,
rather than relying on local network detection. This ensures proper handling
of streams that appear to be in the local network but should be treated as remote sources.
This commit is contained in:
mani
2026-01-05 18:52:48 +01:00
parent 1e27f460fe
commit 49beabce9e

View File

@@ -153,7 +153,15 @@ namespace Jellyfin.LiveTv.TunerHosts
var isRemote = true;
if (Uri.TryCreate(path, UriKind.Absolute, out var uri))
{
isRemote = !_networkManager.IsInLocalNetwork(uri.Host);
// For HTTP/HTTPS streams, always consider them remote unless explicitly localhost
if (protocol == MediaProtocol.Http)
{
isRemote = !uri.IsLoopback;
}
else
{
isRemote = !_networkManager.IsInLocalNetwork(uri.Host);
}
}
var httpHeaders = new Dictionary<string, string>();