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
Conversation
There are two occurences for the "recorded" message, one in It makes sense to adjust the output to give the id and title if available, else only one of the two. |
In addition, |
If there is no more work in this PR, but it takes time to merge, can you in the meantime tag this with |
ee280c7
to
7aeda6c
Compare
Came to report youtube playlist download mode doesn’t list video IDs of already archived links compared to regular youtube urls, and luckily found this patches that. Was this PR waiting for further updates? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be what I thought of
yt_dlp/YoutubeDL.py
Outdated
video_id = info_dict.get('id', 'entry') | ||
video_title = info_dict.get('title', video_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of defaulting to video_id
, id use format_field
to only show if a good value is contained:
video_id = info_dict.get('id', 'entry') | |
video_title = info_dict.get('title', video_id) | |
video_id = info_dict.get('id', 'entry') | |
video_title = format_field(info_dict, 'title', ' (%s)', func=lambda x: self._format_screen(x, self.Styles.FILENAME)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
video_title is used elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my bad, so something like title_format = ...
?
Whatever your issue is, it does not seem related to this PR. |
Co-authored-by: Simon Sawicki <accounts@grub4k.xyz>
Ive pushed something. Let me know opinion. |
I would have wanted a clearer separation for the title, but this is way cleaner code LGTM. |
Hm.. match_filter messages are inconsistent whether it puts title in |
I would always put title in quotes, but yes, we can standardize later, maybe in conjunction with structural logging. |
Authored by: aaruni96, Grub4K, pukkandan Closes yt-dlp#4913
Adds color to the message '* has already been recorded in the archive'
This PR adds color to the info line if a video has already been recorded in the arvhice.
Closes #4913
Before submitting a pull request make sure you have:
In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?