diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-03 06:14:26 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-04 03:07:29 +0530 |
commit | 4614bc22c1003a0b63ec6ed9c1a5d12a3e0cf05a (patch) | |
tree | fd82b592bd5b17680f5e787726ce99ffc69ed1cd | |
parent | 8e5fecc88c53611de538a50c1e51eb048b1544e6 (diff) | |
download | hypervideo-pre-4614bc22c1003a0b63ec6ed9c1a5d12a3e0cf05a.tar.lz hypervideo-pre-4614bc22c1003a0b63ec6ed9c1a5d12a3e0cf05a.tar.xz hypervideo-pre-4614bc22c1003a0b63ec6ed9c1a5d12a3e0cf05a.zip |
Allow `--force-write-archive` to work with `--flat-playlist`
Related: #876
-rw-r--r-- | yt_dlp/YoutubeDL.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 9768bb8ca..ada870c48 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1291,10 +1291,14 @@ class YoutubeDL(object): if ((extract_flat == 'in_playlist' and 'playlist' in extra_info) or extract_flat is True): info_copy = ie_result.copy() - self.add_extra_info(info_copy, extra_info) ie = try_get(ie_result.get('ie_key'), self.get_info_extractor) + if not ie_result.get('id'): + info_copy['id'] = ie.get_temp_id(ie_result['url']) self.add_default_extra_info(info_copy, ie, ie_result['url']) + self.add_extra_info(info_copy, extra_info) self.__forced_printings(info_copy, self.prepare_filename(info_copy), incomplete=True) + if self.params.get('force_write_download_archive', False): + self.record_download_archive(info_copy) return ie_result if result_type == 'video': |