]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45411: Update mimetypes.py (GH-28792)
authorJosephine-Marie <75948248+Josephine-Marie@users.noreply.github.com>
Mon, 11 Oct 2021 11:05:28 +0000 (13:05 +0200)
committerGitHub <noreply@github.com>
Mon, 11 Oct 2021 11:05:28 +0000 (13:05 +0200)
.vtt and .srt files are common subtitle files, used by browsers.

Lib/mimetypes.py
Misc/NEWS.d/next/Library/2021-10-08-11-29-29.bpo-45411.4jR--U.rst [new file with mode: 0644]

index 3ba91771ed03dd00d70231d013ec414bb228ca39..e14d0719bed4890f1641d3b6aa8ddb5a6b38ca17 100644 (file)
@@ -552,8 +552,10 @@ def _default_mime_types():
         '.h'      : 'text/plain',
         '.ksh'    : 'text/plain',
         '.pl'     : 'text/plain',
+        '.srt'    : 'text/plain',
         '.rtx'    : 'text/richtext',
         '.tsv'    : 'text/tab-separated-values',
+        '.vtt'    : 'text/vtt',
         '.py'     : 'text/x-python',
         '.etx'    : 'text/x-setext',
         '.sgm'    : 'text/x-sgml',
diff --git a/Misc/NEWS.d/next/Library/2021-10-08-11-29-29.bpo-45411.4jR--U.rst b/Misc/NEWS.d/next/Library/2021-10-08-11-29-29.bpo-45411.4jR--U.rst
new file mode 100644 (file)
index 0000000..5f774dc
--- /dev/null
@@ -0,0 +1 @@
+Add extensions for files containing subtitles - .srt & .vtt - to the mimetypes.py module.