update mime types

pull/702/head
Luke Pulverenti 9 years ago
parent 63b62e5f40
commit 317c6bcd68

@ -318,7 +318,7 @@ namespace MediaBrowser.Model.Net
{
return result;
}
throw new ArgumentNullException("Unable to determine extension for mimeType: " + mimeType);
return null;
}
}
}

@ -8,6 +8,7 @@ using MediaBrowser.Model.Devices;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Net;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Session;
using MediaBrowser.Model.Users;
@ -151,12 +152,13 @@ namespace MediaBrowser.Server.Implementations.Devices
path = Path.Combine(path, _fileSystem.GetValidFilename(file.Album));
}
Directory.CreateDirectory(path);
path = Path.Combine(path, file.Name);
path = Path.ChangeExtension(path, MimeTypes.ToExtension(file.MimeType) ?? "jpg");
_libraryMonitor.ReportFileSystemChangeBeginning(path);
Directory.CreateDirectory(Path.GetDirectoryName(path));
try
{
using (var fs = _fileSystem.GetFileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read))

Loading…
Cancel
Save