aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/HlsHelpers.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-13 11:14:44 -0700
committercrobibero <cody@robibe.ro>2020-11-13 11:14:44 -0700
commit5f52a58e785fa4ae06fa07a93b81c1e7547ac9f3 (patch)
tree68466ae2c11051e631a4cf06a43cf14da1f4d756 /Jellyfin.Api/Helpers/HlsHelpers.cs
parentbe312f992d92433e3e7619e264889d1a0afadf26 (diff)
Convert NullReferenceException to ResourceNotFoundException
Diffstat (limited to 'Jellyfin.Api/Helpers/HlsHelpers.cs')
-rw-r--r--Jellyfin.Api/Helpers/HlsHelpers.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/HlsHelpers.cs b/Jellyfin.Api/Helpers/HlsHelpers.cs
index 16fbac7ae..707d1cd10 100644
--- a/Jellyfin.Api/Helpers/HlsHelpers.cs
+++ b/Jellyfin.Api/Helpers/HlsHelpers.cs
@@ -3,6 +3,7 @@ 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;
@@ -47,7 +48,7 @@ namespace Jellyfin.Api.Helpers
var line = await reader.ReadLineAsync().ConfigureAwait(false);
if (line == null)
{
- throw new NullReferenceException(nameof(line));
+ throw new ResourceNotFoundException(nameof(line));
}
if (line.IndexOf("#EXTINF:", StringComparison.OrdinalIgnoreCase) != -1)