aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Net/MimeTypes.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-08-04 16:30:15 -0400
committerGitHub <noreply@github.com>2017-08-04 16:30:15 -0400
commite169eaee6cb2f91e4102f4fe7ac9075659feba95 (patch)
treea143a29cc50b65fd059727ad8f687ad32e42cecb /MediaBrowser.Model/Net/MimeTypes.cs
parentdb9176521c324452ea6c4c4566d54eed5329780f (diff)
parent3fe1c25c3ea8d6519aba3b5c3ef0d6a9154413b2 (diff)
Merge pull request #2794 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Model/Net/MimeTypes.cs')
-rw-r--r--MediaBrowser.Model/Net/MimeTypes.cs18
1 files changed, 12 insertions, 6 deletions
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)