From ba77e8cc0b8e79806b3bcc7c767b9b4bc20f9680 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Sat, 27 Jun 2026 02:20:15 +0300 Subject: [PATCH] preparing for 1.2.93 - support ui-licenses.html --- patches/patches.json | 14 +++++++------- run.ps1 | 14 +++++++++----- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/patches/patches.json b/patches/patches.json index 79b5ab0..28593f3 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -2487,14 +2487,14 @@ "to": "" }, "match": [ - "
  • zlib<\/a><\/li>\n(.|\n)*<\/p>(<\/div>)", - "\t", - " ", - "(?m)(^\\s*\r?\n)", - "\r?\n(?!\\(1|\\d)" + "(?s)
  • zlib<\/a><\/li>.*?<\/p>(<\/div>)|(

    Third-party licenses[^<]*Desktop UI code:<\/p>\\s*]*>(?:\\s*

  • .*?<\/a><\/li>){1,8}).*?(<\/ul>).*\\z|(

    Third-party licenses[^<]*Desktop UI code:<\/p>)\\s*\\z", + "\t|\\z", + " |\\z", + "(?m)(^\\s*\r?\n)|\\z", + "\r?\n(?!\\(1|\\d)|\\z" ], "replace": [ - "$2", + "$1$2$3$4", "", "", "", @@ -2781,4 +2781,4 @@ "replace": "$1(\"browsePage\"===$4.name?\"d8346883162a16a62a5b69e73e70c66a68c27b14265091cd9e1517f48334bbb3\":$3($4.body))" } } -} \ No newline at end of file +} diff --git a/run.ps1 b/run.ps1 index 034de2a..567d0f1 100644 --- a/run.ps1 +++ b/run.ps1 @@ -1936,9 +1936,9 @@ function Helper($paramname, [switch]$CheckOnly) { } switch ( $paramname ) { "HtmlLicMin" { - # licenses.html minification + # Licenses HTML minification $name = "patches.json.others." - $n = "licenses.html" + $n = $licensesFileName $contents = "htmlmin" $json = $webjson.others } @@ -2396,7 +2396,10 @@ function extract ($counts, $method, $name, $helper, $add, $patch) { $xpui_spa_patch = Join-Path (Join-Path $spotifyDirectory 'Apps') 'xpui.spa' $zip = [System.IO.Compression.ZipFile]::Open($xpui_spa_patch, 'update') $file = $zip.GetEntry($name) - if ($null -eq $file) { throw "Archive entry not found: $name" } + if ($null -eq $file) { + Write-Warning "Error: Archive entry not found: $name" + return + } $reader = New-Object System.IO.StreamReader($file.Open()) } elseif ($method -eq "nonezip") { @@ -3334,9 +3337,10 @@ if ($test_spa) { # Remove RTL and minification of all *.css extract -counts 'more' -name '*.css' -helper 'Cssmin' - # licenses.html minification + # Licenses HTML minification - extract -counts 'one' -method 'zip' -name 'licenses.html' -helper 'HtmlLicMin' + $licensesFileName = if ([version]$offline -ge [version]'1.2.93') { 'ui-licenses.html' } else { 'licenses.html' } + extract -counts 'one' -method 'zip' -name $licensesFileName -helper 'HtmlLicMin' # blank.html minification extract -counts 'one' -method 'zip' -name 'blank.html' -helper 'HtmlBlank'