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
This commit is contained in:
amd64fox
2023-01-15 00:50:51 +03:00
parent 5883896ae1
commit 527b6fb137
6 changed files with 65 additions and 31 deletions

View File

@@ -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'

6
Install_New_theme.bat Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -33,15 +33,39 @@
<h1>Fast installation / Update</h1>
<h3>Choose installation type:</h3>
<details>
<summary><small>Usual installation</small></summary><p>
<summary><small>Usual installation (New theme)</small></summary><p>
#### 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
<h4> </h4>
#### 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"
```
</details>
<details>
<summary><small>Usual installation (Old theme)</small></summary><p>
#### 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
<h4> </h4>
#### 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
```
</details>
<details>
<summary><small>Automatic full installation</small></summary><p>
<h4>Automatic installation without confirmation, what does it do?</h4>
- 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) <kbd>spotify</kbd> 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.
<h4> </h4>
@@ -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"
```
</details>
@@ -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
<summary><small>Installation for premium</small></summary><p>
#### 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
<h4> </h4>
@@ -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"
```
</details>

View File

@@ -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

View File

@@ -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