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;
|
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…
Reference in New Issue
Block a user