mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-15 00:48:28 +00:00
Use UPDATE_HINT
This commit is contained in:
parent
1baf5aa4ad
commit
cc9a682438
@ -182,11 +182,13 @@ def _get_version_age_warning():
|
|||||||
if len(version_parts) < 3:
|
if len(version_parts) < 3:
|
||||||
return None
|
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):
|
if dt.date(*version_parts[:3]) < dt.date.today() - dt.timedelta(days=90):
|
||||||
return ('\n '.join((
|
return ('\n '.join((
|
||||||
f'Your yt-dlp version ({__version__}) is older than 90 days!',
|
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.',
|
'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):
|
except (ValueError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user