Refactor MimeTypes.ToExtension()

Co-authored-by: Cody Robibero <cody@robibe.ro>
pull/6941/head
Ahmed Rafiq 3 years ago committed by GitHub
parent 40e05a7993
commit 0e491025ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -181,13 +181,8 @@ namespace MediaBrowser.Model.Net
return result; return result;
} }
var extensions = Model.MimeTypes.GetMimeTypeExtensions(mimeType); var extension = Model.MimeTypes.GetMimeTypeExtensions(mimeType).FirstOrDefault();
if (extensions.Any()) return string.IsNullOrEmpty(extension) ? null : "." + extension;
{
return "." + extensions.First();
}
return null;
} }
} }
} }

Loading…
Cancel
Save