aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Formatters/CssOutputFormatter.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-01-19 10:09:32 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-01-19 10:09:32 +0100
commit656a0bff6fd48ba66cfe8fc7b470380c38afbac2 (patch)
treea89f0545050bf6672936c6e7ea3e2b0e5c5561f2 /Jellyfin.Server/Formatters/CssOutputFormatter.cs
parentef085483b2ef54195e16f282330a3c204e3227b6 (diff)
parentd57dcf22452db4990aa2cdece3eb798ba98b8330 (diff)
Merge remote-tracking branch 'upstream/master' into network-rewrite
Diffstat (limited to 'Jellyfin.Server/Formatters/CssOutputFormatter.cs')
-rw-r--r--Jellyfin.Server/Formatters/CssOutputFormatter.cs36
1 files changed, 0 insertions, 36 deletions
diff --git a/Jellyfin.Server/Formatters/CssOutputFormatter.cs b/Jellyfin.Server/Formatters/CssOutputFormatter.cs
deleted file mode 100644
index fdaa48f84..000000000
--- a/Jellyfin.Server/Formatters/CssOutputFormatter.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc.Formatters;
-
-namespace Jellyfin.Server.Formatters
-{
- /// <summary>
- /// Css output formatter.
- /// </summary>
- public class CssOutputFormatter : TextOutputFormatter
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="CssOutputFormatter"/> class.
- /// </summary>
- public CssOutputFormatter()
- {
- SupportedMediaTypes.Add("text/css");
-
- SupportedEncodings.Add(Encoding.UTF8);
- SupportedEncodings.Add(Encoding.Unicode);
- }
-
- /// <summary>
- /// Write context object to stream.
- /// </summary>
- /// <param name="context">Writer context.</param>
- /// <param name="selectedEncoding">Unused. Writer encoding.</param>
- /// <returns>Write stream task.</returns>
- public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
- {
- var stringResponse = context.Object?.ToString();
- return stringResponse is null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse);
- }
- }
-}