aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Net/MimeTypes.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-12-29 15:18:48 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-12-29 15:18:48 -0500
commit8a9f16ff6ae94fe1e86d93495b4908e253f7dba2 (patch)
tree8b6b2dd44cf00eecb42fc3401aec599ca82cd146 /MediaBrowser.Model/Net/MimeTypes.cs
parent800a16a2130ed49204a8b1358e62901077285a82 (diff)
enable user device access
Diffstat (limited to 'MediaBrowser.Model/Net/MimeTypes.cs')
-rw-r--r--MediaBrowser.Model/Net/MimeTypes.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
index 19dda0603..1f54e48d1 100644
--- a/MediaBrowser.Model/Net/MimeTypes.cs
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -73,10 +73,18 @@ namespace MediaBrowser.Model.Net
{".m4v", "video/x-m4v"}
};
- private static readonly Dictionary<string, string> ExtensionLookup =
- MimeTypeLookup
- .GroupBy(i => i.Value)
- .ToDictionary(x => x.Key, x => x.First().Key, StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary<string, string> ExtensionLookup = CreateExtensionLookup();
+
+ private static Dictionary<string, string> CreateExtensionLookup()
+ {
+ var dict = MimeTypeLookup
+ .GroupBy(i => i.Value)
+ .ToDictionary(x => x.Key, x => x.First().Key, StringComparer.OrdinalIgnoreCase);
+
+ dict["image/jpg"] = ".jpg";
+
+ return dict;
+ }
/// <summary>
/// Gets the type of the MIME.