From d74da9e140441135a4eddaef9a37f00f32579038 Mon Sep 17 00:00:00 2001 From: Josephine-Marie <75948248+Josephine-Marie@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:05:28 +0200 Subject: bpo-45411: Update mimetypes.py (GH-28792) .vtt and .srt files are common subtitle files, used by browsers. --- Lib/mimetypes.py | 2 ++ Misc/NEWS.d/next/Library/2021-10-08-11-29-29.bpo-45411.4jR--U.rst | 1 + 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2021-10-08-11-29-29.bpo-45411.4jR--U.rst 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. -- cgit v0.12