Skip to content

Commit

Permalink
Forgot to set contentLength
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Jan 2, 2024
1 parent 416c3ab commit b8bd927
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions YoutubeExplode/Videos/Streams/StreamClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ CancellationToken cancellationToken
if (contentLength is null)
{
using var response = await _http.HeadAsync(url, cancellationToken);
contentLength = response.Content.Headers.ContentLength;

// 404 error indicates that the stream is not available
if (response.StatusCode == HttpStatusCode.NotFound)
Expand Down

0 comments on commit b8bd927

Please sign in to comment.