Skip to content

A feature-rich command-line audio/video downloader

[update] Do not check `_update_spec` when up to date

pukkandana63b35a60c6a
diff --git a/yt_dlp/update.py b/yt_dlp/update.py
index 9589443a70..7f15aa211e 100644
--- a/yt_dlp/update.py
+++ b/yt_dlp/update.py
@@ -88,6 +88,10 @@ class Updater:
@functools.cached_property
def _tag(self):
+ latest = self._get_version_info('latest')['tag_name']
+ if version_tuple(__version__) >= version_tuple(latest):
+ return 'latest'
+
identifier = f'{detect_variant()} {system_identifier()}'
for line in self._download('_update_spec', 'latest').decode().splitlines():
if not line.startswith('lock '):