aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/VideosController.cs
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2021-09-10 11:54:26 +0200
committercvium <clausvium@gmail.com>2021-09-10 11:54:26 +0200
commit026a7af0e8cc15f889ba94079c8bc9566a74d505 (patch)
treeb2044214de9b5bdd929b264fc4975c65d639254d /Jellyfin.Api/Controllers/VideosController.cs
parent1a5a74d2a95506249cf071c659e3c6cf01f28f78 (diff)
Don't throw when livestream file isn't found
Diffstat (limited to 'Jellyfin.Api/Controllers/VideosController.cs')
-rw-r--r--Jellyfin.Api/Controllers/VideosController.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/VideosController.cs b/Jellyfin.Api/Controllers/VideosController.cs
index d7d48ba3e..e5c27f9e6 100644
--- a/Jellyfin.Api/Controllers/VideosController.cs
+++ b/Jellyfin.Api/Controllers/VideosController.cs
@@ -454,6 +454,10 @@ namespace Jellyfin.Api.Controllers
StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, startTimeTicks, Request, _dlnaManager);
var liveStreamInfo = _mediaSourceManager.GetLiveStreamInfo(streamingRequest.LiveStreamId);
+ if (liveStreamInfo == null)
+ {
+ return NotFound();
+ }
var liveStream = new ProgressiveFileStream(liveStreamInfo.GetStream());
// TODO (moved from MediaBrowser.Api): Don't hardcode contentType
return File(liveStream, MimeTypes.GetMimeType("file.ts")!);