mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-06 23:41:26 +01:00
Compare commits
2 Commits
520545b6de
...
ba05b740ef
Author | SHA1 | Date | |
---|---|---|---|
|
ba05b740ef | ||
|
b8ed155aac |
|
@ -279,16 +279,14 @@ class Updater:
|
|||
def _get_version_info(self, tag: str) -> tuple[str | None, str | None]:
|
||||
if _VERSION_RE.fullmatch(tag):
|
||||
return tag, None
|
||||
elif self._exact and tag != 'latest':
|
||||
return None, None
|
||||
|
||||
api_info = self._call_api(tag)
|
||||
|
||||
if tag == 'latest':
|
||||
requested_version = api_info['tag_name']
|
||||
else:
|
||||
match = _VERSION_RE.search(api_info.get('name', ''))
|
||||
requested_version = match[0] if match else None
|
||||
match = re.search(rf'\s+(?P<version>{_VERSION_RE.pattern})$', api_info.get('name', ''))
|
||||
requested_version = match.group('version') if match else None
|
||||
|
||||
if re.fullmatch(_HASH_PATTERN, api_info.get('target_commitish', '')):
|
||||
target_commitish = api_info['target_commitish']
|
||||
|
@ -376,7 +374,7 @@ class Updater:
|
|||
elif target_commitish:
|
||||
has_update = target_commitish != self.current_commit
|
||||
else:
|
||||
has_update = True
|
||||
has_update = False
|
||||
|
||||
current_label = _make_label(ORIGIN, CHANNEL.partition("@")[2] or self.current_version, self.current_version)
|
||||
if not has_update:
|
||||
|
@ -445,8 +443,6 @@ class Updater:
|
|||
return False
|
||||
|
||||
self.ydl.to_screen(f'Current Build Hash: {_sha256_file(self.filename)}')
|
||||
if not update_info.checksum:
|
||||
self._block_restart('Automatically restarting into unverified builds is disabled for security reasons')
|
||||
|
||||
update_label = _make_label(self.requested_repo, update_info.tag, update_info.version)
|
||||
self.ydl.to_screen(f'Updating to {update_label} ...')
|
||||
|
|
Loading…
Reference in New Issue
Block a user