From 6b6394b3b6c167c00e4bde75b993037ef04cad77 Mon Sep 17 00:00:00 2001 From: oop7 <110548351+oop7@users.noreply.github.com> Date: Thu, 26 Feb 2026 13:02:54 +0200 Subject: [PATCH] Zero-pad PyPI version to match GitHub tags Normalize PyPI's version string (e.g. "2026.2.21") to the zero-padded GitHub tag format (e.g. "2026.02.21") before building the update target. The code splits a three-part version and pads the month/day components with two digits so stable@ matches yt-dlp GitHub tagging. --- ytsage/gui/ytsage_gui_dialogs/ytsage_dialogs_updater.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ytsage/gui/ytsage_gui_dialogs/ytsage_dialogs_updater.py b/ytsage/gui/ytsage_gui_dialogs/ytsage_dialogs_updater.py index eca6651..8f8e4bb 100644 --- a/ytsage/gui/ytsage_gui_dialogs/ytsage_dialogs_updater.py +++ b/ytsage/gui/ytsage_gui_dialogs/ytsage_dialogs_updater.py @@ -746,6 +746,11 @@ class UpdaterTabWidget(QWidget): response.raise_for_status() latest_tag = response.json()["info"]["version"] if latest_tag: + # PyPI returns version without zero-padding (e.g. "2026.2.21") + # but yt-dlp GitHub tags are zero-padded (e.g. "2026.02.21") + parts = latest_tag.split(".") + if len(parts) == 3: + latest_tag = f"{parts[0]}.{int(parts[1]):02d}.{int(parts[2]):02d}" update_target = f"stable@{latest_tag}" logger.info(f"Latest stable version tag: {latest_tag}") else: