aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond_009 <Bond.009@outlook.com>2020-07-22 13:52:31 +0200
committerBond_009 <Bond.009@outlook.com>2020-07-22 13:52:31 +0200
commita23292f363c0bae2e9d4dbbf1359234feedd3799 (patch)
treea0287e4e9473195c42194975a197ed83bf18ef62
parentfebb6bced6d2eb0941ed30205558ff8cf045720b (diff)
Address comments
-rw-r--r--Emby.Server.Implementations/Services/ServiceExec.cs3
-rw-r--r--Emby.Server.Implementations/Services/ServiceHandler.cs5
2 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceExec.cs b/Emby.Server.Implementations/Services/ServiceExec.cs
index 947a5cbf8..7b970627e 100644
--- a/Emby.Server.Implementations/Services/ServiceExec.cs
+++ b/Emby.Server.Implementations/Services/ServiceExec.cs
@@ -111,7 +111,8 @@ namespace Emby.Server.Implementations.Services
CultureInfo.InvariantCulture,
"Could not find method named {1}({0}) or Any({0}) on Service {2}",
requestDto.GetType().GetMethodName(),
- expectedMethodName, serviceType.GetMethodName()));
+ expectedMethodName,
+ serviceType.GetMethodName()));
}
private static async Task<object> GetTaskResult(Task task)
diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.cs
index e63a80cee..e758cdd4d 100644
--- a/Emby.Server.Implementations/Services/ServiceHandler.cs
+++ b/Emby.Server.Implementations/Services/ServiceHandler.cs
@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
+using System.Net.Mime;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
@@ -59,11 +60,11 @@ namespace Emby.Server.Implementations.Services
{
if (format.Equals("json", StringComparison.Ordinal))
{
- return "application/json";
+ return MediaTypeNames.Application.Json;
}
else if (format.Equals("xml", StringComparison.Ordinal))
{
- return "application/xml";
+ return MediaTypeNames.Application.Xml;
}
return null;