From 9d344658863cb5fe0b164cfdb344c5dca49f347b Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Thu, 3 Sep 2026 21:04:39 +0300 Subject: [PATCH] fix: apply mirror mode to LoaderSpot manifest #891 --- run.ps1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/run.ps1 b/run.ps1 index fe9e6b5..891da3b 100644 --- a/run.ps1 +++ b/run.ps1 @@ -402,12 +402,15 @@ function Stop-BrokenSpotifyFiles { function Get-Link { param ( [Alias("e")] - [string]$endlink + [string]$endlink, + [string]$Owner = "SpotX-Official", + [string]$Repository = "SpotX" ) + $pagesOwner = $Owner.ToLowerInvariant() switch ($mirror) { - $true { return "https://spotx-official.github.io/SpotX" + $endlink } - default { return "https://raw.githubusercontent.com/SpotX-Official/SpotX/main" + $endlink } + $true { return "https://$pagesOwner.github.io/$Repository" + $endlink } + default { return "https://raw.githubusercontent.com/$Owner/$Repository/main" + $endlink } } } @@ -612,7 +615,7 @@ function Resolve-SpotifyInstallerVersionFromManifest { $spotifyDownloadBaseUrl = "https://loadspot.amd64fox1.workers.dev/download" $spotifyTemporaryDownloadBaseUrl = "https://loadspot.amd64fox1.workers.dev/temporary-download" $spotifyTemporaryDownloadVersion = "1.2.86.502.g8cd7fb22" -$spotifyVersionsManifestUrl = "https://raw.githubusercontent.com/LoaderSpot/table/refs/heads/main/table/versions.json" +$spotifyVersionsManifestUrl = Get-Link -e "/table/versions.json" -Owner "LoaderSpot" -Repository "table" $systemArchitecture = Get-SystemArchitecture $match_v = "^(?\d+\.\d+\.\d+(?:\.\d+(?:\.g[0-9a-f]{8})?)?)(?:-\d+)?$"