aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-13 09:04:31 -0700
committercrobibero <cody@robibe.ro>2020-11-13 09:04:31 -0700
commit01355e049855a21b69e7e258599c3fa35965375a (patch)
tree3335a82c2fb40203ccdea697e00a0cafd3dc4ed3 /Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
parente8675a6c24ebb86ce4a48f208f439f42267bf8e6 (diff)
Fix nullability errors in Jellyfin.Api (part 1)
Diffstat (limited to 'Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs')
-rw-r--r--Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs b/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
index 366301d3e..20c94cdda 100644
--- a/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
+++ b/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
@@ -37,8 +37,8 @@ namespace Jellyfin.Api.Helpers
}
// Can't dispose the response as it's required up the call chain.
- var response = await httpClient.GetAsync(state.MediaPath).ConfigureAwait(false);
- var contentType = response.Content.Headers.ContentType.ToString();
+ var response = await httpClient.GetAsync(new Uri(state.MediaPath)).ConfigureAwait(false);
+ var contentType = response.Content.Headers.ContentType?.ToString();
httpContext.Response.Headers[HeaderNames.AcceptRanges] = "none";