mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-06-14 03:16:33 +10:00
fix: update SpotX check version source
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user