diff options
author | Aaruni Kaushik <aaruni96@users.noreply.github.com> | 2023-07-15 21:15:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-16 00:45:08 +0530 |
commit | 2b029ca0a9f9105c4f7626993fa60e54c9782749 (patch) | |
tree | 7ea599a4c1657ac0c9242af04bba6b104e793f07 | |
parent | 131d132da5c98c6c78bd7eed4b37f4458561b3d9 (diff) | |
download | hypervideo-pre-2b029ca0a9f9105c4f7626993fa60e54c9782749.tar.lz hypervideo-pre-2b029ca0a9f9105c4f7626993fa60e54c9782749.tar.xz hypervideo-pre-2b029ca0a9f9105c4f7626993fa60e54c9782749.zip |
[cleanup] Add color to `download-archive` message (#5138)
Authored by: aaruni96, Grub4K, pukkandan
Closes #4913
-rw-r--r-- | yt_dlp/YoutubeDL.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 850eb8ae0..c49960782 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1492,7 +1492,10 @@ class YoutubeDL: return ret if self.in_download_archive(info_dict): - reason = '%s has already been recorded in the archive' % video_title + reason = ''.join(( + format_field(info_dict, 'id', f'{self._format_screen("%s", self.Styles.ID)}: '), + format_field(info_dict, 'title', f'{self._format_screen("%s", self.Styles.EMPHASIS)} '), + 'has already been recorded in the archive')) break_opt, break_err = 'break_on_existing', ExistingVideoReached else: try: @@ -1553,7 +1556,8 @@ class YoutubeDL: temp_id = ie.get_temp_id(url) if temp_id is not None and self.in_download_archive({'id': temp_id, 'ie_key': key}): - self.to_screen(f'[{key}] {temp_id}: has already been recorded in the archive') + self.to_screen(f'[download] {self._format_screen(temp_id, self.Styles.ID)}: ' + 'has already been recorded in the archive') if self.params.get('break_on_existing', False): raise ExistingVideoReached() break |