aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/HlsHelpers.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-13 18:04:06 -0700
committercrobibero <cody@robibe.ro>2020-11-13 18:04:06 -0700
commit73d2cb1c2a3a7cd1a30840a2b52921a3b81c6809 (patch)
tree922229602e0dbff30c371e70ed16512fb27eaa1e /Jellyfin.Api/Helpers/HlsHelpers.cs
parent24ac5cc353dd5b9930d43a5659d97037644fa58a (diff)
Updated based on review feedback
Diffstat (limited to 'Jellyfin.Api/Helpers/HlsHelpers.cs')
-rw-r--r--Jellyfin.Api/Helpers/HlsHelpers.cs9
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)
{