Refactor MimeTypes.ToExtension()
Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
parent
40e05a7993
commit
0e491025ae
|
@ -181,13 +181,8 @@ namespace MediaBrowser.Model.Net
|
|||
return result;
|
||||
}
|
||||
|
||||
var extensions = Model.MimeTypes.GetMimeTypeExtensions(mimeType);
|
||||
if (extensions.Any())
|
||||
{
|
||||
return "." + extensions.First();
|
||||
}
|
||||
|
||||
return null;
|
||||
var extension = Model.MimeTypes.GetMimeTypeExtensions(mimeType).FirstOrDefault();
|
||||
return string.IsNullOrEmpty(extension) ? null : "." + extension;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user