diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-01-16 19:10:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-16 19:10:42 +0100 |
| commit | 900dc851e6c810f9e1772a6fb901a5a7e2801baf (patch) | |
| tree | 205bac3cd6df971ee18739e59bd4da0ffe91718b /MediaBrowser.Model/Net | |
| parent | 07a8e49c4b1e4a2dddbaa49ab6f1ff4f271fbf20 (diff) | |
| parent | 933ef438894ed233fec46badf58dd4f26492e832 (diff) | |
Merge branch 'dev' into cleanup
Diffstat (limited to 'MediaBrowser.Model/Net')
| -rw-r--r-- | MediaBrowser.Model/Net/HttpException.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/ISocketFactory.cs | 15 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/IpAddressInfo.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/MimeTypes.cs | 16 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/SocketReceiveResult.cs | 18 |
5 files changed, 28 insertions, 25 deletions
diff --git a/MediaBrowser.Model/Net/HttpException.cs b/MediaBrowser.Model/Net/HttpException.cs index 698b1bc7e1..2f45299e38 100644 --- a/MediaBrowser.Model/Net/HttpException.cs +++ b/MediaBrowser.Model/Net/HttpException.cs @@ -28,7 +28,7 @@ namespace MediaBrowser.Model.Net public HttpException(string message, Exception innerException) : base(message, innerException) { - + } /// <summary> diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs index 6a4b996007..2100aae2a3 100644 --- a/MediaBrowser.Model/Net/ISocketFactory.cs +++ b/MediaBrowser.Model/Net/ISocketFactory.cs @@ -7,14 +7,13 @@ namespace MediaBrowser.Model.Net /// Implemented by components that can create a platform specific UDP socket implementation, and wrap it in the cross platform <see cref="ISocket"/> interface. /// </summary> public interface ISocketFactory - { - - /// <summary> - /// Createa a new unicast socket using the specified local port number. - /// </summary> - /// <param name="localPort">The local port to bind to.</param> - /// <returns>A <see cref="ISocket"/> implementation.</returns> - ISocket CreateUdpSocket(int localPort); + { + /// <summary> + /// Createa a new unicast socket using the specified local port number. + /// </summary> + /// <param name="localPort">The local port to bind to.</param> + /// <returns>A <see cref="ISocket"/> implementation.</returns> + ISocket CreateUdpSocket(int localPort); ISocket CreateUdpBroadcastSocket(int localPort); diff --git a/MediaBrowser.Model/Net/IpAddressInfo.cs b/MediaBrowser.Model/Net/IpAddressInfo.cs index 520f8fb545..c2c228faf0 100644 --- a/MediaBrowser.Model/Net/IpAddressInfo.cs +++ b/MediaBrowser.Model/Net/IpAddressInfo.cs @@ -23,7 +23,7 @@ namespace MediaBrowser.Model.Net return string.Equals(address.Address, Address, StringComparison.OrdinalIgnoreCase); } - public override String ToString() + public override string ToString() { return Address; } diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index d66d62fea2..93e51633ea 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -127,7 +127,7 @@ namespace MediaBrowser.Model.Net { if (string.IsNullOrEmpty(path)) { - throw new ArgumentNullException("path"); + throw new ArgumentNullException(nameof(path)); } var ext = Path.GetExtension(path) ?? string.Empty; @@ -183,6 +183,10 @@ namespace MediaBrowser.Model.Net { return "text/plain"; } + if (StringHelper.EqualsIgnoreCase(ext, ".log")) + { + return "text/plain"; + } if (StringHelper.EqualsIgnoreCase(ext, ".xml")) { return "application/xml"; @@ -228,10 +232,10 @@ namespace MediaBrowser.Model.Net if (StringHelper.EqualsIgnoreCase(ext, ".oga")) { return "audio/ogg"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".opus")) - { - return "audio/ogg"; + } + if (StringHelper.EqualsIgnoreCase(ext, ".opus")) + { + return "audio/ogg"; } if (StringHelper.EqualsIgnoreCase(ext, ".ac3")) { @@ -329,7 +333,7 @@ namespace MediaBrowser.Model.Net { if (string.IsNullOrEmpty(mimeType)) { - throw new ArgumentNullException("mimeType"); + throw new ArgumentNullException(nameof(mimeType)); } // handle text/html; charset=UTF-8 diff --git a/MediaBrowser.Model/Net/SocketReceiveResult.cs b/MediaBrowser.Model/Net/SocketReceiveResult.cs index 483e2297b9..5a5004de67 100644 --- a/MediaBrowser.Model/Net/SocketReceiveResult.cs +++ b/MediaBrowser.Model/Net/SocketReceiveResult.cs @@ -5,16 +5,16 @@ namespace MediaBrowser.Model.Net /// Used by the sockets wrapper to hold raw data received from a UDP socket. /// </summary> public sealed class SocketReceiveResult - { - /// <summary> - /// The buffer to place received data into. - /// </summary> - public byte[] Buffer { get; set; } + { + /// <summary> + /// The buffer to place received data into. + /// </summary> + public byte[] Buffer { get; set; } - /// <summary> - /// The number of bytes received. - /// </summary> - public int ReceivedBytes { get; set; } + /// <summary> + /// The number of bytes received. + /// </summary> + public int ReceivedBytes { get; set; } /// <summary> /// The <see cref="IpEndPointInfo"/> the data was received from. |
