Skip to content

Commit

Permalink
[core] Address gaps in allowed extensions
Browse files Browse the repository at this point in the history
Adds some extensions missing in 4652109
(from yt-dlp/yt-dlp#10362)

Authored by: bashonly
Co-authored by: dirkf
  • Loading branch information
bashonly authored and dirkf committed Jul 8, 2024
1 parent a452f94 commit 0b29076
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions youtube_dl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6604,27 +6604,53 @@ class _UnsafeExtensionError(Exception):
),
# video
MEDIA_EXTENSIONS.video, (
'avif',
'asx',
'ismv',
'm2t',
'm2ts',
'm2v',
'm4s',
'mng',
'mp2v',
'mp4v',
'mpe',
'mpeg',
'mpeg1',
'mpeg2',
'mpeg4',
'mxf',
'ogm',
'qt',
'rm',
'swf',
'ts',
'vob',
'vp9',
'wvm',
),
# audio
MEDIA_EXTENSIONS.audio, (
'3ga',
'ac3',
'adts',
'aif',
'au',
'dts',
'isma',
'it',
'mid',
'mod',
'mpga',
'mp1',
'mp2',
'mp4a',
'mpa',
'ra',
'shn',
'xm',
),
# image
MEDIA_EXTENSIONS.thumbnails, (
'avif',
'bmp',
'gif',
'ico',
Expand All @@ -6634,17 +6660,23 @@ class _UnsafeExtensionError(Exception):
'jxl',
'svg',
'tif',
'tiff',
'wbmp',
),
# subtitle
MEDIA_EXTENSIONS.subtitles, (
'dfxp',
'fs',
'ismt',
'json3',
'sami',
'scc',
'srv1',
'srv2',
'srv3',
'ssa',
'tt',
'xml',
),
# others
MEDIA_EXTENSIONS.manifests,
Expand All @@ -6658,7 +6690,6 @@ class _UnsafeExtensionError(Exception):
# 'swp',
# 'url',
# 'webloc',
# 'xml',
)))

def __init__(self, extension):
Expand Down

0 comments on commit 0b29076

Please sign in to comment.