Merge pull request #17298 from WizardOfYendor1/fix/livetv-published-stream-urls

Fix Live TV returning unreachable "server-local" streaming URLs to clients.
This commit is contained in:
Cody Robibero
2026-08-02 14:23:49 -04:00
committed by GitHub
8 changed files with 845 additions and 46 deletions
@@ -987,8 +987,9 @@ namespace Emby.Server.Implementations
/// <inheritdoc/>
public string GetLocalApiUrl(string hostname, string scheme = null, int? port = null)
{
// If the smartAPI doesn't start with http then treat it as a host or ip.
if (hostname.StartsWith("http", StringComparison.OrdinalIgnoreCase))
// If the smartAPI isn't already a complete URL then treat it as a host or ip.
if (hostname.StartsWith("http://", StringComparison.OrdinalIgnoreCase)
|| hostname.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
{
return hostname.TrimEnd('/');
}