DEFAULT_OUTTMPL,
IDENTITY,
LINK_TEMPLATES,
+ MEDIA_EXTENSIONS,
NO_DEFAULT,
NUMBER_RE,
OUTTMPL_TYPES,
'page_url', 'app', 'play_path', 'tc_url', 'flash_version', 'rtmp_live', 'rtmp_conn', 'rtmp_protocol', 'rtmp_real_time'
}
_format_selection_exts = {
- 'audio': {'m4a', 'mp3', 'ogg', 'aac'},
- 'video': {'mp4', 'flv', 'webm', '3gp'},
- 'storyboards': {'mhtml'},
+ 'audio': set(MEDIA_EXTENSIONS.common_audio),
+ 'video': set(MEDIA_EXTENSIONS.common_video + ('3gp', )),
+ 'storyboards': set(MEDIA_EXTENSIONS.storyboards),
}
def __init__(self, params=None, auto_init=True):
assert ie_result['_type'] in ('playlist', 'multi_video')
common_info = self._playlist_infodict(ie_result, strict=True)
- title = common_info.get('title') or '<Untitled>'
+ title = common_info.get('playlist') or '<Untitled>'
if self._match_entry(common_info, incomplete=True) is not None:
return
self.to_screen(f'[download] Downloading {ie_result["_type"]}: {title}')
# Better to do this after potentially exhausting entries
ie_result['playlist_count'] = all_entries.get_full_count()
- common_info = self._playlist_infodict(ie_result, n_entries=int_or_none(n_entries))
- ie_copy = collections.ChainMap(ie_result, common_info)
+ ie_copy = collections.ChainMap(
+ ie_result, self._playlist_infodict(ie_result, n_entries=int_or_none(n_entries)))
_infojson_written = False
write_playlist_files = self.params.get('allow_playlist_files', True)
extra = {
**common_info,
+ 'n_entries': int_or_none(n_entries),
'playlist_index': playlist_index,
'playlist_autonumber': i + 1,
}