add support for MIME type: video/quicktime

This commit is contained in:
Mort Yao 2013-04-20 04:58:33 +02:00
parent 7d3beda2a8
commit 8f19b4e302

View File

@ -124,6 +124,7 @@ def url_info(url, faker = False):
'video/f4v': 'flv', 'video/f4v': 'flv',
'video/mp4': 'mp4', 'video/mp4': 'mp4',
'video/MP2T': 'ts', 'video/MP2T': 'ts',
'video/quicktime': 'mov',
'video/webm': 'webm', 'video/webm': 'webm',
'video/x-flv': 'flv', 'video/x-flv': 'flv',
'video/x-ms-asf': 'asf', 'video/x-ms-asf': 'asf',
@ -536,6 +537,7 @@ def playlist_not_supported(name):
return f return f
def print_info(site_info, title, type, size): def print_info(site_info, title, type, size):
type = type.lower()
if type in ['3gp']: if type in ['3gp']:
type = 'video/3gpp' type = 'video/3gpp'
elif type in ['asf', 'wmv']: elif type in ['asf', 'wmv']:
@ -546,6 +548,8 @@ def print_info(site_info, title, type, size):
type = 'audio/mpeg' type = 'audio/mpeg'
elif type in ['mp4']: elif type in ['mp4']:
type = 'video/mp4' type = 'video/mp4'
elif type in ['mov']:
type = 'video/quicktime'
elif type in ['ts']: elif type in ['ts']:
type = 'video/MP2T' type = 'video/MP2T'
elif type in ['webm']: elif type in ['webm']:
@ -563,8 +567,8 @@ def print_info(site_info, title, type, size):
type_info = "WebM video (%s)" % type type_info = "WebM video (%s)" % type
#elif type in ['video/ogg']: #elif type in ['video/ogg']:
# type_info = "Ogg video (%s)" % type # type_info = "Ogg video (%s)" % type
#elif type in ['video/quicktime']: elif type in ['video/quicktime']:
# type_info = "QuickTime video (%s)" % type type_info = "QuickTime video (%s)" % type
#elif type in ['video/x-matroska']: #elif type in ['video/x-matroska']:
# type_info = "Matroska video (%s)" % type # type_info = "Matroska video (%s)" % type
#elif type in ['video/x-ms-wmv']: #elif type in ['video/x-ms-wmv']: