diff options
| author | Tthecreator <epostvanthomas@kpnmail.nl> | 2019-01-22 15:22:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-22 15:22:42 +0000 |
| commit | 189b99df16bd4c93cc96422d7282d01d9ff5b82f (patch) | |
| tree | 26d7da95fe3e3b2772b8b39a2463a6c0ac7652fc /MediaBrowser.Model/Net/MimeTypes.cs | |
| parent | a00c0defa8cb22774f5dc8a7d566eb36ac7307e8 (diff) | |
| parent | edcfd8b565f632088c8b1f826db8e2fbecf9790d (diff) | |
Merge pull request #1 from jellyfin/dev
Update from jellyfin repo
Diffstat (limited to 'MediaBrowser.Model/Net/MimeTypes.cs')
| -rw-r--r-- | MediaBrowser.Model/Net/MimeTypes.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index 93e51633ea..fe13413e2e 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -1,8 +1,8 @@ -using MediaBrowser.Model.Extensions; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Net { @@ -48,7 +48,7 @@ namespace MediaBrowser.Model.Net private static Dictionary<string, string> GetVideoFileExtensionsDictionary() { - Dictionary<string, string> dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); + var dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); foreach (string ext in VideoFileExtensions) { @@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Net private static Dictionary<string, string> GetMimeTypeLookup() { - Dictionary<string, string> dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); + var dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); dict.Add(".jpg", "image/jpeg"); dict.Add(".jpeg", "image/jpeg"); @@ -132,8 +132,7 @@ namespace MediaBrowser.Model.Net var ext = Path.GetExtension(path) ?? string.Empty; - string result; - if (MimeTypeLookup.TryGetValue(ext, out result)) + if (MimeTypeLookup.TryGetValue(ext, out string result)) { return result; } @@ -339,8 +338,7 @@ namespace MediaBrowser.Model.Net // handle text/html; charset=UTF-8 mimeType = mimeType.Split(';')[0]; - string result; - if (ExtensionLookup.TryGetValue(mimeType, out result)) + if (ExtensionLookup.TryGetValue(mimeType, out string result)) { return result; } |
