From 86fe0fb96bbb4d5712f0ba5332b1e53976648ae6 Mon Sep 17 00:00:00 2001 From: amd64fox Date: Thu, 17 Feb 2022 16:03:44 +0300 Subject: [PATCH] Regex fix for podcasts --- Install.ps1 | 2 +- Install_rus.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index 9689221..b5b2497 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -325,7 +325,7 @@ function OffUpdStatus { } function OffPodcasts { # Turn off podcasts - $podcasts_off1 = '"album,playlist,artist,show,station,episode"', '"album,playlist,artist,station"' + $podcasts_off1 = 'album,playlist,artist,show,station,episode', 'album,playlist,artist,station' $podcasts_off2 = ',this[.]enableShows=[a-z]' if ($xpui_js -match $podcasts_off1[0]) { $xpui_js = $xpui_js -replace $podcasts_off1[0], $podcasts_off1[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$podcasts_off1[0] in xpui.js" } if ($xpui_js -match $podcasts_off2) { $xpui_js = $xpui_js -replace $podcasts_off2, "" } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$podcasts_off2 in xpui.js" } diff --git a/Install_rus.ps1 b/Install_rus.ps1 index d202524..151dff4 100644 --- a/Install_rus.ps1 +++ b/Install_rus.ps1 @@ -324,7 +324,7 @@ function OffUpdStatus { } function OffPodcasts { # Отключить подкасты - $podcasts_off1 = '"album,playlist,artist,show,station,episode"', '"album,playlist,artist,station"' + $podcasts_off1 = 'album,playlist,artist,show,station,episode', 'album,playlist,artist,station' $podcasts_off2 = ',this[.]enableShows=[a-z]' if ($xpui_js -match $podcasts_off1[0]) { $xpui_js = $xpui_js -replace $podcasts_off1[0], $podcasts_off1[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$podcasts_off1[0] в xpui.js" } if ($xpui_js -match $podcasts_off2) { $xpui_js = $xpui_js -replace $podcasts_off2, "" } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$podcasts_off2 в xpui.js" }