diff --git a/Install.ps1 b/Install.ps1
index 185eb47..87cbb10 100644
--- a/Install.ps1
+++ b/Install.ps1
@@ -183,7 +183,6 @@ function DesktopFolder {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Stop-Process -Name Spotify
-Stop-Process -Name SpotifyWebHelper
if ($verPS -lt 3) {
do {
@@ -269,7 +268,30 @@ if ($spotifyInstalled) {
}
}
while ($ch -notmatch '^y$|^n$')
- if ($ch -eq 'y') { $upgrade_client = $true }
+ if ($ch -eq 'y') {
+ $upgrade_client = $true
+
+ do {
+ $ch = Read-Host -Prompt "Do you want to uninstall the current version of $offline or install over it? Y [Uninstall] / N [Install Over]"
+ Write-Host ""
+ if (!($ch -eq 'n' -or $ch -eq 'y')) {
+ incorrectValue
+ }
+ }
+ while ($ch -notmatch '^y$|^n$')
+
+ if ($ch -eq 'y') {
+ Write-Host "Uninstall Spotify..."
+ Write-Host ""
+ cmd /c $spotifyExecutable /UNINSTALL /SILENT
+ wait-process -name SpotifyUninstall
+ Start-Sleep -Milliseconds 200
+ }
+ if ($ch -eq 'n') { $ch = $null }
+ }
+ if ($ch -eq 'n') {
+ $downgrading = $true
+ }
}
if ($online -lt $offline) {
@@ -293,9 +315,32 @@ if ($spotifyInstalled) {
while ($ch -notmatch '^y$|^n$')
if ($ch -eq 'y') {
$upgrade_client = $true
+ $downgrading = $true
+ do {
+ $ch = Read-Host -Prompt "Do you want to uninstall the current version of $offline or install over it? Y [Uninstall] / N [Install Over]"
+ Write-Host ""
+ if (!($ch -eq 'n' -or $ch -eq 'y')) {
+ incorrectValue
+ }
+ }
+ while ($ch -notmatch '^y$|^n$')
+
+ if ($ch -eq 'y') {
+ Write-Host "Uninstall Spotify..."
+ Write-Host ""
+ cmd /c $spotifyExecutable /UNINSTALL /SILENT
+ wait-process -name SpotifyUninstall
+ Start-Sleep -Milliseconds 200
+ }
+ if ($ch -eq 'n') { $ch = $null }
}
+
if ($ch -eq 'n') {
Write-Host "script is stopped"
+ $tempDirectory = $PWD
+ Pop-Location
+ Start-Sleep -Milliseconds 200
+ Remove-Item -Recurse -LiteralPath $tempDirectory
Exit
}
}
@@ -329,9 +374,9 @@ if (-not $spotifyInstalled -or $upgrade_client) {
while (-not (get-process | Where-Object { $_.ProcessName -eq 'SpotifySetup' })) {}
wait-process -name SpotifySetup
+
+ wait-process -name SpotifySetup
Stop-Process -Name Spotify
- Stop-Process -Name SpotifyWebHelper
- Stop-Process -Name SpotifyFullSetup
}
@@ -355,8 +400,14 @@ do {
while ($ch -notmatch '^y$|^n$')
if ($ch -eq 'y') { $podcasts_off = $true }
+
+if ($downgrading) { $upd = "`nYou have had a downgrade of Spotify, it is recommended to block" }
+
+else { $upd = "" }
+
do {
- $ch = Read-Host -Prompt "Want to block updates ? (Y/N)"
+ $ch = Read-Host -Prompt "Want to block updates ? (Y/N)$upd"
+
Write-Host ""
if (!($ch -eq 'n' -or $ch -eq 'y')) { incorrectValue }
}
@@ -408,7 +459,7 @@ function OffAdsOnFullscreen {
$empty_block_ad = 'adsEnabled:!0', 'adsEnabled:!1'
# Full screen mode activation and removing "Upgrade to premium" menu, upgrade button
- $full_screen = 'return"free"===(.+?)return"premium"===', 'return"premium"===$1return"free"==='
+ $full_screen = '(return|.=.=>)"free"===(.+?)(return|.=.=>)"premium"===', '$1"premium"===$2$3"free"==='
# Disabling a playlist sponsor
$playlist_ad_off = "allSponsorships"
@@ -434,10 +485,12 @@ function ExpFeature {
$exp_features8 = '(Enable Enhance Playlist UI and functionality for end-users",default:)(!1)', '$1!0'
$exp_features9 = '(Enable a condensed disography shelf on artist pages",default:)(!1)', '$1!0'
$exp_features10 = '(Enable the new fullscreen lyrics page",default:)(!1)', '$1!0'
+
if ($ofline -eq "1.1.84.716") {
$exp_features11 = '(lyrics_format:)(.)', '$1"fullscreen"'
}
$exp_features12 = '(Enable Playlist Permissions flows for Prod",default:)(!1)', '$1!0'
+ $exp_features13 = '(Enable Enhance Liked Songs UI and functionality",default:)(!1)', '$1!0'
if ($xpui_js -match $exp_features1[0]) { $xpui_js = $xpui_js -replace $exp_features1[0], $exp_features1[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features1[0] in xpui.js" }
if ($xpui_js -match $exp_features2[0]) { $xpui_js = $xpui_js -replace $exp_features2[0], $exp_features2[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features2[0] in xpui.js" }
@@ -453,6 +506,7 @@ function ExpFeature {
if ($xpui_js -match $exp_features11[0]) { $xpui_js = $xpui_js -replace $exp_features11[0], $exp_features11[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features11[0] in xpui.js" }
}
if ($xpui_js -match $exp_features12[0]) { $xpui_js = $xpui_js -replace $exp_features12[0], $exp_features12[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features12[0] in xpui.js" }
+ if ($xpui_js -match $exp_features13[0]) { $xpui_js = $xpui_js -replace $exp_features13[0], $exp_features13[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features13[0] in xpui.js" }
$xpui_js
}
diff --git a/Install_Rus.ps1 b/Install_Rus.ps1
index 9bd324b..9ae204f 100644
--- a/Install_Rus.ps1
+++ b/Install_Rus.ps1
@@ -183,7 +183,6 @@ function DesktopFolder {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Stop-Process -Name Spotify
-Stop-Process -Name SpotifyWebHelper
if ($verPS -lt 3) {
do {
@@ -269,7 +268,30 @@ if ($spotifyInstalled) {
}
}
while ($ch -notmatch '^y$|^n$')
- if ($ch -eq 'y') { $upgrade_client = $true }
+ if ($ch -eq 'y') {
+ $upgrade_client = $true
+
+ do {
+ $ch = Read-Host -Prompt "Вы хотите удалить текущую версию $offline или установить поверх нее? Y [Удалить] / N [Поверх]"
+ Write-Host ""
+ if (!($ch -eq 'n' -or $ch -eq 'y')) {
+ incorrectValue
+ }
+ }
+ while ($ch -notmatch '^y$|^n$')
+
+ if ($ch -eq 'y') {
+ Write-Host "Удаление Spotify..."
+ Write-Host ""
+ cmd /c $spotifyExecutable /UNINSTALL /SILENT
+ wait-process -name SpotifyUninstall
+ Start-Sleep -Milliseconds 200
+ }
+ if ($ch -eq 'n') { $ch = $null }
+ }
+ if ($ch -eq 'n') {
+ $downgrading = $true
+ }
}
if ($online -lt $offline) {
@@ -293,8 +315,31 @@ if ($spotifyInstalled) {
while ($ch -notmatch '^y$|^n$')
if ($ch -eq 'y') {
$upgrade_client = $true
+ $downgrading = $true
+ do {
+ $ch = Read-Host -Prompt "Вы хотите удалить текущую версию $offline или установить поверх нее? Y [Удалить] / N [Поверх]"
+ Write-Host ""
+ if (!($ch -eq 'n' -or $ch -eq 'y')) {
+ incorrectValue
+ }
+ }
+ while ($ch -notmatch '^y$|^n$')
+
+ if ($ch -eq 'y') {
+ Write-Host "Удаление Spotify..."
+ Write-Host ""
+ cmd /c $spotifyExecutable /UNINSTALL /SILENT
+ wait-process -name SpotifyUninstall
+ Start-Sleep -Milliseconds 200
+ }
+ if ($ch -eq 'n') { $ch = $null }
}
+
if ($ch -eq 'n') {
+ $tempDirectory = $PWD
+ Pop-Location
+ Start-Sleep -Milliseconds 200
+ Remove-Item -Recurse -LiteralPath $tempDirectory
Write-Host "скрипт остановлен"
Exit
}
@@ -328,10 +373,10 @@ if (-not $spotifyInstalled -or $upgrade_client) {
Start-Process -FilePath explorer.exe -ArgumentList $PWD\SpotifySetup.exe
while (-not (get-process | Where-Object { $_.ProcessName -eq 'SpotifySetup' })) {}
wait-process -name SpotifySetup
-
+
+
+ wait-process -name SpotifySetup
Stop-Process -Name Spotify
- Stop-Process -Name SpotifyWebHelper
- Stop-Process -Name SpotifyFullSetup
}
@@ -355,8 +400,13 @@ do {
while ($ch -notmatch '^y$|^n$')
if ($ch -eq 'y') { $podcasts_off = $true }
+
+if ($downgrading) { $upd = "`nУ вас было понижение версии Spotify, рекомендуется заблокировать" }
+
+else { $upd = "" }
+
do {
- $ch = Read-Host -Prompt "Хотите заблокировать обновления ? (Y/N)"
+ $ch = Read-Host -Prompt "Хотите заблокировать обновления ? (Y/N)$upd"
Write-Host ""
if (!($ch -eq 'n' -or $ch -eq 'y')) { incorrectValue }
}
@@ -408,7 +458,7 @@ function OffAdsOnFullscreen {
$empty_block_ad = 'adsEnabled:!0', 'adsEnabled:!1'
# Активация полноэкранного режима, а также удаление кнопки и меню "Перейти на Premium"
- $full_screen = 'return"free"===(.+?)return"premium"===', 'return"premium"===$1return"free"==='
+ $full_screen = '(return|.=.=>)"free"===(.+?)(return|.=.=>)"premium"===', '$1"premium"===$2$3"free"==='
# Отключиние спонсорской рекламы в некоторых плейлистах
$playlist_ad_off = "allSponsorships"
@@ -447,6 +497,7 @@ function ExpFeature {
$exp_features11 = '(lyrics_format:)(.)', '$1"fullscreen"'
}
$exp_features12 = '(Enable Playlist Permissions flows for Prod",default:)(!1)', '$1!0'
+ $exp_features13 = '(Enable Enhance Liked Songs UI and functionality",default:)(!1)', '$1!0'
if ($xpui_js -match $exp_features1[0]) { $xpui_js = $xpui_js -replace $exp_features1[0], $exp_features1[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features1[0] в xpui.js" }
if ($xpui_js -match $exp_features2[0]) { $xpui_js = $xpui_js -replace $exp_features2[0], $exp_features2[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features2[0] в xpui.js" }
@@ -461,7 +512,8 @@ function ExpFeature {
if ($ofline -eq "1.1.84.716") {
if ($xpui_js -match $exp_features11[0]) { $xpui_js = $xpui_js -replace $exp_features11[0], $exp_features11[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features11[0] в xpui.js" }
}
- if ($xpui_js -match $exp_features12[0]) { $xpui_js = $xpui_js -replace $exp_features12[0], $exp_features12[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features12[0] в xpui.js" }
+ if ($xpui_js -match $exp_features12[0]) { $xpui_js = $xpui_js -replace $exp_features12[0], $exp_features12[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features12[0] in xpui.js" }
+ if ($xpui_js -match $exp_features13[0]) { $xpui_js = $xpui_js -replace $exp_features13[0], $exp_features13[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features13[0] in xpui.js" }
$xpui_js
}
diff --git a/README.md b/README.md
index f1901c5..510d198 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@
* OS: Windows 7-11
-* Spotify: Recommended official version [1.1.85.895](https://cutt.ly/8EH6NuH)
+* Spotify: Recommended official version [1.1.86.857](https://cutt.ly/8EH6NuH)
* For Windows Desktop only (Microsoft store version is not suitable).
* Free Account
* PowerShell: 3 or higher
@@ -30,6 +30,7 @@
* Blocks automatic updates (optional)
* Automatic [cache clearing](https://github.com/amd64fox/SpotX/discussions/2) (optional)
* Enabled [enhance playlist](https://user-images.githubusercontent.com/62529699/166843349-f544e354-3ce2-439b-9ac6-06010c9d7f9b.jpg)
+* Enabled [enhance liked songs UI](https://user-images.githubusercontent.com/62529699/170522581-d060ed8f-a508-4fbc-921f-98e3ece22c91.jpg)
* Enabled [new lyrics](https://www.reddit.com/r/truespotify/comments/uhj8ie/just_found_out_you_can_jump_to_a_lyrics_on/)
* Enabled [new search with chips experience](https://www.reddit.com/r/truespotify/comments/tt305m/new_search_with_chips_experience/)
* Enabled [a condensed discography shelf on artist pages](https://www.reddit.com/r/truespotify/comments/svc77g/condensed_discography_shelf_on_artist_pages/)