aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Net
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-08-04 16:29:34 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-08-04 16:29:34 -0400
commitd8e2887071125eb109e3a9210f0df94506dcf7c7 (patch)
tree900a2c6e8611a78e96545c79992016400a432008 /MediaBrowser.Model/Net
parente208ef19b00d0e9efd5b2b43b33d138cfa08f298 (diff)
update container value
Diffstat (limited to 'MediaBrowser.Model/Net')
-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 2f132cb373..7a2e1f2159 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)