diff --git a/YoutubeExplode/Videos/Streams/StreamClient.cs b/YoutubeExplode/Videos/Streams/StreamClient.cs index 634dadd5..65f71784 100644 --- a/YoutubeExplode/Videos/Streams/StreamClient.cs +++ b/YoutubeExplode/Videos/Streams/StreamClient.cs @@ -113,8 +113,7 @@ private async IAsyncEnumerable GetStreamInfosAsync( } var contentLength = await TryGetContentLengthAsync(streamData, url, cancellationToken); - if (contentLength is null) - continue; + var fileSize = contentLength is null ? new FileSize() : new FileSize(contentLength.Value); var container = streamData.Container?.Pipe(s => new Container(s)) @@ -151,7 +150,7 @@ streamData.VideoWidth is not null && streamData.VideoHeight is not null var streamInfo = new MuxedStreamInfo( url, container, - new FileSize(contentLength.Value), + fileSize, bitrate, streamData.AudioCodec, audioLanguage, @@ -169,7 +168,7 @@ streamData.VideoWidth is not null && streamData.VideoHeight is not null var streamInfo = new VideoOnlyStreamInfo( url, container, - new FileSize(contentLength.Value), + fileSize, bitrate, streamData.VideoCodec, videoQuality, @@ -185,7 +184,7 @@ streamData.VideoWidth is not null && streamData.VideoHeight is not null var streamInfo = new AudioOnlyStreamInfo( url, container, - new FileSize(contentLength.Value), + fileSize, bitrate, streamData.AudioCodec, audioLanguage,