mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-04-23 03:20:20 +10:00
version bump to 1.1.97.962
- fixed minor patch bugs for 97 - fixed attribute for "past lyrics"
This commit is contained in:
199
Install.ps1
199
Install.ps1
@@ -904,7 +904,10 @@ if (!($cache_on) -and !($cache_off)) {
|
|||||||
if ($exp_standart) { Write-Host ($lang).ExpStandart`n }
|
if ($exp_standart) { Write-Host ($lang).ExpStandart`n }
|
||||||
if ($exp_spotify) { Write-Host ($lang).ExpSpotify`n }
|
if ($exp_spotify) { Write-Host ($lang).ExpSpotify`n }
|
||||||
|
|
||||||
function Helper($paramname, $addstring) {
|
$url = "https://raw.githubusercontent.com/SpotX-CLI/SpotX-commons/main/patches.json"
|
||||||
|
$webjson = (Invoke-WebRequest -UseBasicParsing -Uri $url).Content | ConvertFrom-Json
|
||||||
|
$ofline = Check_verison_clients -param2 "offline"
|
||||||
|
function Helper($paramname) {
|
||||||
|
|
||||||
switch ( $paramname ) {
|
switch ( $paramname ) {
|
||||||
"HtmlLicMin" {
|
"HtmlLicMin" {
|
||||||
@@ -923,98 +926,51 @@ function Helper($paramname, $addstring) {
|
|||||||
"Lyrics-color" {
|
"Lyrics-color" {
|
||||||
# Static color for lyrics (xpui-routes-lyrics.css)
|
# Static color for lyrics (xpui-routes-lyrics.css)
|
||||||
|
|
||||||
$pasttext = "#ffffff4a", "#ffffffb8", "#ffffff6b", "#E40909B3"
|
$webjson.others.lyricscolor.replace[0] = '$1' + $webjson.others.lyricscolor.theme.$lyrics_stat.pasttext
|
||||||
$current = "#ffffffc7", "#ffffffc7", "#ffffffc7", "#C2C2C2"
|
$webjson.others.lyricscolor.replace[1] = '$1' + $webjson.others.lyricscolor.theme.$lyrics_stat.current
|
||||||
$next = "#ffffff4a", "#322319", "#2e080b", "#CA861A"
|
$webjson.others.lyricscolor.replace[2] = '$1' + $webjson.others.lyricscolor.theme.$lyrics_stat.next
|
||||||
$hover = "#ffffffc7", "#ffffffc7", "#ffffffc7", "#0FD40F"
|
$webjson.others.lyricscolor.replace[3] = '$1' + $webjson.others.lyricscolor.theme.$lyrics_stat.hover
|
||||||
$background = "#121212", "#956b4b", "#c62736f2", "#121212"
|
$webjson.others.lyricscolor.replace[4] = $webjson.others.lyricscolor.theme.$lyrics_stat.background
|
||||||
$maxmatch = "#ffffff94", "#322319", "#2e080b", "#C2C2C2"
|
$webjson.others.lyricscolor.replace[5] = '$1' + $webjson.others.lyricscolor.theme.$lyrics_stat.maxmatch
|
||||||
|
|
||||||
switch ($lyrics_stat) {
|
$contents = "lyricscolor"
|
||||||
1 {
|
$json = $webjson.others
|
||||||
$pasttextR = $pasttext[0]; $currentR = $current[0]; $nextR = $next[0]; $hoverR = $hover[0]; $backgroundR = $background[0]; $maxmatchR = $maxmatch[0]
|
|
||||||
}
|
|
||||||
2 {
|
|
||||||
$pasttextR = $pasttext[1]; $currentR = $current[1]; $nextR = $next[1]; $hoverR = $hover[1]; $backgroundR = $background[1]; $maxmatchR = $maxmatch[1]
|
|
||||||
}
|
|
||||||
3 {
|
|
||||||
$pasttextR = $pasttext[2]; $currentR = $current[2]; $nextR = $next[2]; $hoverR = $hover[2]; $backgroundR = $background[2]; $maxmatchR = $maxmatch[2]
|
|
||||||
}
|
|
||||||
4 {
|
|
||||||
$pasttextR = $pasttext[3]; $currentR = $current[3]; $nextR = $next[3]; $hoverR = $hover[3]; $backgroundR = $background[3]; $maxmatchR = $maxmatch[3]
|
|
||||||
}
|
|
||||||
Default {
|
|
||||||
$pasttextR = $pasttext[0]; $currentR = $current[0]; $nextR = $next[0]; $hoverR = $hover[0]; $backgroundR = $background[0]; $maxmatchR = $maxmatch[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
$lyrics = @{
|
|
||||||
pasttext = '(H2J92dVdr0ykdOX5azL1{color:)var\(--lyrics-color-active\)', "`$1$pasttextR"
|
|
||||||
current = '((TDPh45khCfG51fNwNIiw|E64X_eoy6xsJmDdKKHja){color:)var\(--lyrics-color-active\)', "`$1$currentR"
|
|
||||||
next = '(NHVfxGs2HwmI_fly2JC4{color:)var\(--lyrics-color-inactive\)' , "`$1$nextR"
|
|
||||||
hover = '(NHVfxGs2HwmI_fly2JC4:hover{color:)var\(--lyrics-color-active\)' , "`$1$hoverR"
|
|
||||||
background = 'var\(--lyrics-color-background\)', $backgroundR
|
|
||||||
maxmatch = '(iq4cgi0YEKr6DGaTtzUj{color:)var\(--lyrics-color-inactive\)', "`$1$maxmatchR"
|
|
||||||
}
|
|
||||||
$n = ($lang).NoVariable6
|
|
||||||
$contents = $lyrics
|
|
||||||
$paramdata = $xpui_lyrics
|
$paramdata = $xpui_lyrics
|
||||||
|
|
||||||
}
|
}
|
||||||
"Discriptions" {
|
"Discriptions" {
|
||||||
# Add discriptions (xpui-desktop-modals.js)
|
# Add discriptions (xpui-desktop-modals.js)
|
||||||
$discript = @{
|
|
||||||
Log = '((..createElement|children:\(.{1,7}\))\(....,{source:).....get\("about.copyright",.\),paragraphClassName:.}\)', "`$1`"<h3>More about SpotX</h3><a href=`'https://github.com/SpotX-CLI/SpotX-Win`'>Github</a><br/><a href=`'https://telegra.ph/SpotX-FAQ-09-19`'>FAQ</a><br/><a href=`'https://t.me/spotify_windows_mod`'>Telegram channel</a><br/><a href=`'https://github.com/SpotX-CLI/SpotX-Win/issues/new?assignees=&labels=%E2%9D%8C+bug&template=bug_report.yml`'>Create an issue report</a><br> <br/><h4>DISCLAIMER</h4>SpotX is a modified version of the official Spotify client, provided as an evaluation version, you use it at your own risk.`"})"
|
|
||||||
}
|
|
||||||
$n = ($lang).NoVariable6
|
$n = ($lang).NoVariable6
|
||||||
$contents = $discript
|
$contents = "discriptions"
|
||||||
|
$json = $webjson.others
|
||||||
$paramdata = $xpui_desktop_modals
|
$paramdata = $xpui_desktop_modals
|
||||||
|
|
||||||
}
|
}
|
||||||
"OffadsonFullscreen" {
|
"OffadsonFullscreen" {
|
||||||
$offadson_fullscreen = @{
|
|
||||||
# Removing a billboard on the homepage
|
if ($bts) { $webjson.free.psobject.properties.remove('bilboard'), $webjson.free.psobject.properties.remove('audioads') }
|
||||||
Bilboard = '.(\?\[.{1,6}[a-zA-Z].leaderboard,)', 'false$1'
|
|
||||||
# Removing audio ads
|
$webjson.free.psobject.properties.remove('submenudownload'), $webjson.free.psobject.properties.remove('veryhighstream'), $webjson.free.psobject.properties.remove('downloadicon')
|
||||||
AudioAds = '(case .:)return this.enabled=...+?(;case .:this.subscription=this.audioApi).+?(;case .)', '$1$2.cosmosConnector.increaseStreamTime(-100000000000)$3'
|
|
||||||
# Removing an empty block
|
|
||||||
EmptyBlockAd = 'adsEnabled:!0', 'adsEnabled:!1'
|
|
||||||
# Fullscreen act., removing upgrade menu, button
|
|
||||||
FullScreenAd = '(return|.=.=>)"free"===(.+?)(return|.=.=>)"premium"===', '$1"premium"===$2$3"free"==='
|
|
||||||
# Disabling a playlist sponsor
|
|
||||||
PlaylistSponsorsOff = 'allSponsorships', ''
|
|
||||||
# Connect unlock test for 1.1.91 >
|
|
||||||
ConnectUnlock = ' connect-device-list-item--disabled', ''
|
|
||||||
ConnectUnlock2 = 'connect-picker.unavailable-to-control', 'spotify-connect'
|
|
||||||
ConnectUnlock3 = '(className:.,disabled:)(..)', '$1false'
|
|
||||||
ConnectUnlock4 = 'return (..isDisabled)(\?(..createElement|\(.{1,10}\))\(..,)', 'return false$2'
|
|
||||||
# Removing the track download quality switch
|
|
||||||
DownloadQuality = '(\(.,..jsxs\)\(.{1,3}|..createElement\(.{1,4}),{filterMatchQuery:.{1,6}get\("desktop.settings.downloadQuality.title.+?(children:.{1,2}\(.,.\).+?,|xe\(.,.\).+?,)', ''
|
|
||||||
}
|
|
||||||
if ($bts) {
|
|
||||||
$offadson_fullscreen.Remove('Bilboard'), $offadson_fullscreen.Remove('AudioAds')
|
|
||||||
}
|
|
||||||
|
|
||||||
$n = ($lang).NoVariable2
|
$n = ($lang).NoVariable2
|
||||||
$contents = $offadson_fullscreen
|
$contents = $webjson.free.psobject.properties.name
|
||||||
|
$json = $webjson.free
|
||||||
$paramdata = $xpui_js
|
$paramdata = $xpui_js
|
||||||
}
|
}
|
||||||
"OffPodcasts" {
|
"OffPodcasts" {
|
||||||
# Turn off podcasts
|
# Turn off podcasts
|
||||||
$podcasts_off = @{
|
|
||||||
PodcastsOff = '(\!Array.isArray\(.\)\|\|.===..length)', "`$1||e.children[0].key.includes('episode')||e.children[0].key.includes('show')"
|
|
||||||
}
|
|
||||||
$n = ($lang).NoVariable5
|
$n = ($lang).NoVariable5
|
||||||
$contents = $podcasts_off
|
if ($ofline -le "1.1.96.785") { $podcats = "podcastsoff2" }
|
||||||
|
if ($ofline -ge "1.1.97.952") { $podcats = "podcastsoff3" }
|
||||||
|
$contents = $podcats
|
||||||
|
$json = $webjson.others
|
||||||
$paramdata = $xpui_homev2
|
$paramdata = $xpui_homev2
|
||||||
}
|
}
|
||||||
"OffRujs" {
|
"OffRujs" {
|
||||||
# Remove all languages except En and Ru from xpui.js
|
# Remove all languages except En and Ru from xpui.js
|
||||||
$rus_js = @{
|
|
||||||
OffRujs = '(\[a\.go\.en,)(.+?\])', '$1a.go.ru]'
|
|
||||||
}
|
|
||||||
$n = ($lang).NoVariable2
|
$n = ($lang).NoVariable2
|
||||||
$contents = $rus_js
|
$contents = "offrujs"
|
||||||
|
$json = $webjson.others
|
||||||
$paramdata = $xpui_js
|
$paramdata = $xpui_js
|
||||||
}
|
}
|
||||||
"RuTranslate" {
|
"RuTranslate" {
|
||||||
@@ -1120,57 +1076,73 @@ function Helper($paramname, $addstring) {
|
|||||||
|
|
||||||
"ExpFeature" {
|
"ExpFeature" {
|
||||||
# Experimental Feature Standart
|
# Experimental Feature Standart
|
||||||
$exp_features = @{
|
$rem = $webjson.exp.psobject.properties
|
||||||
LikedArtistPage = '(Enable Liked Songs section on Artist page",default:)(!1)', '$1true'
|
|
||||||
BlockUsers = '(Enable block users feature in clientX",default:)(!1)', '$1true'
|
if ($enhance_like_off) { $rem.remove('enhanceliked') }
|
||||||
Quicksilver = '(Enables quicksilver in-app messaging modal",default:)(!0)', '$1false'
|
if ($enhance_playlist_off) { $rem.remove('enhanceplaylist') }
|
||||||
IgnorInRec = '(Enable Ignore In Recommendations for desktop and web",default:)(!1)', '$1true'
|
if ($new_artist_pages_off) { $rem.remove('disographyartist') }
|
||||||
Prod = '(Enable Playlist Permissions flows for Prod",default:)(!1)', '$1true'
|
if ($new_lyrics_off) { $rem.remove('lyricsmatch') }
|
||||||
ShowingBalloons = '(Enable showing balloons on album release date anniversaries",default:)(!1)', '$1true'
|
if ($equalizer_off) { $rem.remove('equalizer') }
|
||||||
EnhanceLiked = '(Enable Enhance Liked Songs UI and functionality",default:)(!1)', '$1true'
|
if (!($device_picker_old)) { $rem.remove('devicepickerold') }
|
||||||
EnhancePlaylist = '(Enable Enhance Playlist UI and functionality for end-users",default:)(!1)', '$1true'
|
if ($made_for_you_off -or $ofline -ge "1.1.96.783") { $rem.remove('madeforyou') }
|
||||||
DisographyArtist = '(Enable a condensed disography shelf on artist pages",default:)(!1)', '$1true'
|
|
||||||
LyricsMatch = '(Enable Lyrics match labels in search results",default:)(!1)', '$1true'
|
|
||||||
Equalizer = '(Enable audio equalizer for Desktop and Web Player",default:)(!1)', '$1true'
|
|
||||||
DevicePickerOld = '(Enable showing a new and improved device picker UI",default:)(!.)', '$1false'
|
|
||||||
NewHome = '(Enable the new home structure and navigation",values:.,default:)(..DISABLED)', '$1true'
|
|
||||||
MadeForYou = '(Show "Made For You" entry point in the left sidebar.,default:)(!1)', '$1true'
|
|
||||||
ClearCache = '(Enable option in settings to clear all downloads",default:)(!1)', '$1true'
|
|
||||||
CarouselsonHome = '(Use carousels on Home",default:)(!1)', '$1true'
|
|
||||||
LeftSidebar = '(Enable Your Library X view of the left sidebar",default:)(!1)', '$1true'
|
|
||||||
LyricsEnabled = '(With this enabled, clients will check whether tracks have lyrics available",default:)(!1)', '$1true'
|
|
||||||
PlaylistCreation = '(Enables new playlist creation flow in Web Player and DesktopX",default:)(!1)', '$1true'
|
|
||||||
SearchBox = '(Adds a search box so users are able to filter playlists when trying to add songs to a playlist using the contextmenu",default:)(!1)', '$1true'
|
|
||||||
# "Create similar playlist" menu is activated for someone else's playlists
|
|
||||||
SimilarPlaylist = ',(.\.isOwnedBySelf&&)((\(.{0,11}\)|..createElement)\(.{1,3}Fragment,.+?{(uri:.|spec:.),(uri:.|spec:.).+?contextmenu.create-similar-playlist"\)}\),)' , ',$2$1'
|
|
||||||
}
|
|
||||||
$ofline = Check_verison_clients -param2 "offline"
|
|
||||||
if ($enhance_like_off) { $exp_features.Remove('EnhanceLiked') }
|
|
||||||
if ($enhance_playlist_off) { $exp_features.Remove('EnhancePlaylist') }
|
|
||||||
if ($new_artist_pages_off) { $exp_features.Remove('DisographyArtist') }
|
|
||||||
if ($new_lyrics_off) { $exp_features.Remove('LyricsMatch') }
|
|
||||||
if ($equalizer_off) { $exp_features.Remove('Equalizer') }
|
|
||||||
if (!($device_picker_old)) { $exp_features.Remove('DevicePickerOld') }
|
|
||||||
if ($made_for_you_off -or $ofline -ge "1.1.96.783") { $exp_features.Remove('MadeForYou') }
|
|
||||||
if ($exp_standart) {
|
if ($exp_standart) {
|
||||||
$exp_features.Remove('EnhanceLiked'), $exp_features.Remove('EnhancePlaylist'),
|
$rem.remove('enhanceliked'), $rem.remove('enhanceplaylist'),
|
||||||
$exp_features.Remove('DisographyArtist'), $exp_features.Remove('LyricsMatch'),
|
$rem.remove('disographyartist'), $rem.remove('lyricsmatch'),
|
||||||
$exp_features.Remove('Equalizer'), $exp_features.Remove('DevicePicker'),
|
$rem.remove('equalizer'), $rem.remove('devicepicker'),
|
||||||
$exp_features.Remove('NewHome'), $exp_features.Remove('MadeForYou'),
|
$rem.remove('newhome'), $rem.remove('madeforyou'),
|
||||||
$exp_features.Remove('SimilarPlaylist'), $exp_features.Remove('LeftSidebar')
|
$rem.remove('similarplaylist'), $rem.remove('leftsidebar')
|
||||||
}
|
}
|
||||||
if (!($left_sidebar_on) -or $ofline -le "1.1.94.872") { $exp_features.Remove('LeftSidebar') }
|
if (!($left_sidebar_on) -or $ofline -le "1.1.94.872") { $rem.remove('leftsidebar') }
|
||||||
if ($navalt_off) { $exp_features.Remove('NewHome'), $exp_features.Remove('LeftSidebar') }
|
if ($navalt_off) { $rem.remove('newhome'), $rem.remove('leftsidebar') }
|
||||||
if ($ofline -ge "1.1.94.864") {
|
if ($ofline -ge "1.1.94.864") {
|
||||||
$exp_features.Remove('LyricsEnabled'), $exp_features.Remove('PlaylistCreation'),
|
$rem.remove('lyricsenabled'), $rem.remove('playlistcreat'),
|
||||||
$exp_features.Remove('SearchBox')
|
$rem.remove('searchbox')
|
||||||
}
|
}
|
||||||
if ($ofline -le "1.1.93.896") { $exp_features.Remove('NewHome') }
|
if ($ofline -lt "1.1.90.859" -or $ofline -gt "1.1.95.893") { $rem.remove('devicepicker') }
|
||||||
|
if ($ofline -le "1.1.93.896") { $rem.remove('newhome') }
|
||||||
$n = ($lang).NoVariable2
|
$n = ($lang).NoVariable2
|
||||||
$contents = $exp_features
|
$contents = $webjson.exp.psobject.properties.name
|
||||||
|
$json = $webjson.exp
|
||||||
$paramdata = $xpui_js
|
$paramdata = $xpui_js
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($paramname -ne "HtmlLicMin" -or $paramname -ne "RuTranslate") {
|
||||||
|
|
||||||
|
$contents | ForEach-Object {
|
||||||
|
|
||||||
|
if ($json.$PSItem.match.Count -gt 1) {
|
||||||
|
$count = $json.$PSItem.match.Count - 1
|
||||||
|
$numbers = 0
|
||||||
|
While ($numbers -le $count) {
|
||||||
|
|
||||||
|
if ($paramdata -match $json.$PSItem.match[$numbers]) {
|
||||||
|
$paramdata = $paramdata -replace $json.$PSItem.match[$numbers], $json.$PSItem.replace[$numbers]
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
Write-Host ($lang).NoVariable"" -ForegroundColor red -NoNewline
|
||||||
|
Write-Host "`$contents.$PSItem $numbers"$n
|
||||||
|
}
|
||||||
|
$numbers++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($json.$PSItem.match.Count -eq 1) {
|
||||||
|
if ($paramdata -match $json.$PSItem.match) {
|
||||||
|
$paramdata = $paramdata -replace $json.$PSItem.match, $json.$PSItem.replace
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
if (!($paramname -eq "RuTranslate") -or $err_ru) {
|
||||||
|
|
||||||
|
Write-Host ($lang).NoVariable"" -ForegroundColor red -NoNewline
|
||||||
|
Write-Host "`$contents.$PSItem"$n
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($paramname -eq "HtmlLicMin" -or $paramname -eq "RuTranslate") {
|
||||||
$contents.Keys | Sort-Object | ForEach-Object {
|
$contents.Keys | Sort-Object | ForEach-Object {
|
||||||
|
|
||||||
if ($paramdata -match $contents.$PSItem[0]) {
|
if ($paramdata -match $contents.$PSItem[0]) {
|
||||||
@@ -1184,6 +1156,7 @@ function Helper($paramname, $addstring) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$paramdata
|
$paramdata
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<h1>System requirements</h1>
|
<h1>System requirements</h1>
|
||||||
|
|
||||||
- <strong>OS: Windows 7-11</strong>
|
- <strong>OS: Windows 7-11</strong>
|
||||||
- <strong>Spotify: Recommended official version [1.1.96.785](https://cutt.ly/8EH6NuH)</strong>
|
- <strong>Spotify: Recommended official version [1.1.97.962](https://cutt.ly/8EH6NuH)</strong>
|
||||||
- <strong>For Windows Desktop only (Microsoft store version is not suitable).</strong>
|
- <strong>For Windows Desktop only (Microsoft store version is not suitable).</strong>
|
||||||
- <strong>PowerShell: 3 or higher</strong>
|
- <strong>PowerShell: 3 or higher</strong>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user