mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-08-09 09:31:09 +10:00
fix(installer): avoid duplicate pause prompts
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@echo off
|
||||
|
||||
:: Line for changing spotx parameters, each parameter should be separated by a space
|
||||
set param=-new_theme
|
||||
set param=-new_theme -no_pause
|
||||
|
||||
set url='https://raw.githubusercontent.com/SpotX-Official/SpotX/refs/heads/main/run.ps1'
|
||||
set url2='https://spotx-official.github.io/SpotX/run.ps1'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@echo off
|
||||
|
||||
:: Line for changing spotx parameters, each parameter should be separated by a space
|
||||
set param=-v 1.2.13.661.ga588f749 -confirm_spoti_recomended_over -block_update_on
|
||||
set param=-v 1.2.13.661.ga588f749 -confirm_spoti_recomended_over -block_update_on -no_pause
|
||||
|
||||
set url='https://raw.githubusercontent.com/SpotX-Official/SpotX/refs/heads/main/run.ps1'
|
||||
set url2='https://spotx-official.github.io/SpotX/run.ps1'
|
||||
|
||||
@@ -27,6 +27,9 @@ param
|
||||
[Alias('cp')]
|
||||
[string]$CustomPatchesPath,
|
||||
|
||||
[Parameter(HelpMessage = 'Skip pause before exit')]
|
||||
[switch]$no_pause,
|
||||
|
||||
[Parameter(HelpMessage = "Use github.io mirror instead of raw.githubusercontent.")]
|
||||
[Alias("m")]
|
||||
[switch]$mirror,
|
||||
@@ -364,15 +367,17 @@ function Stop-Script {
|
||||
|
||||
Write-Host $Message
|
||||
|
||||
switch ($Host.Name) {
|
||||
"Windows PowerShell ISE Host" {
|
||||
pause
|
||||
break
|
||||
}
|
||||
default {
|
||||
Write-Host ($lang).PressAnyKey
|
||||
[void][System.Console]::ReadKey($true)
|
||||
break
|
||||
if (-not $no_pause) {
|
||||
switch ($Host.Name) {
|
||||
"Windows PowerShell ISE Host" {
|
||||
pause
|
||||
break
|
||||
}
|
||||
default {
|
||||
Write-Host ($lang).PressAnyKey
|
||||
[void][System.Console]::ReadKey($true)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
Exit
|
||||
@@ -412,7 +417,7 @@ function CallLang($clg) {
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error loading $clg language"
|
||||
Pause
|
||||
if (-not $no_pause) { Pause }
|
||||
Exit
|
||||
}
|
||||
}
|
||||
@@ -3139,7 +3144,7 @@ if ($test_spa) {
|
||||
else {
|
||||
$binary_exe_bak = [System.IO.Path]::GetFileName($exe_bak)
|
||||
Write-Warning ("Backup copy {0} not found. Please reinstall Spotify and run SpotX again" -f $binary_exe_bak)
|
||||
Pause
|
||||
if (-not $no_pause) { Pause }
|
||||
Exit
|
||||
}
|
||||
|
||||
@@ -3150,7 +3155,7 @@ if ($test_spa) {
|
||||
else {
|
||||
$binary_chrome_elf_bak = [System.IO.Path]::GetFileName($chrome_elf_bak)
|
||||
Write-Warning ("Backup copy {0} not found. Please reinstall Spotify and run SpotX again" -f $binary_chrome_elf_bak)
|
||||
Pause
|
||||
if (-not $no_pause) { Pause }
|
||||
Exit
|
||||
}
|
||||
|
||||
@@ -3158,7 +3163,7 @@ if ($test_spa) {
|
||||
}
|
||||
else {
|
||||
Write-Host ($lang).NoRestore`n
|
||||
Pause
|
||||
if (-not $no_pause) { Pause }
|
||||
Exit
|
||||
}
|
||||
|
||||
@@ -3404,7 +3409,7 @@ if ($regex1 -and $regex2 -and $regex3 -and $regex4 -and $regex5) {
|
||||
if (-not (Test-Path -LiteralPath $spotify_binary_bak)) {
|
||||
$name_binary = [System.IO.Path]::GetFileName($spotify_binary_bak)
|
||||
Write-Warning ("Backup copy {0} not found. Please reinstall Spotify and run SpotX again" -f $name_binary)
|
||||
Pause
|
||||
if (-not $no_pause) { Pause }
|
||||
Exit
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@echo off
|
||||
|
||||
:: Line for changing spotx parameters, each parameter should be separated by a space
|
||||
set param=-confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -block_update_on -start_spoti -new_theme -adsections_off -lyrics_stat spotify
|
||||
set param=-confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -block_update_on -start_spoti -new_theme -adsections_off -lyrics_stat spotify -no_pause
|
||||
|
||||
set url='https://raw.githubusercontent.com/SpotX-Official/SpotX/refs/heads/main/run.ps1'
|
||||
set url2='https://spotx-official.github.io/SpotX/run.ps1'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@echo off
|
||||
|
||||
:: Line for changing spotx parameters, each parameter should be separated by a space
|
||||
set param=-premium -new_theme
|
||||
set param=-premium -new_theme -no_pause
|
||||
|
||||
set url='https://raw.githubusercontent.com/SpotX-Official/SpotX/refs/heads/main/run.ps1'
|
||||
set url2='https://spotx-official.github.io/SpotX/run.ps1'
|
||||
|
||||
Reference in New Issue
Block a user