aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Filters/FileResponseFilter.cs
diff options
context:
space:
mode:
authornyanmisaka <nst799610810@gmail.com>2020-11-16 12:36:55 +0800
committernyanmisaka <nst799610810@gmail.com>2020-11-16 12:36:55 +0800
commit488dbdb31d904ae9eb9b016f0edbb66e734b65f1 (patch)
tree310c3f8e90e3fa5001c91999298478ff40e4bd93 /Jellyfin.Server/Filters/FileResponseFilter.cs
parentf953dd42be87b5188d476f8c8c8c7d39cd395c73 (diff)
parent8d1d77db94a4fcfc6d8a37b38100ce0b7267690b (diff)
Merge remote-tracking branch 'upstream/master' into fmp4-hls
Diffstat (limited to 'Jellyfin.Server/Filters/FileResponseFilter.cs')
-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;