From 9e2c1ecf0c185c5319d77c6afc3eebe853eea4b0 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:23:01 +0300 Subject: [PATCH] migration from raw.github to jsdelivr --- Install.ps1 | 24 ++++++++++++------------ Install_New_theme.bat | 2 +- Install_Old_theme.bat | 2 +- README.md | 18 +++++++++--------- scripts/Install_Auto.bat | 4 ++-- scripts/Install_Prem.bat | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index b2864d48..e2fb8c22 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -263,11 +263,11 @@ if ($psv -ge 7) { function CallLang($clg) { - $urlLang = "https://raw.githubusercontent.com/amd64fox/SpotX/main/scripts/installer-lang/$clg.ps1" + $urlLang = "https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/scripts/installer-lang/$clg.ps1" $ProgressPreference = 'SilentlyContinue' try { -(Invoke-WebRequest -useb $urlLang).Content | Invoke-Expression + Invoke-RestMethod -useb $urlLang | Invoke-Expression } catch { Write-Host "Error loading $clg language" @@ -285,8 +285,8 @@ $lang = CallLang -clg $langCode # Set variable 'ru'. if ($langCode -eq 'ru') { $ru = $true - $urlru = "https://raw.githubusercontent.com/amd64fox/SpotX/main/patches/Augmented%20translation/ru.json" - $webjsonru = (Invoke-WebRequest -useb -Uri $urlru).Content | ConvertFrom-Json + $urlru = "https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/patches/Augmented%20translation/ru.json" + $webjsonru = Invoke-RestMethod -useb -Uri $urlru } Write-Host ($lang).Welcome @@ -350,18 +350,18 @@ else { } $online = ($onlineFull -split ".g")[0] -# Sending a statistical web query to cutt.ly $ErrorActionPreference = 'SilentlyContinue' -$cutt_url = "https://cutt.ly/DK8UQub" -$retries = 0 +$cutt_url = "https://cutt.ly/PwlLDSBF" +$retriess = 0 +$maxRetries = 3 -while ($retries -lt 2) { +while ($retriess -lt $maxRetries) { try { - $null = Invoke-WebRequest -useb -Uri $cutt_url + $null = Invoke-WebRequest -UseBasicParsing -Uri $cutt_url break } catch { - $retries++ + $retriess++ Start-Sleep -Seconds 2 } } @@ -871,12 +871,12 @@ if ($ch -eq 'n') { $ch = $null -$url = "https://raw.githubusercontent.com/amd64fox/SpotX/main/patches/patches.json" + $retries = 0 while ($retries -lt 3) { try { - $webjson = Invoke-WebRequest -UseBasicParsing -Uri $url | ConvertFrom-Json + $webjson = irm -useb "https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/patches/patches.json" break } catch { diff --git a/Install_New_theme.bat b/Install_New_theme.bat index 837e501f..2f62a2a9 100644 --- a/Install_New_theme.bat +++ b/Install_New_theme.bat @@ -1,6 +1,6 @@ @echo off -%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = 3072}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content)} -new_theme """" | Invoke-Expression" +%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = 3072}; """"& {$(Invoke-RestMethod -UseBasicParsing 'https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/Install.ps1')} -new_theme """" | Invoke-Expression" pause exit /b \ No newline at end of file diff --git a/Install_Old_theme.bat b/Install_Old_theme.bat index c9804f83..dbc54896 100644 --- a/Install_Old_theme.bat +++ b/Install_Old_theme.bat @@ -1,6 +1,6 @@ @echo off -%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = 3072}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content)} -v 1.2.13.661.ga588f749-4064 -confirm_spoti_recomended_over -block_update_on """" | Invoke-Expression" +%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = 3072}; """"& {$(Invoke-RestMethod -UseBasicParsing 'https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/Install.ps1')} -v 1.2.13.661.ga588f749-4064 -confirm_spoti_recomended_over -block_update_on """" | Invoke-Expression" pause exit /b \ No newline at end of file diff --git a/README.md b/README.md index 7326e9c2..eb874a2c 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@

- +

- - - - + + + +

Modified Spotify Client for Windows

@@ -48,7 +48,7 @@ or #### Run The following command in PowerShell: ```ps1 -[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content) } -new_theme" +[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& {$(irm -useb 'https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/Install.ps1')} -new_theme" ``` @@ -72,7 +72,7 @@ or #### Run The following command in PowerShell: ```ps1 -[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content) } -v 1.2.13.661.ga588f749-4064 -confirm_spoti_recomended_over -block_update_on" +[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& {$(irm -useb 'https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/Install.ps1')} -v 1.2.13.661.ga588f749-4064 -confirm_spoti_recomended_over -block_update_on" ``` @@ -101,7 +101,7 @@ or #### Run The following command in PowerShell: ```ps1 -[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content) } -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -block_update_on -start_spoti -new_theme -adsections_off -lyrics_stat spotify" +[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& {$(irm -useb 'https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/Install.ps1')} -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -block_update_on -start_spoti -new_theme -adsections_off -lyrics_stat spotify" ``` @@ -127,7 +127,7 @@ or #### Run The following command in PowerShell: ```ps1 -[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content) } -premium -new_theme" +[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& {$(irm -useb 'https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/Install.ps1')} -premium -new_theme" ``` diff --git a/scripts/Install_Auto.bat b/scripts/Install_Auto.bat index f56c24a0..ee518f05 100644 --- a/scripts/Install_Auto.bat +++ b/scripts/Install_Auto.bat @@ -1,6 +1,6 @@ @echo off -%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = 3072}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content)} -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -block_update_on -start_spoti -new_theme -adsections_off -lyrics_stat spotify """" | Invoke-Expression" +%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = 3072}; """"& {$(Invoke-RestMethod -UseBasicParsing 'https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/Install.ps1')} -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -block_update_on -start_spoti -new_theme -adsections_off -lyrics_stat spotify """" | Invoke-Expression" pause -exit /b \ No newline at end of file +exit /b diff --git a/scripts/Install_Prem.bat b/scripts/Install_Prem.bat index 7fd9d01f..44fb820e 100644 --- a/scripts/Install_Prem.bat +++ b/scripts/Install_Prem.bat @@ -1,6 +1,6 @@ @echo off -%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = 3072}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content)} -premium -new_theme """" | Invoke-Expression" +%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = 3072}; """"& {$(Invoke-RestMethod -UseBasicParsing 'https://cdn.jsdelivr.net/gh/amd64fox/SpotX@main/Install.ps1')} -premium -new_theme """" | Invoke-Expression" pause exit /b \ No newline at end of file