mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
MIME: use "jpg" as extension for image/jpeg even with newer MIME data
Seems newer MIME data returns "jfif", which no one really uses.
This commit is contained in:
parent
d0c63c5f26
commit
fb69502347
@ -60,8 +60,10 @@ primary_file_extension_for_type(std::string const &type_name) {
|
||||
auto q_type_name = Q(type_name).toLower();
|
||||
|
||||
for (auto const &type : all_types)
|
||||
if (type.name() == q_type_name)
|
||||
return to_utf8(type.preferredSuffix());
|
||||
if (type.name() == q_type_name) {
|
||||
auto extension = to_utf8(type.preferredSuffix());
|
||||
return extension == "jfif" ? "jpg"s : extension;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user