Always fallback for failed HEAD request

TV Tuners have basically unpredictable behaviors on HEAD requests, and we cannot fail and try all potential code it returns. Just fallback to check for extension for all HEAD request that appears to be failed.

Signed-off-by: gnattu <gnattuoc@me.com>
pull/11668/head
gnattu 2 weeks ago
parent 3f760e6685
commit f5a9274d1a

@ -123,7 +123,7 @@ namespace Jellyfin.LiveTv.TunerHosts
return new SharedHttpStream(mediaSource, tunerHost, streamId, FileSystem, _httpClientFactory, Logger, Config, _appHost, _streamHelper);
}
}
else if (response.StatusCode == HttpStatusCode.MethodNotAllowed || response.StatusCode == HttpStatusCode.NotImplemented)
else
{
// Fallback to check path extension when the server does not support HEAD method
// Use UriBuilder to remove all query string as GetExtension will include them when used directly
@ -133,10 +133,6 @@ namespace Jellyfin.LiveTv.TunerHosts
return new SharedHttpStream(mediaSource, tunerHost, streamId, FileSystem, _httpClientFactory, Logger, Config, _appHost, _streamHelper);
}
}
else
{
response.EnsureSuccessStatusCode();
}
}
return new LiveStream(mediaSource, tunerHost, FileSystem, Logger, Config, _streamHelper);

Loading…
Cancel
Save