Remove the compatibility code used before the new format system was implemented

This commit is contained in:
Jaime Marquínez Ferrándiz 2013-12-03 14:21:06 +01:00
parent ce93879a9b
commit fb7abb31af
12 changed files with 15 additions and 67 deletions

View File

@ -113,7 +113,7 @@ class AppleTrailersIE(InfoExtractor):
}) })
formats = sorted(formats, key=lambda f: (f['height'], f['width'])) formats = sorted(formats, key=lambda f: (f['height'], f['width']))
info = { playlist.append({
'_type': 'video', '_type': 'video',
'id': video_id, 'id': video_id,
'title': title, 'title': title,
@ -124,12 +124,7 @@ class AppleTrailersIE(InfoExtractor):
'upload_date': upload_date, 'upload_date': upload_date,
'uploader_id': uploader_id, 'uploader_id': uploader_id,
'user_agent': 'QuickTime compatible (youtube-dl)', 'user_agent': 'QuickTime compatible (youtube-dl)',
} })
# TODO: Remove when #980 has been merged
info['url'] = formats[-1]['url']
info['ext'] = formats[-1]['ext']
playlist.append(info)
return { return {
'_type': 'playlist', '_type': 'playlist',

View File

@ -49,7 +49,7 @@ class ArchiveOrgIE(InfoExtractor):
for f in formats: for f in formats:
f['ext'] = determine_ext(f['url']) f['ext'] = determine_ext(f['url'])
info = { return {
'_type': 'video', '_type': 'video',
'id': video_id, 'id': video_id,
'title': title, 'title': title,
@ -57,12 +57,5 @@ class ArchiveOrgIE(InfoExtractor):
'description': description, 'description': description,
'uploader': uploader, 'uploader': uploader,
'upload_date': upload_date, 'upload_date': upload_date,
'thumbnail': data.get('misc', {}).get('image'),
} }
thumbnail = data.get('misc', {}).get('image')
if thumbnail:
info['thumbnail'] = thumbnail
# TODO: Remove when #980 has been merged
info.update(formats[-1])
return info

View File

@ -197,7 +197,7 @@ class ComedyCentralShowsIE(InfoExtractor):
}) })
effTitle = showId + u'-' + epTitle + u' part ' + compat_str(partNum+1) effTitle = showId + u'-' + epTitle + u' part ' + compat_str(partNum+1)
info = { results.append({
'id': shortMediaId, 'id': shortMediaId,
'formats': formats, 'formats': formats,
'uploader': showId, 'uploader': showId,
@ -205,11 +205,6 @@ class ComedyCentralShowsIE(InfoExtractor):
'title': effTitle, 'title': effTitle,
'thumbnail': None, 'thumbnail': None,
'description': compat_str(officialTitle), 'description': compat_str(officialTitle),
} })
# TODO: Remove when #980 has been merged
info.update(info['formats'][-1])
results.append(info)
return results return results

View File

@ -57,7 +57,7 @@ class DaumIE(InfoExtractor):
'format_id': profile, 'format_id': profile,
}) })
info = { return {
'id': video_id, 'id': video_id,
'title': info.find('TITLE').text, 'title': info.find('TITLE').text,
'formats': formats, 'formats': formats,
@ -66,6 +66,3 @@ class DaumIE(InfoExtractor):
'duration': int(info.find('DURATION').text), 'duration': int(info.find('DURATION').text),
'upload_date': info.find('REGDTTM').text[:8], 'upload_date': info.find('REGDTTM').text[:8],
} }
# TODO: Remove when #980 has been merged
info.update(formats[-1])
return info

View File

@ -65,7 +65,7 @@ class DreiSatIE(InfoExtractor):
return (qidx, prefer_http, format['video_bitrate']) return (qidx, prefer_http, format['video_bitrate'])
formats.sort(key=_sortkey) formats.sort(key=_sortkey)
info = { return {
'_type': 'video', '_type': 'video',
'id': video_id, 'id': video_id,
'title': video_title, 'title': video_title,
@ -76,8 +76,3 @@ class DreiSatIE(InfoExtractor):
'uploader': video_uploader, 'uploader': video_uploader,
'upload_date': upload_date, 'upload_date': upload_date,
} }
# TODO: Remove when #980 has been merged
info.update(formats[-1])
return info

View File

@ -44,13 +44,10 @@ class FazIE(InfoExtractor):
}) })
descr = self._html_search_regex(r'<p class="Content Copy">(.*?)</p>', webpage, u'description') descr = self._html_search_regex(r'<p class="Content Copy">(.*?)</p>', webpage, u'description')
info = { return {
'id': video_id, 'id': video_id,
'title': self._og_search_title(webpage), 'title': self._og_search_title(webpage),
'formats': formats, 'formats': formats,
'description': descr, 'description': descr,
'thumbnail': config.find('STILL/STILL_BIG').text, 'thumbnail': config.find('STILL/STILL_BIG').text,
} }
# TODO: Remove when #980 has been merged
info.update(formats[-1])
return info

View File

@ -47,13 +47,10 @@ class GameSpotIE(InfoExtractor):
'format_id': q, 'format_id': q,
}) })
info = { return {
'id': data_video['guid'], 'id': data_video['guid'],
'title': compat_urllib_parse.unquote(data_video['title']), 'title': compat_urllib_parse.unquote(data_video['title']),
'formats': formats, 'formats': formats,
'description': get_meta_content('description', webpage), 'description': get_meta_content('description', webpage),
'thumbnail': self._og_search_thumbnail(webpage), 'thumbnail': self._og_search_thumbnail(webpage),
} }
# TODO: Remove when #980 has been merged
info.update(formats[-1])
return info

View File

@ -43,13 +43,10 @@ class MetacriticIE(InfoExtractor):
description = self._html_search_regex(r'<b>Description:</b>(.*?)</p>', description = self._html_search_regex(r'<b>Description:</b>(.*?)</p>',
webpage, u'description', flags=re.DOTALL) webpage, u'description', flags=re.DOTALL)
info = { return {
'id': video_id, 'id': video_id,
'title': clip.find('title').text, 'title': clip.find('title').text,
'formats': formats, 'formats': formats,
'description': description, 'description': description,
'duration': int(clip.find('duration').text), 'duration': int(clip.find('duration').text),
} }
# TODO: Remove when #980 has been merged
info.update(formats[-1])
return info

View File

@ -93,7 +93,7 @@ class MTVIE(InfoExtractor):
else: else:
description = None description = None
info = { return {
'title': itemdoc.find('title').text, 'title': itemdoc.find('title').text,
'formats': self._extract_video_formats(mediagen_page), 'formats': self._extract_video_formats(mediagen_page),
'id': video_id, 'id': video_id,
@ -101,11 +101,6 @@ class MTVIE(InfoExtractor):
'description': description, 'description': description,
} }
# TODO: Remove when #980 has been merged
info.update(info['formats'][-1])
return info
def _get_videos_info(self, uri): def _get_videos_info(self, uri):
video_id = self._id_from_uri(uri) video_id = self._id_from_uri(uri)
data = compat_urllib_parse.urlencode({'uri': uri}) data = compat_urllib_parse.urlencode({'uri': uri})

View File

@ -56,7 +56,7 @@ class NaverIE(InfoExtractor):
'height': int(format_el.find('height').text), 'height': int(format_el.find('height').text),
}) })
info = { return {
'id': video_id, 'id': video_id,
'title': info.find('Subject').text, 'title': info.find('Subject').text,
'formats': formats, 'formats': formats,
@ -65,6 +65,3 @@ class NaverIE(InfoExtractor):
'upload_date': info.find('WriteDate').text.replace('.', ''), 'upload_date': info.find('WriteDate').text.replace('.', ''),
'view_count': int(info.find('PlayCount').text), 'view_count': int(info.find('PlayCount').text),
} }
# TODO: Remove when #980 has been merged
info.update(formats[-1])
return info

View File

@ -55,7 +55,7 @@ class TriluliluIE(InfoExtractor):
for fnode in format_doc.findall('./formats/format') for fnode in format_doc.findall('./formats/format')
] ]
info = { return {
'_type': 'video', '_type': 'video',
'id': video_id, 'id': video_id,
'formats': formats, 'formats': formats,
@ -64,7 +64,3 @@ class TriluliluIE(InfoExtractor):
'thumbnail': thumbnail, 'thumbnail': thumbnail,
} }
# TODO: Remove when #980 has been merged
info.update(formats[-1])
return info

View File

@ -47,7 +47,7 @@ class ViddlerIE(InfoExtractor):
r"thumbnail\s*:\s*'([^']*)'", r"thumbnail\s*:\s*'([^']*)'",
webpage, u'thumbnail', fatal=False) webpage, u'thumbnail', fatal=False)
info = { return {
'_type': 'video', '_type': 'video',
'id': video_id, 'id': video_id,
'title': title, 'title': title,
@ -56,9 +56,3 @@ class ViddlerIE(InfoExtractor):
'duration': duration, 'duration': duration,
'formats': formats, 'formats': formats,
} }
# TODO: Remove when #980 has been merged
info['formats'][-1]['ext'] = determine_ext(info['formats'][-1]['url'])
info.update(info['formats'][-1])
return info