From cc9a682438a48a9baaea138a7d897c5b9d3acbae Mon Sep 17 00:00:00 2001 From: sepro Date: Tue, 5 Aug 2025 22:39:08 +0200 Subject: [PATCH] Use `UPDATE_HINT` --- yt_dlp/update.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yt_dlp/update.py b/yt_dlp/update.py index 9de761fc7..f1193d904 100644 --- a/yt_dlp/update.py +++ b/yt_dlp/update.py @@ -182,11 +182,13 @@ def _get_version_age_warning(): if len(version_parts) < 3: return None + update_message = UPDATE_HINT or 'Run "yt-dlp --update" to update' + if dt.date(*version_parts[:3]) < dt.date.today() - dt.timedelta(days=90): return ('\n '.join(( f'Your yt-dlp version ({__version__}) is older than 90 days!', 'It is strongly recommeded to always use the latest versions, as sites regularly change and extractors need to be adjusted.', - 'Run "yt-dlp --update" to update. To suppress this warning, add "--no-update" to your command/config.'))) + f'{update_message}. To suppress this warning, add "--no-update" to your command/config.'))) except (ValueError, TypeError): pass