diff options
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 14823a4c6..e72354bec 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -107,6 +107,7 @@ from .utils import ( iri_to_uri, join_nonempty, locked_file, + make_archive_id, make_dir, make_HTTPS_handler, merge_headers, @@ -1738,8 +1739,8 @@ class YoutubeDL: # Better to do this after potentially exhausting entries ie_result['playlist_count'] = all_entries.get_full_count() - ie_copy = collections.ChainMap( - ie_result, self._playlist_infodict(ie_result, n_entries=int_or_none(n_entries))) + extra = self._playlist_infodict(ie_result, n_entries=int_or_none(n_entries)) + ie_copy = collections.ChainMap(ie_result, extra) _infojson_written = False write_playlist_files = self.params.get('allow_playlist_files', True) @@ -1785,14 +1786,14 @@ class YoutubeDL: if not lazy and 'playlist-index' in self.params.get('compat_opts', []): playlist_index = ie_result['requested_entries'][i] - extra = { + entry_copy = collections.ChainMap(entry, { **common_info, 'n_entries': int_or_none(n_entries), 'playlist_index': playlist_index, 'playlist_autonumber': i + 1, - } + }) - if self._match_entry(collections.ChainMap(entry, extra), incomplete=True) is not None: + if self._match_entry(entry_copy, incomplete=True) is not None: continue self.to_screen('[download] Downloading video %s of %s' % ( @@ -3448,7 +3449,7 @@ class YoutubeDL: break else: return - return f'{extractor.lower()} {video_id}' + return make_archive_id(extractor, video_id) def in_download_archive(self, info_dict): fn = self.params.get('download_archive') |