Fix original_url in playlists

This commit is contained in:
pukkandan 2022-12-21 20:30:26 +05:30
parent 69f5fe45b9
commit 8791e78ccc
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -1626,8 +1626,8 @@ def process_ie_result(self, ie_result, download=True, extra_info=None):
if result_type in ('url', 'url_transparent'): if result_type in ('url', 'url_transparent'):
ie_result['url'] = sanitize_url( ie_result['url'] = sanitize_url(
ie_result['url'], scheme='http' if self.params.get('prefer_insecure') else 'https') ie_result['url'], scheme='http' if self.params.get('prefer_insecure') else 'https')
if ie_result.get('original_url'): if ie_result.get('original_url') and not extra_info.get('original_url'):
extra_info.setdefault('original_url', ie_result['original_url']) extra_info = {'original_url': ie_result['original_url'], **extra_info}
extract_flat = self.params.get('extract_flat', False) extract_flat = self.params.get('extract_flat', False)
if ((extract_flat == 'in_playlist' and 'playlist' in extra_info) if ((extract_flat == 'in_playlist' and 'playlist' in extra_info)