version bump to 1.2.86.502

- added an option in the settings to enable/disable music videos, etc
- added a Share button with a new modal window
- added the ability to include local patches.json
This commit is contained in:
amd64fox
2026-03-28 22:09:43 +03:00
parent a0a59726ee
commit b22bebdab5
2 changed files with 117 additions and 11 deletions

40
run.ps1
View File

@@ -2,7 +2,7 @@
param
(
[Parameter(HelpMessage = 'Latest recommended Spotify version for Windows 10+.')]
[string]$latest_full = "1.2.85.519.g549a528b",
[string]$latest_full = "1.2.86.502.g8cd7fb22",
[Parameter(HelpMessage = 'Latest supported Spotify version for Windows 7-8.1')]
[string]$last_win7_full = "1.2.5.1006.g22820f93",
@@ -23,6 +23,10 @@ param
[Parameter(HelpMessage = 'Custom path to Spotify installation directory. Default is %APPDATA%\Spotify.')]
[string]$SpotifyPath,
[Parameter(HelpMessage = 'Custom local path to patches.json')]
[Alias('cp')]
[string]$CustomPatchesPath,
[Parameter(HelpMessage = "Use github.io mirror instead of raw.githubusercontent.")]
[Alias("m")]
[switch]$mirror,
@@ -566,6 +570,36 @@ function Get {
return $null
}
function Get-PatchesJson {
param (
[string]$LocalPath
)
if ($LocalPath) {
try {
$resolvedPath = Resolve-Path -LiteralPath $LocalPath -ErrorAction Stop | Select-Object -ExpandProperty Path
if (-not (Test-Path -LiteralPath $resolvedPath -PathType Leaf)) {
throw "File not found: $resolvedPath"
}
Write-Host ("Using local patches.json: {0}" -f $resolvedPath)
$jsonContent = [System.IO.File]::ReadAllText($resolvedPath, [System.Text.Encoding]::UTF8)
return $jsonContent | ConvertFrom-Json -ErrorAction Stop
}
catch {
Write-Host
Write-Host "Failed to load local patches.json" -ForegroundColor Red
Write-Host $_.Exception.Message -ForegroundColor Red
Write-Host
return $null
}
}
return Get -Url (Get-Link -e "/patches/patches.json") -RetrySeconds 5
}
function incorrectValue {
@@ -1656,11 +1690,11 @@ if ($ch -eq 'n') {
$ch = $null
$webjson = Get -Url (Get-Link -e "/patches/patches.json") -RetrySeconds 5
$webjson = Get-PatchesJson -LocalPath $CustomPatchesPath
if ($webjson -eq $null) {
Write-Host
Write-Host "Failed to get patches.json" -ForegroundColor Red
Write-Host "Failed to load patches.json" -ForegroundColor Red
Remove-TempDirectory -Directory $tempDirectory
Stop-Script
}