diff options
| author | crobibero <cody@robibe.ro> | 2020-11-13 18:04:06 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-13 18:04:06 -0700 |
| commit | 73d2cb1c2a3a7cd1a30840a2b52921a3b81c6809 (patch) | |
| tree | 922229602e0dbff30c371e70ed16512fb27eaa1e /Jellyfin.Api/Helpers/HlsHelpers.cs | |
| parent | 24ac5cc353dd5b9930d43a5659d97037644fa58a (diff) | |
Updated based on review feedback
Diffstat (limited to 'Jellyfin.Api/Helpers/HlsHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/HlsHelpers.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Jellyfin.Api/Helpers/HlsHelpers.cs b/Jellyfin.Api/Helpers/HlsHelpers.cs index bcf0da319..7fd784806 100644 --- a/Jellyfin.Api/Helpers/HlsHelpers.cs +++ b/Jellyfin.Api/Helpers/HlsHelpers.cs @@ -3,7 +3,6 @@ using System.Globalization; using System.IO; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Common.Extensions; using MediaBrowser.Model.IO; using Microsoft.Extensions.Logging; @@ -45,8 +44,12 @@ namespace Jellyfin.Api.Helpers while (!reader.EndOfStream) { - var line = await reader.ReadLineAsync().ConfigureAwait(false) - ?? throw new ResourceNotFoundException(nameof(reader)); + var line = await reader.ReadLineAsync().ConfigureAwait(false); + if (line == null) + { + // Nothing currently in buffer. + continue; + } if (line.IndexOf("#EXTINF:", StringComparison.OrdinalIgnoreCase) != -1) { |
