aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Net
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-08-13 16:21:10 -0400
committerGitHub <noreply@github.com>2017-08-13 16:21:10 -0400
commitdc578f3742b474bd85d556299a6b2763f4d9acda (patch)
treecc4a8d1de140ece77160349e51a64857656ab373 /MediaBrowser.Model/Net
parentf6ed934a7e32bf10c3a141773d713bf3b19e784f (diff)
parent7f200f057d33e3ef52b1b1b1bf1767577295317e (diff)
Merge pull request #2815 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Model/Net')
-rw-r--r--MediaBrowser.Model/Net/ISocket.cs1
-rw-r--r--MediaBrowser.Model/Net/MimeTypes.cs18
2 files changed, 12 insertions, 7 deletions
diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs
index 71eb9914b..42550340b 100644
--- a/MediaBrowser.Model/Net/ISocket.cs
+++ b/MediaBrowser.Model/Net/ISocket.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
index 2f132cb37..7a2e1f215 100644
--- a/MediaBrowser.Model/Net/MimeTypes.cs
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -106,14 +106,15 @@ namespace MediaBrowser.Model.Net
return dict;
}
+ public static string GetMimeType(string path)
+ {
+ return GetMimeType(path, true);
+ }
+
/// <summary>
/// Gets the type of the MIME.
/// </summary>
- /// <param name="path">The path.</param>
- /// <returns>System.String.</returns>
- /// <exception cref="ArgumentNullException">path</exception>
- /// <exception cref="InvalidOperationException">Argument not supported: + path</exception>
- public static string GetMimeType(string path)
+ public static string GetMimeType(string path, bool enableStreamDefault)
{
if (string.IsNullOrEmpty(path))
{
@@ -329,7 +330,12 @@ namespace MediaBrowser.Model.Net
return "application/ttml+xml";
}
- return "application/octet-stream";
+ if (enableStreamDefault)
+ {
+ return "application/octet-stream";
+ }
+
+ return null;
}
public static string ToExtension(string mimeType)