Check updates now open release page instead auto download

This commit is contained in:
Flowseal
2026-02-03 02:19:57 +03:00
parent ef9c3688d9
commit 0d3fbfe9b2
2 changed files with 5 additions and 12 deletions

View File

@@ -1 +1 @@
1.9.3 1.9.4

View File

@@ -1,5 +1,5 @@
@echo off @echo off
set "LOCAL_VERSION=1.9.3" set "LOCAL_VERSION=1.9.4"
:: External commands :: External commands
if "%~1"=="status_zapret" ( if "%~1"=="status_zapret" (
@@ -335,7 +335,7 @@ cls
:: Set current version and URLs :: Set current version and URLs
set "GITHUB_VERSION_URL=https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/main/.service/version.txt" set "GITHUB_VERSION_URL=https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/main/.service/version.txt"
set "GITHUB_RELEASE_URL=https://github.com/Flowseal/zapret-discord-youtube/releases/tag/" set "GITHUB_RELEASE_URL=https://github.com/Flowseal/zapret-discord-youtube/releases/tag/"
set "GITHUB_DOWNLOAD_URL=https://github.com/Flowseal/zapret-discord-youtube/releases/latest/download/zapret-discord-youtube-" set "GITHUB_DOWNLOAD_URL=https://github.com/Flowseal/zapret-discord-youtube/releases/latest"
:: Get the latest version from GitHub :: Get the latest version from GitHub
for /f "delims=" %%A in ('powershell -NoProfile -Command "(Invoke-WebRequest -Uri \"%GITHUB_VERSION_URL%\" -Headers @{\"Cache-Control\"=\"no-cache\"} -UseBasicParsing -TimeoutSec 5).Content.Trim()" 2^>nul') do set "GITHUB_VERSION=%%A" for /f "delims=" %%A in ('powershell -NoProfile -Command "(Invoke-WebRequest -Uri \"%GITHUB_VERSION_URL%\" -Headers @{\"Cache-Control\"=\"no-cache\"} -UseBasicParsing -TimeoutSec 5).Content.Trim()" 2^>nul') do set "GITHUB_VERSION=%%A"
@@ -360,15 +360,8 @@ if "%LOCAL_VERSION%"=="%GITHUB_VERSION%" (
echo New version available: %GITHUB_VERSION% echo New version available: %GITHUB_VERSION%
echo Release page: %GITHUB_RELEASE_URL%%GITHUB_VERSION% echo Release page: %GITHUB_RELEASE_URL%%GITHUB_VERSION%
set "CHOICE="
set /p "CHOICE=Do you want to automatically download the new version? (Y/N) (default: Y) "
if "%CHOICE%"=="" set "CHOICE=Y"
if /i "%CHOICE%"=="y" set "CHOICE=Y"
if /i "%CHOICE%"=="Y" (
echo Opening the download page... echo Opening the download page...
start "" "%GITHUB_DOWNLOAD_URL%%GITHUB_VERSION%.rar" start "" "%GITHUB_DOWNLOAD_URL%"
)
if "%1"=="soft" exit if "%1"=="soft" exit