From a63b35a60c6a6a04e8c863dc9e4e2554a74c0140 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Thu, 30 Jun 2022 03:37:48 +0530 Subject: [PATCH] [update] Do not check `_update_spec` when up to date --- yt_dlp/update.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yt_dlp/update.py b/yt_dlp/update.py index 9589443a7..7f15aa211 100644 --- a/yt_dlp/update.py +++ b/yt_dlp/update.py @@ -88,6 +88,10 @@ def __init__(self, ydl): @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 '):