From 527b6fb13789d61b5da5c49551e293ab00d5ed7f Mon Sep 17 00:00:00 2001 From: amd64fox Date: Sun, 15 Jan 2023 00:50:51 +0300 Subject: [PATCH] version bump to 1.2.3.1107 - added a new parameter '-new_theme' that activates a new theme (new right and left sidebar, some cover change) if the parameter is not specified, the old theme is activated - added bat files to install old and new theme - fixed static lyrics themes for 1.2.3 - fixed bug when submitting new version of Spotify to form - parameters 'left_sidebar_on' and 'right_sidebar_on' have been removed --- Install.ps1 | 26 +++++++-------- Install_New_theme.bat | 6 ++++ Install.bat => Install_Old_theme.bat | 12 +++---- README.md | 48 ++++++++++++++++++++++------ scripts/Install_Auto.bat | 2 +- scripts/Install_Prem.bat | 2 +- 6 files changed, 65 insertions(+), 31 deletions(-) create mode 100644 Install_New_theme.bat rename Install.bat => Install_Old_theme.bat (98%) diff --git a/Install.ps1 b/Install.ps1 index 484362e..69539c0 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -73,7 +73,7 @@ param [switch]$device_picker_old, [Parameter(HelpMessage = 'Disable the new home structure and navigation.')] - [switch]$navalt_off, + [switch]$new_theme, [Parameter(HelpMessage = 'Enable new left sidebar.')] [switch]$left_sidebar_on, @@ -447,7 +447,7 @@ function DesktopFolder { } # Recommended version for spotx -$online = "1.2.2.582" +$online = "1.2.3.1107" # Check version Spotify offline $offline = (Get-Item $spotifyExecutable).VersionInfo.FileVersion @@ -608,7 +608,9 @@ if ($spotifyInstalled) { $txt = [IO.File]::ReadAllText($spotifyExecutable) $regex = "(\d+)\.(\d+)\.(\d+)\.(\d+)(\.g[0-9a-f]{8})" $v = $txt | Select-String $regex -AllMatches - $version = $v.Matches.Value + $version = $v.Matches.Value[0] + if ($version.Count -gt 1) { $version = $version[0] } + $Parameters = @{ Uri = 'https://docs.google.com/forms/d/e/1FAIpQLSegGsAgilgQ8Y36uw-N7zFF6Lh40cXNfyl1ecHPpZcpD8kdHg/formResponse' Method = 'POST' @@ -1019,11 +1021,7 @@ function Helper($paramname) { $rem.remove('similarplaylist'), $rem.remove('leftsidebar'), $rem.remove('rightsidebar'), $rem.remove('badbunny'), $rem.remove('devicelocal'), $rem.remove('silencetrimmer'), $rem.remove('forgetdevice'), $rem.remove('speedpodcasts') , $rem.remove('showfollows') } - if (!($left_sidebar_on)) { $rem.remove('leftsidebar') } - if (!($right_sidebar_on)) { $rem.remove('rightsidebar'), $rem.remove('lyricssidebar') } - if ($navalt_off) { $rem.remove('newhome'), $rem.remove('newhome2') } - - $rem.remove('showfollows') + if (!($new_theme)) { $rem.remove('newhome'), $rem.remove('newhome2'), $rem.remove('leftsidebar'), $rem.remove('rightsidebar'), $rem.remove('lyricssidebar') } $name = "patches.json.exp." $n = "xpui.js" @@ -1266,12 +1264,13 @@ if ($test_js) { if ($lyrics_stat) { if ($offline -lt "1.1.99.871") { $name_file = 'xpui-routes-lyrics.css' + extract -counts 'one' -method 'nonezip' -name $name_file -helper 'Lyrics-color' } - if ($offline -ge "1.1.99.871") { + if ($offline -ge "1.1.99.871" -and $offline -le "1.2.2.582") { extract -counts 'one' -method 'nonezip' -name 'xpui.css' -helper 'Fix-New-Lirics' - $name_file = 'xpui-routes-lyrics.js' + $name_file = 'xpui-routes-lyrics.js' + extract -counts 'one' -method 'nonezip' -name $name_file -helper 'Lyrics-color' } - extract -counts 'one' -method 'nonezip' -name $name_file -helper 'Lyrics-color' # mini lyrics if ($offline -ge "1.2.0.1155") { $name_file = 'xpui.js' @@ -1403,13 +1402,14 @@ If ($test_spa) { # old if ($offline -lt "1.1.99.871") { $name_file = 'xpui-routes-lyrics.css' + extract -counts 'one' -method 'zip' -name $name_file -helper 'Lyrics-color' } # new - if ($offline -ge "1.1.99.871") { + if ($offline -ge "1.1.99.871" -and $offline -le "1.2.2.582") { extract -counts 'one' -method 'zip' -name 'xpui.css' -helper 'Fix-New-Lirics' $name_file = 'xpui-routes-lyrics.js' + extract -counts 'one' -method 'zip' -name $name_file -helper 'Lyrics-color' } - extract -counts 'one' -method 'zip' -name $name_file -helper 'Lyrics-color' # mini lyrics if ($offline -ge "1.2.0.1155") { $name_file = 'xpui.js' diff --git a/Install_New_theme.bat b/Install_New_theme.bat new file mode 100644 index 0000000..e1dd624 --- /dev/null +++ b/Install_New_theme.bat @@ -0,0 +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/SpotX-CLI/SpotX-Win/main/Install.ps1').Content)} -new_theme """" | Invoke-Expression" + +pause +exit /b \ No newline at end of file diff --git a/Install.bat b/Install_Old_theme.bat similarity index 98% rename from Install.bat rename to Install_Old_theme.bat index 558792d..8669ce6 100644 --- a/Install.bat +++ b/Install_Old_theme.bat @@ -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/SpotX-CLI/SpotX-Win/main/Install.ps1').Content | Invoke-Expression}" - -pause -exit /b +@echo off + +%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}"; "& {(Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content | Invoke-Expression}" + +pause +exit /b diff --git a/README.md b/README.md index 809a4e3..868e86f 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,39 @@

Fast installation / Update

Choose installation type:

-Usual installation

+

Usual installation (New theme)

#### During installation, you need to confirm some actions, also contains: - + + - New theme activated (new right and left sidebar, some cover change) - All [experimental features](https://github.com/SpotX-CLI/SpotX-Win/discussions/50) included

-#### Just download and run [Install.bat](https://raw.githack.com/SpotX-CLI/SpotX-Win/main/Install.bat) +#### Just download and run [Install.bat](https://raw.githack.com/SpotX-CLI/SpotX-Win/main/Install_New_theme.bat) + +or + +#### Run The following command in PowerShell: + +```ps1 +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content) } -new_theme" +``` + +
+ + +
+Usual installation (Old theme)

+ + #### During installation, you need to confirm some actions, also contains: + + - Old theme activated + - All [experimental features](https://github.com/SpotX-CLI/SpotX-Win/discussions/50) included + +

+ +#### Just download and run [Install.bat](https://raw.githack.com/SpotX-CLI/SpotX-Win/main/Install_Old_theme.bat) or @@ -52,18 +76,20 @@ or ```
- - +
Automatic full installation

Automatic installation without confirmation, what does it do?

+ - New theme activated (new right and left sidebar, some cover change) + - Hiding podcasts/episodes/audiobooks from the homepage + - Activated [static theme](https://github.com/SpotX-CLI/SpotX-Win/discussions/50#discussioncomment-4096066) spotify for lyrics + - Hiding [ad-like sections](https://github.com/SpotX-CLI/SpotX-Win/discussions/50#discussioncomment-4478943) + - All [experimental features](https://github.com/SpotX-CLI/SpotX-Win/discussions/50) included - Automatic removal of Spotify MS if it was found - Automatic installation of the recommended version of Spotify (if another client has already been found, it will be installed over) - - Hiding podcasts/episodes/audiobooks from the homepage - Automatic blocking of Spotify updates - - All [experimental features](https://github.com/SpotX-CLI/SpotX-Win/discussions/50) included - After the installation is completed, the client will autorun.

@@ -75,7 +101,7 @@ or #### Run The following command in PowerShell: ```ps1 -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content) } -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -cache_off -block_update_on -start_spoti" +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content) } -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -cache_off -block_update_on -start_spoti -new_theme -adsections_off -lyrics_stat spotify" ```
@@ -88,6 +114,7 @@ or #### Automatic basic installation without confirmation, what does it do? + - Old theme activated - Automatic removal of Spotify MS if it was found - Automatic installation of the recommended version of Spotify (if another client has already been found, it will be installed over) - After the installation is completed, the client will autorun @@ -110,7 +137,8 @@ or Installation for premium

#### Usual installation only without ad blocking, for those who have a premium account, also contains: - + + - New theme activated (new right and left sidebar, some cover change) - All [experimental features](https://github.com/SpotX-CLI/SpotX-Win/discussions/50) included

@@ -122,7 +150,7 @@ or #### Run The following command in PowerShell: ```ps1 -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content) } -premium" +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex "& { $((iwr -useb 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content) } -premium -new_theme" ``` diff --git a/scripts/Install_Auto.bat b/scripts/Install_Auto.bat index 6360fea..228f46a 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 = [Net.SecurityProtocolType]::Tls12}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content)} -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -cache_off -block_update_on -start_spoti """" | Invoke-Expression" +%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content)} -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_off -cache_off -block_update_on -start_spoti -new_theme -adsections_off -lyrics_stat spotify """" | Invoke-Expression" pause exit /b \ No newline at end of file diff --git a/scripts/Install_Prem.bat b/scripts/Install_Prem.bat index 6af2f33..4a4d461 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 = [Net.SecurityProtocolType]::Tls12}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content)} -premium """" | Invoke-Expression" +%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "&{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content)} -premium -new_theme """" | Invoke-Expression" pause exit /b \ No newline at end of file