Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion streamrip/rip/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down