aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Filters
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-13 09:21:28 -0700
committercrobibero <cody@robibe.ro>2020-11-13 09:21:28 -0700
commit6353cb507d591d5060c00d925f4e1ac6fc7a6916 (patch)
tree5c6aa8842413d9f30e1eba00154b2389848cc7e1 /Jellyfin.Server/Filters
parent445eec7f5f8710179a425b3b6afa3d4d54ce03da (diff)
Fix nullability errors in Jellyfin.Server
Diffstat (limited to 'Jellyfin.Server/Filters')
-rw-r--r--Jellyfin.Server/Filters/FileResponseFilter.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Jellyfin.Server/Filters/FileResponseFilter.cs b/Jellyfin.Server/Filters/FileResponseFilter.cs
index 8ea35c281..7ad9466c1 100644
--- a/Jellyfin.Server/Filters/FileResponseFilter.cs
+++ b/Jellyfin.Server/Filters/FileResponseFilter.cs
@@ -26,22 +26,22 @@ namespace Jellyfin.Server.Filters
if (attribute is ProducesFileAttribute producesFileAttribute)
{
// Get operation response values.
- var (_, value) = operation.Responses
+ var response = operation.Responses
.FirstOrDefault(o => o.Key.Equals(SuccessCode, StringComparison.Ordinal));
// Operation doesn't have a response.
- if (value == null)
+ if (response.Value == null)
{
continue;
}
// Clear existing responses.
- value.Content.Clear();
+ response.Value.Content.Clear();
// Add all content-types as file.
foreach (var contentType in producesFileAttribute.GetContentTypes())
{
- value.Content.Add(contentType, _openApiMediaType);
+ response.Value.Content.Add(contentType, _openApiMediaType);
}
break;