From 513bbdbe5707a3d304f1df67f423f2f56a882218 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:22:50 +0300 Subject: [PATCH] fix: update SpotX check version source --- .github/workflows/check_spotx.yml | 36 +++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check_spotx.yml b/.github/workflows/check_spotx.yml index 37a9bd0..4613488 100644 --- a/.github/workflows/check_spotx.yml +++ b/.github/workflows/check_spotx.yml @@ -14,19 +14,37 @@ jobs: - name: Run Spotx shell: powershell run: | - $jsonUrl = "https://raw.githubusercontent.com/amd64fox/LoaderSpot/main/versions.json" + $jsonUrl = "https://raw.githubusercontent.com/LoaderSpot/table/refs/heads/main/table/versions.json" $resp = Invoke-RestMethod -Uri $jsonUrl - # Get a link to the x86 installer for the first version - $firstVersion = $resp.PSObject.Properties.Name | Select-Object -First 1 - $x64InstallerUrl = $resp.$firstVersion.links.win.x64 + # Use fullversion because installer names include architecture suffixes + $latestEntry = $resp.PSObject.Properties | Select-Object -First 1 + if (-not $latestEntry) { + throw "No Spotify versions found in $jsonUrl" + } - # Regex to find the desired part of the link - $regex = [regex]::Match($x64InstallerUrl, "spotify_installer-(.+?)\.exe") - $version = $regex.Groups[1].Value + $spotifyFullVersion = $latestEntry.Value.fullversion + if ([string]::IsNullOrWhiteSpace($spotifyFullVersion) -or $spotifyFullVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]{8}$') { + throw "Invalid Spotify fullversion for $($latestEntry.Name)" + } # Incoming parameters - $parametrs = '-Verbose -new_theme -v $version -sp-over -cache_limit 1000 -block_update_on -lyrics_stat spotify -urlform_goofy "https://docs.google.com/forms/formResponse" -idbox_goofy "9999999" -podcasts_off -adsections_off -lyrics_block' + $parameters = @{ + Verbose = $true + new_theme = $true + version = $spotifyFullVersion + confirm_spoti_recomended_over = $true + cache_limit = 1000 + block_update_on = $true + lyrics_stat = "spotify" + urlform_goofy = "https://docs.google.com/forms/formResponse" + idbox_goofy = "9999999" + podcasts_off = $true + adsections_off = $true + lyrics_block = $true + } # Run Spotx - iex "& { $(iwr -useb 'https://raw.githubusercontent.com/SpotX-Official/SpotX/refs/heads/main/run.ps1') } $parametrs" + $spotxUrl = "https://raw.githubusercontent.com/SpotX-Official/SpotX/refs/heads/main/run.ps1" + $spotxScript = [scriptblock]::Create((Invoke-WebRequest -UseBasicParsing -Uri $spotxUrl).Content) + & $spotxScript @parameters