Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add color to '* has already been recorded in the archive' message #5138

Merged
merged 8 commits into from Jul 15, 2023
7 changes: 5 additions & 2 deletions yt_dlp/YoutubeDL.py
Expand Up @@ -1402,7 +1402,7 @@ def check_filter():
return None

if self.in_download_archive(info_dict):
reason = '%s has already been recorded in the archive' % video_title
reason = f'{self._format_screen(video_title, self.Styles.FILENAME)} has already been recorded in the archive'
Grub4K marked this conversation as resolved.
Show resolved Hide resolved
break_opt, break_err = 'break_on_existing', ExistingVideoReached
else:
reason = check_filter()
Expand Down Expand Up @@ -1459,7 +1459,10 @@ def extract_info(self, url, download=True, ie_key=None, extra_info=None,

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'[{key}] '
f'{self._format_screen(temp_id, self.Styles.ID)}: '
'has already been recorded in the archive'
)
Grub4K marked this conversation as resolved.
Show resolved Hide resolved
pukkandan marked this conversation as resolved.
Show resolved Hide resolved
if self.params.get('break_on_existing', False):
raise ExistingVideoReached()
break
Expand Down