summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosephine-Marie <75948248+Josephine-Marie@users.noreply.github.com>2021-10-11 11:05:28 (GMT)
committerGitHub <noreply@github.com>2021-10-11 11:05:28 (GMT)
commitd74da9e140441135a4eddaef9a37f00f32579038 (patch)
tree818d3d22c764459657d99be6dc85e61f0de4500b
parentc7e81fcf9548ab6a0a4828d6f2db9ece9d204826 (diff)
downloadcpython-d74da9e140441135a4eddaef9a37f00f32579038.zip
cpython-d74da9e140441135a4eddaef9a37f00f32579038.tar.gz
cpython-d74da9e140441135a4eddaef9a37f00f32579038.tar.bz2
bpo-45411: Update mimetypes.py (GH-28792)
.vtt and .srt files are common subtitle files, used by browsers.
-rw-r--r--Lib/mimetypes.py2
-rw-r--r--Misc/NEWS.d/next/Library/2021-10-08-11-29-29.bpo-45411.4jR--U.rst1
2 files changed, 3 insertions, 0 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index 3ba9177..e14d071 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -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
index 0000000..5f774dc
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-10-08-11-29-29.bpo-45411.4jR--U.rst
@@ -0,0 +1 @@
+Add extensions for files containing subtitles - .srt & .vtt - to the mimetypes.py module.