Use GetAsync to get headers for stream type check

This commit is contained in:
joshjryan 2024-10-05 13:41:17 -06:00
parent b5d89a67e8
commit b6e37d2d74

View file

@ -102,9 +102,8 @@ namespace Jellyfin.LiveTv.TunerHosts
{
try
{
using var message = new HttpRequestMessage(HttpMethod.Head, mediaSource.Path);
using var response = await _httpClientFactory.CreateClient(NamedClient.Default)
.SendAsync(message, cancellationToken)
.GetAsync(mediaSource.Path, HttpCompletionOption.ResponseHeadersRead, cancellationToken)
.ConfigureAwait(false);
if (response.IsSuccessStatusCode)