aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server')
-rw-r--r--Jellyfin.Server/Properties/AssemblyInfo.cs21
-rw-r--r--Jellyfin.Server/SocketSharp/RequestMono.cs8
-rw-r--r--Jellyfin.Server/SocketSharp/SharpWebSocket.cs4
-rw-r--r--Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs3
-rw-r--r--Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs4
5 files changed, 31 insertions, 9 deletions
diff --git a/Jellyfin.Server/Properties/AssemblyInfo.cs b/Jellyfin.Server/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..1934b6bc1
--- /dev/null
+++ b/Jellyfin.Server/Properties/AssemblyInfo.cs
@@ -0,0 +1,21 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Jellyfin.Server")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Jellyfin Project")]
+[assembly: AssemblyProduct("Jellyfin: The Free Software Media System")]
+[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License Version 2")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
diff --git a/Jellyfin.Server/SocketSharp/RequestMono.cs b/Jellyfin.Server/SocketSharp/RequestMono.cs
index 81ccef550..4c3d8d1d5 100644
--- a/Jellyfin.Server/SocketSharp/RequestMono.cs
+++ b/Jellyfin.Server/SocketSharp/RequestMono.cs
@@ -138,7 +138,7 @@ namespace Jellyfin.SocketSharp
if (v.Length > 20)
v = v.Substring(0, 16) + "...\"";
- string msg = String.Format("A potentially dangerous Request.{0} value was " +
+ string msg = string.Format("A potentially dangerous Request.{0} value was " +
"detected from the client ({1}={2}).", name, key, v);
throw new Exception(msg);
@@ -328,13 +328,13 @@ namespace Jellyfin.SocketSharp
public override int Read(byte[] buffer, int dest_offset, int count)
{
if (buffer == null)
- throw new ArgumentNullException("buffer");
+ throw new ArgumentNullException(nameof(buffer));
if (dest_offset < 0)
- throw new ArgumentOutOfRangeException("dest_offset", "< 0");
+ throw new ArgumentOutOfRangeException(nameof(dest_offset), "< 0");
if (count < 0)
- throw new ArgumentOutOfRangeException("count", "< 0");
+ throw new ArgumentOutOfRangeException(nameof(count), "< 0");
int len = buffer.Length;
if (dest_offset > len)
diff --git a/Jellyfin.Server/SocketSharp/SharpWebSocket.cs b/Jellyfin.Server/SocketSharp/SharpWebSocket.cs
index 77de50267..7101f83d9 100644
--- a/Jellyfin.Server/SocketSharp/SharpWebSocket.cs
+++ b/Jellyfin.Server/SocketSharp/SharpWebSocket.cs
@@ -29,12 +29,12 @@ namespace Jellyfin.SocketSharp
{
if (socket == null)
{
- throw new ArgumentNullException("socket");
+ throw new ArgumentNullException(nameof(socket));
}
if (logger == null)
{
- throw new ArgumentNullException("logger");
+ throw new ArgumentNullException(nameof(logger));
}
_logger = logger;
diff --git a/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs b/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs
index c360a8fce..468c4c5ca 100644
--- a/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs
+++ b/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
@@ -202,6 +202,7 @@ namespace Jellyfin.SocketSharp
}
catch (ObjectDisposedException)
{
+ //TODO Investigate and properly fix.
}
catch (Exception ex)
{
diff --git a/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs b/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs
index 7c9dc8f88..149842bd4 100644
--- a/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs
+++ b/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs
@@ -82,7 +82,7 @@ namespace Jellyfin.SocketSharp
{
get
{
- return String.IsNullOrEmpty(request.Headers["X-Forwarded-For"]) ? null : request.Headers["X-Forwarded-For"];
+ return string.IsNullOrEmpty(request.Headers["X-Forwarded-For"]) ? null : request.Headers["X-Forwarded-For"];
}
}
@@ -106,7 +106,7 @@ namespace Jellyfin.SocketSharp
{
get
{
- return String.IsNullOrEmpty(request.Headers["X-Real-IP"]) ? null : request.Headers["X-Real-IP"];
+ return string.IsNullOrEmpty(request.Headers["X-Real-IP"]) ? null : request.Headers["X-Real-IP"];
}
}