mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-04-11 17:37:21 +10:00
version bump to 1.2.19.937
- fixed regex to block updates - migration from raw.githubusercontent.com to cdn.statically.io (attempt to fix blocking of raw files by some providers) #471 - minor code fix
This commit is contained in:
47
Install.ps1
47
Install.ps1
@@ -257,17 +257,13 @@ if ($psv -ge 7) {
|
||||
Import-Module Appx -UseWindowsPowerShell -WarningAction:SilentlyContinue
|
||||
}
|
||||
|
||||
# Country check
|
||||
$country = [System.Globalization.RegionInfo]::CurrentRegion.EnglishName
|
||||
|
||||
# add Tls12
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
[Net.ServicePointManager]::SecurityProtocol = 3072
|
||||
|
||||
|
||||
function CallLang($clg) {
|
||||
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$urlLang = "https://raw.githubusercontent.com/amd64fox/SpotX/main/scripts/installer-lang/$clg.ps1"
|
||||
$urlLang = "https://cdn.statically.io/gh/amd64fox/SpotX/main/scripts/installer-lang/$clg.ps1"
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
try {
|
||||
@@ -289,7 +285,7 @@ $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"
|
||||
$urlru = "https://cdn.statically.io/gh/amd64fox/SpotX/main/patches/Augmented%20translation/ru.json"
|
||||
$webjsonru = (Invoke-WebRequest -useb -Uri $urlru).Content | ConvertFrom-Json
|
||||
}
|
||||
|
||||
@@ -337,7 +333,7 @@ if (!($version -and $version -match $match_v)) {
|
||||
}
|
||||
else {
|
||||
# Recommended version for Win 10-12
|
||||
$onlineFull = "1.2.18.999.g9b38fc27-20"
|
||||
$onlineFull = "1.2.19.937.gf6e7cff9-258"
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -361,7 +357,7 @@ $retries = 0
|
||||
|
||||
while ($retries -lt 2) {
|
||||
try {
|
||||
Invoke-WebRequest -useb -Uri $cutt_url | Out-Null
|
||||
$null = Invoke-WebRequest -useb -Uri $cutt_url
|
||||
break
|
||||
}
|
||||
catch {
|
||||
@@ -596,9 +592,10 @@ if ($spotifyInstalled) {
|
||||
$offline = (Get-Item $spotifyExecutable).VersionInfo.FileVersion
|
||||
|
||||
# Version comparison
|
||||
# converting strings to arrays of numbers using the -split operator and a ForEach-Object loop
|
||||
$arr1 = $online -split '\.' | ForEach-Object { [int]$_ }
|
||||
$arr2 = $offline -split '\.' | ForEach-Object { [int]$_ }
|
||||
# converting strings to arrays of numbers using the -split operator and a foreach loop
|
||||
|
||||
$arr1 = $online -split '\.' | foreach { [int]$_ }
|
||||
$arr2 = $offline -split '\.' | foreach { [int]$_ }
|
||||
|
||||
# compare each element of the array in order from most significant to least significant.
|
||||
for ($i = 0; $i -lt $arr1.Length; $i++) {
|
||||
@@ -649,7 +646,7 @@ if ($spotifyInstalled) {
|
||||
if ($confirm_spoti_recomended_over) { $ch = 'n' }
|
||||
if ($ch -eq 'y') {
|
||||
Write-Host ($lang).DelOld`n
|
||||
Unlock-Folder | Out-Null
|
||||
$null = Unlock-Folder
|
||||
cmd /c $spotifyExecutable /UNINSTALL /SILENT
|
||||
wait-process -name SpotifyUninstall
|
||||
Start-Sleep -Milliseconds 200
|
||||
@@ -668,6 +665,10 @@ if ($spotifyInstalled) {
|
||||
if ($testversion) {
|
||||
# Submit unsupported version of Spotify to google form for further processing
|
||||
try {
|
||||
|
||||
# Country check
|
||||
$country = [System.Globalization.RegionInfo]::CurrentRegion.EnglishName
|
||||
|
||||
$txt = [IO.File]::ReadAllText($spotifyExecutable)
|
||||
$regex = "(\d+)\.(\d+)\.(\d+)\.(\d+)(\.g[0-9a-f]{8})"
|
||||
$v = $txt | Select-String $regex -AllMatches
|
||||
@@ -685,7 +686,7 @@ if ($spotifyInstalled) {
|
||||
'entry.2067427976' = $online + " < " + $offline
|
||||
}
|
||||
}
|
||||
Invoke-WebRequest -useb @Parameters | Out-Null
|
||||
$null = Invoke-WebRequest -useb @Parameters
|
||||
}
|
||||
catch {
|
||||
Write-Host 'Unable to submit new version of Spotify'
|
||||
@@ -740,7 +741,7 @@ if ($spotifyInstalled) {
|
||||
if ($confirm_spoti_recomended_over) { $ch = 'n' }
|
||||
if ($ch -eq 'y') {
|
||||
Write-Host ($lang).DelNew`n
|
||||
Unlock-Folder | Out-Null
|
||||
$null = Unlock-Folder
|
||||
cmd /c $spotifyExecutable /UNINSTALL /SILENT
|
||||
wait-process -name SpotifyUninstall
|
||||
Start-Sleep -Milliseconds 200
|
||||
@@ -774,7 +775,7 @@ if (-not $spotifyInstalled -or $upgrade_client) {
|
||||
$ErrorActionPreference = 'SilentlyContinue'
|
||||
taskkill /f /im Spotify.exe /t > $null 2>&1
|
||||
Start-Sleep -Milliseconds 600
|
||||
Unlock-Folder | Out-Null
|
||||
$null = Unlock-Folder
|
||||
Start-Sleep -Milliseconds 200
|
||||
Get-ChildItem $spotifyDirectory -Exclude 'Users', 'prefs' | Remove-Item -Recurse -Force
|
||||
Start-Sleep -Milliseconds 200
|
||||
@@ -870,7 +871,7 @@ if ($ch -eq 'n') {
|
||||
|
||||
$ch = $null
|
||||
|
||||
$url = "https://raw.githubusercontent.com/amd64fox/SpotX/main/patches/patches.json"
|
||||
$url = "https://cdn.statically.io/gh/amd64fox/SpotX/main/patches/patches.json"
|
||||
$retries = 0
|
||||
|
||||
while ($retries -lt 3) {
|
||||
@@ -1063,7 +1064,7 @@ function Helper($paramname) {
|
||||
|
||||
foreach ($obj in $objects) {
|
||||
$propertiesToRemove = $obj.Object.Name | Where-Object { $_ -notin $obj.PropertiesToKeep }
|
||||
$propertiesToRemove | ForEach-Object {
|
||||
$propertiesToRemove | foreach {
|
||||
$obj.Object.Remove($_)
|
||||
}
|
||||
}
|
||||
@@ -1213,7 +1214,7 @@ function Helper($paramname) {
|
||||
$novariable = "Didn't find variable "
|
||||
$offline_patch = $offline -replace '(\d+\.\d+\.\d+)(.\d+)', '$1'
|
||||
|
||||
$contents | ForEach-Object {
|
||||
$contents | foreach {
|
||||
|
||||
if ( $json.$PSItem.version.to ) { $to = [version]$json.$PSItem.version.to -ge [version]$offline_patch } else { $to = $true }
|
||||
if ( $json.$PSItem.version.fr ) { $fr = [version]$json.$PSItem.version.fr -le [version]$offline_patch } else { $fr = $false }
|
||||
@@ -1280,7 +1281,7 @@ function extract ($counts, $method, $name, $helper, $add, $patch) {
|
||||
if ($method -eq "nonezip") { $writer = New-Object System.IO.StreamWriter -ArgumentList $file }
|
||||
$writer.BaseStream.SetLength(0)
|
||||
$writer.Write($xpui)
|
||||
if ($add) { $add | ForEach-Object { $writer.Write([System.Environment]::NewLine + $PSItem ) } }
|
||||
if ($add) { $add | foreach { $writer.Write([System.Environment]::NewLine + $PSItem ) } }
|
||||
$writer.Close()
|
||||
if ($method -eq "zip") { $zip.Dispose() }
|
||||
}
|
||||
@@ -1288,7 +1289,7 @@ function extract ($counts, $method, $name, $helper, $add, $patch) {
|
||||
Add-Type -Assembly 'System.IO.Compression.FileSystem'
|
||||
$xpui_spa_patch = Join-Path (Join-Path $env:APPDATA 'Spotify\Apps') 'xpui.spa'
|
||||
$zip = [System.IO.Compression.ZipFile]::Open($xpui_spa_patch, 'update')
|
||||
$zip.Entries | Where-Object FullName -like $name | ForEach-Object {
|
||||
$zip.Entries | Where-Object FullName -like $name | foreach {
|
||||
$reader = New-Object System.IO.StreamReader($_.Open())
|
||||
$xpui = $reader.ReadToEnd()
|
||||
$reader.Close()
|
||||
@@ -1402,12 +1403,12 @@ If ($test_spa) {
|
||||
|
||||
# Remove all languages except En and Ru from xpui.spa
|
||||
if ($ru) {
|
||||
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression') | Out-Null
|
||||
$null = [Reflection.Assembly]::LoadWithPartialName('System.IO.Compression')
|
||||
$stream = New-Object IO.FileStream($xpui_spa_patch, [IO.FileMode]::Open)
|
||||
$mode = [IO.Compression.ZipArchiveMode]::Update
|
||||
$zip_xpui = New-Object IO.Compression.ZipArchive($stream, $mode)
|
||||
|
||||
($zip_xpui.Entries | Where-Object { $_.FullName -match "i18n" -and $_.FullName -inotmatch "(ru|en.json|longest)" }) | ForEach-Object { $_.Delete() }
|
||||
($zip_xpui.Entries | Where-Object { $_.FullName -match "i18n" -and $_.FullName -inotmatch "(ru|en.json|longest)" }) | foreach { $_.Delete() }
|
||||
|
||||
$zip_xpui.Dispose()
|
||||
$stream.Close()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}; """"& { $((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-WebRequest -UseBasicParsing 'https://cdn.statically.io/gh/amd64fox/SpotX/main/Install.ps1').Content)} -new_theme """" | Invoke-Expression"
|
||||
|
||||
pause
|
||||
exit /b
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}; """"& { $((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-WebRequest -UseBasicParsing 'https://cdn.statically.io/gh/amd64fox/SpotX/main/Install.ps1').Content)} -v 1.2.13.661.ga588f749-4064 -confirm_spoti_recomended_over -block_update_on """" | Invoke-Expression"
|
||||
|
||||
pause
|
||||
exit /b
|
||||
18
README.md
18
README.md
@@ -1,12 +1,12 @@
|
||||
<p align="center">
|
||||
<a href="https://github.com/amd64fox/SpotX/releases"><img src="https://raw.githubusercontent.com/amd64fox/SpotX/main/.github/Pic/logo.png" />
|
||||
<a href="https://github.com/amd64fox/SpotX/releases"><img src="https://cdn.statically.io/gh/amd64fox/SpotX/main/.github/Pic/logo.png" />
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://t.me/spotify_windows_mod"><img src="https://raw.githubusercontent.com/amd64fox/SpotX/main/.github/Pic/Shields/SpotX_Channel.svg"></a>
|
||||
<a href="https://t.me/SpotxCommunity"><img src="https://raw.githubusercontent.com/amd64fox/SpotX/main/.github/Pic/Shields/SpotX_Community.svg"></a>
|
||||
<a href="https://github.com/jetfir3/SpotX-Bash"><img src="https://raw.githubusercontent.com/amd64fox/SpotX/main/.github/Pic/Shields/SpotX_for_Mac&Linux.svg"></a>
|
||||
<a href="https://telegra.ph/SpotX-FAQ-09-19"><img src="https://raw.githubusercontent.com/amd64fox/SpotX/main/.github/Pic/Shields/faq.svg"></a>
|
||||
<a href="https://t.me/spotify_windows_mod"><img src="https://cdn.statically.io/gh/amd64fox/SpotX/main/.github/Pic/Shields/SpotX_Channel.svg"></a>
|
||||
<a href="https://t.me/SpotxCommunity"><img src="https://cdn.statically.io/gh/amd64fox/SpotX/main/.github/Pic/Shields/SpotX_Community.svg"></a>
|
||||
<a href="https://github.com/jetfir3/SpotX-Bash"><img src="https://cdn.statically.io/gh/amd64fox/SpotX/main/.github/Pic/Shields/SpotX_for_Mac&Linux.svg"></a>
|
||||
<a href="https://telegra.ph/SpotX-FAQ-09-19"><img src="https://cdn.statically.io/gh/amd64fox/SpotX/main/.github/Pic/Shields/faq.svg"></a>
|
||||
</p>
|
||||
|
||||
<h2> <div align="center"><b> Modified Spotify Client for Windows </b></div> </h2>
|
||||
@@ -48,7 +48,7 @@ or
|
||||
#### Run The following command in PowerShell:
|
||||
|
||||
```ps1
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content) } -new_theme"
|
||||
[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& { $((iwr -useb 'https://cdn.statically.io/gh/amd64fox/SpotX/main/Install.ps1').Content) } -new_theme"
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -72,7 +72,7 @@ or
|
||||
#### Run The following command in PowerShell:
|
||||
|
||||
```ps1
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; 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 "& { $((iwr -useb 'https://cdn.statically.io/gh/amd64fox/SpotX/main/Install.ps1').Content) } -v 1.2.13.661.ga588f749-4064 -confirm_spoti_recomended_over -block_update_on"
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -101,7 +101,7 @@ or
|
||||
#### Run The following command in PowerShell:
|
||||
|
||||
```ps1
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; 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 "& { $((iwr -useb 'https://cdn.statically.io/gh/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"
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -127,7 +127,7 @@ or
|
||||
#### Run The following command in PowerShell:
|
||||
|
||||
```ps1
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content) } -premium -new_theme"
|
||||
[Net.ServicePointManager]::SecurityProtocol = 3072; iex "& { $((iwr -useb 'https://cdn.statically.io/gh/amd64fox/SpotX/main/Install.ps1').Content) } -premium -new_theme"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
@@ -264,6 +264,15 @@
|
||||
"fr": "1.2.18",
|
||||
"to": ""
|
||||
}
|
||||
},
|
||||
"AudiobookAdExclusivity": {
|
||||
"name": "enableAudiobookAdExclusivity",
|
||||
"description": "Enable Audiobook Ad Formats Exclusivity",
|
||||
"native_description": "Enable Audiobook Ad Formats Exclusivity",
|
||||
"version": {
|
||||
"fr": "1.2.19",
|
||||
"to": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"EnableExp": {
|
||||
@@ -597,7 +606,7 @@
|
||||
"native_description": "Enable list view for Live Events feed",
|
||||
"version": {
|
||||
"fr": "1.2.14",
|
||||
"to": ""
|
||||
"to": "1.2.18"
|
||||
}
|
||||
},
|
||||
"ConcertsTicketPrice": {
|
||||
@@ -676,6 +685,16 @@
|
||||
"to": "1.1.96"
|
||||
}
|
||||
},
|
||||
"LyricsUpsell": {
|
||||
"name": "forceLyricsUpsell",
|
||||
"description": "Force Lyrics Upsell for testing",
|
||||
"native_description": "Force Lyrics Upsell for testing",
|
||||
"value": "CONTROL",
|
||||
"version": {
|
||||
"fr": "1.2.19",
|
||||
"to": ""
|
||||
}
|
||||
},
|
||||
"NavAlt2": {
|
||||
"name": "enableNavAltExperiment2",
|
||||
"description": "Enable the new home structure and navigation",
|
||||
@@ -692,8 +711,8 @@
|
||||
"fr": "1.1.58",
|
||||
"to": ""
|
||||
},
|
||||
"add": "(?<=wg:\/\/desktop-update\/.)7(\/update)",
|
||||
"match": "(?<=wg:\/\/desktop-update\/.)2(\/update)",
|
||||
"add": "(?<=desktop-update\/.)7(\/update)",
|
||||
"match": "(?<=desktop-update\/.)2(\/update)",
|
||||
"replace": "7/update"
|
||||
},
|
||||
"podcast_ad_block": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}; """"& { $((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-WebRequest -UseBasicParsing 'https://cdn.statically.io/gh/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"
|
||||
|
||||
pause
|
||||
exit /b
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}; """"& { $((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-WebRequest -UseBasicParsing 'https://cdn.statically.io/gh/amd64fox/SpotX/main/Install.ps1').Content)} -premium -new_theme """" | Invoke-Expression"
|
||||
|
||||
pause
|
||||
exit /b
|
||||
Reference in New Issue
Block a user