mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-10-09 21:21:11 +11:00
Compare commits
3
Commits
20668e69ef
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0572e09a3e | ||
|
|
0447e6eb03 | ||
|
|
3f3fd30a95 |
@@ -34,7 +34,7 @@ jobs:
|
||||
}
|
||||
|
||||
$spotifyVersion = [string]$latestEntry.Value.fullversion
|
||||
if ([string]::IsNullOrWhiteSpace($spotifyVersion) -or $spotifyVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]{8}$') {
|
||||
if ([string]::IsNullOrWhiteSpace($spotifyVersion) -or $spotifyVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]+$') {
|
||||
throw "Invalid Spotify fullversion for $($latestEntry.Name)"
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@ jobs:
|
||||
if (-not $installer.url -or $installer.size -le 0) {
|
||||
throw "No ARM64 installer found for Spotify $checkVersion"
|
||||
}
|
||||
if ($entry.Value.fullversion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]{8}$') {
|
||||
if ($entry.Value.fullversion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]+$') {
|
||||
throw "Invalid Spotify fullversion for $checkVersion"
|
||||
}
|
||||
|
||||
|
||||
@@ -2723,7 +2723,7 @@
|
||||
"fr": "1.2.36",
|
||||
"to": ""
|
||||
},
|
||||
"add": " .LVMjmN2CaPruPAo62RAY, .Wn4fEKCJ6jYPfG2Y0ABn, .Y3Kd8WKnE3ZW9lzgA8nN, .C_T1Uoz7Fws_AFDl, .ap_ioWdVFWJkrRicJB8C { display: none !important }"
|
||||
"add": " .LVMjmN2CaPruPAo62RAY, .Wn4fEKCJ6jYPfG2Y0ABn, .Y3Kd8WKnE3ZW9lzgA8nN, .C_T1Uoz7Fws_AFDl, .WvvVZFf5X3INPzFLFyXQ, .NTX5QnnAPQ3vbP3jyNlk { display: none !important }"
|
||||
},
|
||||
"downloadquality": {
|
||||
"version": {
|
||||
|
||||
@@ -489,7 +489,7 @@ function Get-SpotifyVersionNumber {
|
||||
[string]$SpotifyVersion
|
||||
)
|
||||
|
||||
return [Version]($SpotifyVersion -replace '\.g[0-9a-f]{8}$', '')
|
||||
return [Version]($SpotifyVersion -replace '\.g[0-9a-f]+$', '')
|
||||
}
|
||||
|
||||
function Get-SpotifyInstallerArchitecture {
|
||||
@@ -579,7 +579,7 @@ function Resolve-SpotifyInstallerVersionFromManifest {
|
||||
|
||||
$entry = $selectedVersion.Value
|
||||
$fullVersion = [string]$entry.fullversion
|
||||
if ($fullVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]{8}$') {
|
||||
if ($fullVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]+$') {
|
||||
throw "Spotify version $($selectedVersion.Name) has invalid fullversion in versions manifest"
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ $spotifyTemporaryDownloadVersion = "1.2.86.502.g8cd7fb22"
|
||||
$spotifyVersionsManifestUrl = Get-Link -e "/table/versions.json" -Owner "LoaderSpot" -Repository "table"
|
||||
$systemArchitecture = Get-SystemArchitecture
|
||||
|
||||
$match_v = "^(?<version>\d+\.\d+\.\d+(?:\.\d+(?:\.g[0-9a-f]{8})?)?)(?:-\d+)?$"
|
||||
$match_v = "^(?<version>\d+\.\d+\.\d+(?:\.\d+(?:\.g[0-9a-f]+)?)?)(?:-\d+)?$"
|
||||
$versionIsSupported = $false
|
||||
if ($version) {
|
||||
if ($version -match $match_v) {
|
||||
@@ -1777,7 +1777,7 @@ function Kill-Spotify {
|
||||
}
|
||||
|
||||
|
||||
# Defer removal until the replacement is ready
|
||||
# Defer Store removal until the replacement installer is downloaded
|
||||
if ($win10 -or $win11 -or $win8_1 -or $win8 -or $win12) {
|
||||
|
||||
if (Get-AppxPackage -Name SpotifyAB.SpotifyMusic) {
|
||||
@@ -5333,7 +5333,6 @@ function Test-SpotifyInstall {
|
||||
function Expand-SpotifyInstaller {
|
||||
param([string]$DownloadFolder, [version]$ExpectedVersion, [string]$ExpectedArchitecture)
|
||||
|
||||
downloadSp -DownloadFolder $DownloadFolder
|
||||
$setupExe = Join-Path $DownloadFolder 'SpotifySetup.exe'
|
||||
$destination = Join-Path $DownloadFolder 'client'
|
||||
$process = $null
|
||||
@@ -5388,13 +5387,12 @@ try {
|
||||
Write-Host ($lang).DownSpoti2`n
|
||||
$architecture = Get-SpotifyInstallerArchitecture -SystemArchitecture $systemArchitecture `
|
||||
-SpotifyVersion ([version]$online) -LastX86SupportedVersion $last_x86
|
||||
$preparedClient = Expand-SpotifyInstaller -DownloadFolder $tempDirectory `
|
||||
-ExpectedVersion ([version]$online) -ExpectedArchitecture $architecture
|
||||
Write-Host
|
||||
downloadSp -DownloadFolder $tempDirectory
|
||||
}
|
||||
|
||||
Kill-Spotify
|
||||
# Store detection runs before /extract in the Spotify installer
|
||||
if ($uninstallStoreSpotify) {
|
||||
Kill-Spotify
|
||||
$previousProgressPreference = $ProgressPreference
|
||||
try {
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
@@ -5405,6 +5403,14 @@ try {
|
||||
finally { $ProgressPreference = $previousProgressPreference }
|
||||
}
|
||||
|
||||
if ($installSpotify) {
|
||||
$preparedClient = Expand-SpotifyInstaller -DownloadFolder $tempDirectory `
|
||||
-ExpectedVersion ([version]$online) -ExpectedArchitecture $architecture
|
||||
Write-Host
|
||||
}
|
||||
|
||||
if (!$uninstallStoreSpotify) { Kill-Spotify }
|
||||
|
||||
if ($installSpotify) {
|
||||
$null = Unlock-Folder
|
||||
if ($uninstallSpotify) {
|
||||
|
||||
Reference in New Issue
Block a user