From 1e5abc944b265e88025c5b624d0569d3352cb1d8 Mon Sep 17 00:00:00 2001 From: berettavexee Date: Sun, 14 Jun 2026 14:20:59 +0200 Subject: [PATCH] fix(cli): only show update notice when PyPI version is actually newer Co-Authored-By: Claude Sonnet 4.6 --- streamrip/rip/cli.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/streamrip/rip/cli.py b/streamrip/rip/cli.py index 2b3f532e..c796c253 100644 --- a/streamrip/rip/cli.py +++ b/streamrip/rip/cli.py @@ -194,7 +194,12 @@ async def url(ctx, urls): if version_coro is not None: latest_version, notes = await version_coro - if latest_version != __version__: + def _ver(v): + try: + return tuple(map(int, v.split("."))) + except (ValueError, AttributeError): + return (0, 0, 0) + if _ver(latest_version) > _ver(__version__): console.print( f"\n[green]A new version of streamrip [cyan]v{latest_version}[/cyan]" " is available! Run [white][bold]pip3 install streamrip --upgrade[/bold][/white]"