fix: apply mirror mode to LoaderSpot manifest

#891
This commit is contained in:
amd64fox
2026-09-03 21:04:39 +03:00
parent fd064f5492
commit 9d34465886
+7 -4
View File
@@ -402,12 +402,15 @@ function Stop-BrokenSpotifyFiles {
function Get-Link { function Get-Link {
param ( param (
[Alias("e")] [Alias("e")]
[string]$endlink [string]$endlink,
[string]$Owner = "SpotX-Official",
[string]$Repository = "SpotX"
) )
$pagesOwner = $Owner.ToLowerInvariant()
switch ($mirror) { switch ($mirror) {
$true { return "https://spotx-official.github.io/SpotX" + $endlink } $true { return "https://$pagesOwner.github.io/$Repository" + $endlink }
default { return "https://raw.githubusercontent.com/SpotX-Official/SpotX/main" + $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" $spotifyDownloadBaseUrl = "https://loadspot.amd64fox1.workers.dev/download"
$spotifyTemporaryDownloadBaseUrl = "https://loadspot.amd64fox1.workers.dev/temporary-download" $spotifyTemporaryDownloadBaseUrl = "https://loadspot.amd64fox1.workers.dev/temporary-download"
$spotifyTemporaryDownloadVersion = "1.2.86.502.g8cd7fb22" $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 $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]{8})?)?)(?:-\d+)?$"