Skip to content

Commit

Permalink
version bump to 1.2.3.1107
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
amd64fox committed Jan 14, 2023
1 parent 5883896 commit 527b6fb
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 30 deletions.
26 changes: 13 additions & 13 deletions Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
6 changes: 6 additions & 0 deletions Install_New_theme.bat
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions Install.bat → Install_Old_theme.bat
Original file line number Diff line number Diff line change
@@ -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
46 changes: 37 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,63 @@
<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; (iwr -useb 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content | iex
[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

#### Run The following command in PowerShell:

```ps1
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (iwr -useb 'https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/Install.ps1').Content | iex
```

</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>
Expand All @@ -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>
Expand All @@ -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
Expand All @@ -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>
Expand All @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion scripts/Install_Auto.bat
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/Install_Prem.bat
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 527b6fb

Please sign in to comment.