diff --git a/libtransmission/mime-types.h b/libtransmission/mime-types.h index 262519fc8..43f398bcb 100644 --- a/libtransmission/mime-types.h +++ b/libtransmission/mime-types.h @@ -14,7 +14,7 @@ struct mime_type_suffix std::string_view mime_type; }; -inline auto constexpr mime_type_suffixes = std::array{ +inline auto constexpr mime_type_suffixes = std::array{ { { "123", "application/vnd.lotus-1-2-3" }, { "1km", "application/vnd.1000minds.decision-model+xml" }, { "3dml", "text/vnd.in3d.3dml" }, @@ -51,12 +51,16 @@ inline auto constexpr mime_type_suffixes = std::array{ { "air", "application/vnd.adobe.air-application-installer-package+zip" }, { "ait", "application/vnd.dvb.ait" }, { "ami", "application/vnd.amiga.ami" }, + { "aml", "application/automationml-aml+xml" }, + { "amlx", "application/automationml-amlx+zip" }, { "amr", "audio/amr" }, { "apk", "application/vnd.android.package-archive" }, { "apng", "image/apng" }, - { "apng", "image/vnd.mozilla.apng" }, { "appcache", "text/cache-manifest" }, + { "appinstaller", "application/appinstaller" }, { "application", "application/x-ms-application" }, + { "appx", "application/appx" }, + { "appxbundle", "application/appxbundle" }, { "apr", "application/vnd.lotus-approach" }, { "arc", "application/x-freearc" }, { "arj", "application/x-arj" }, @@ -154,6 +158,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "cjs", "application/node" }, { "cla", "application/vnd.claymore" }, { "class", "application/java-vm" }, + { "cld", "model/vnd.cld" }, { "clkk", "application/vnd.crick.clicker.keyboard" }, { "clkp", "application/vnd.crick.clicker.palette" }, { "clkt", "application/vnd.crick.clicker.template" }, @@ -235,6 +240,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template" }, { "dp", "application/vnd.osgi.dp" }, { "dpg", "application/vnd.dpgraph" }, + { "dpx", "image/dpx" }, { "dra", "audio/vnd.dra" }, { "drle", "image/dicom-rle" }, { "dsc", "text/prs.lines.tag" }, @@ -456,6 +462,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "jpf", "image/jpx" }, { "jpg", "image/jpeg" }, { "jpg2", "image/jp2" }, + { "jpgm", "image/jpm" }, { "jpgm", "video/jpm" }, { "jpgv", "video/jpeg" }, { "jph", "image/jph" }, @@ -469,6 +476,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "jsonld", "application/ld+json" }, { "jsonml", "application/jsonml+json" }, { "jsx", "text/jsx" }, + { "jt", "model/jt" }, { "jxr", "image/jxr" }, { "jxra", "image/jxra" }, { "jxrs", "image/jxrs" }, @@ -596,6 +604,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "mp2a", "audio/mpeg" }, { "mp3", "audio/mp3" }, { "mp3", "audio/mpeg" }, + { "mp4", "application/mp4" }, { "mp4", "video/mp4" }, { "mp4a", "audio/mp4" }, { "mp4s", "application/mp4" }, @@ -606,6 +615,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "mpeg", "video/mpeg" }, { "mpf", "application/media-policy-dataset+xml" }, { "mpg", "video/mpeg" }, + { "mpg4", "application/mp4" }, { "mpg4", "video/mp4" }, { "mpga", "audio/mpeg" }, { "mpkg", "application/vnd.apple.installer+xml" }, @@ -627,6 +637,8 @@ inline auto constexpr mime_type_suffixes = std::array{ { "msh", "model/mesh" }, { "msi", "application/octet-stream" }, { "msi", "application/x-msdownload" }, + { "msix", "application/msix" }, + { "msixbundle", "application/msixbundle" }, { "msl", "application/vnd.mobius.msl" }, { "msm", "application/octet-stream" }, { "msp", "application/octet-stream" }, @@ -939,6 +951,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "spp", "application/scvp-vp-response" }, { "spq", "application/scvp-vp-request" }, { "spx", "audio/ogg" }, + { "sql", "application/sql" }, { "sql", "application/x-sql" }, { "src", "application/x-wais-source" }, { "srt", "application/x-subrip" }, @@ -1047,6 +1060,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "uri", "text/uri-list" }, { "uris", "text/uri-list" }, { "urls", "text/uri-list" }, + { "usda", "model/vnd.usda" }, { "usdz", "model/vnd.usdz+zip" }, { "ustar", "application/x-ustar" }, { "utz", "application/vnd.uiq.theme" }, @@ -1127,6 +1141,7 @@ inline auto constexpr mime_type_suffixes = std::array{ { "webmanifest", "application/manifest+json" }, { "webp", "image/webp" }, { "wg", "application/vnd.pmi.widget" }, + { "wgsl", "text/wgsl" }, { "wgt", "application/widget" }, { "wif", "application/watcherinfo+xml" }, { "wks", "application/vnd.ms-works" }, diff --git a/libtransmission/mime-types.js b/libtransmission/mime-types.js index 3377c3ee4..7d599e5e4 100755 --- a/libtransmission/mime-types.js +++ b/libtransmission/mime-types.js @@ -1,7 +1,7 @@ #!/usr/bin/env node const copyright = -`// This file Copyright © 2021-2023${new Date().getFullYear()} Mnemosyne LLC. +`// This file Copyright © 2021-${new Date().getFullYear()} Mnemosyne LLC. // It may be used under GPLv2 (SPDX: GPL-2.0-only), GPLv3 (SPDX: GPL-3.0-only), // or any future license endorsed by Mnemosyne LLC. // License text can be found in the licenses/ folder.`; @@ -49,11 +49,9 @@ struct mime_type_suffix std::string_view mime_type; }; -inline auto constexpr mime_type_suffixes = std::array -{{ -${mime_type_lines} -}}; - +inline auto constexpr mime_type_suffixes = std::array{ + { ${mime_type_lines.trim()} } +}; `); } catch (e) { console.error(e.message);