Rolling back code with podcasts

This commit is contained in:
amd64fox
2021-12-05 13:00:36 +03:00
parent 0ab5daddce
commit d69b95262b
3 changed files with 11 additions and 11 deletions

View File

@@ -153,7 +153,7 @@ Remove-Item -Recurse -LiteralPath $tempDirectory
do {
$ch = Read-Host -Prompt "Want to remove podcasts from the home page ? (Y/N)"
$ch = Read-Host -Prompt "Want to turn off podcasts ? (Y/N)"
Write-Host ""
if (!($ch -eq 'n' -or $ch -eq 'y')) {
@@ -197,10 +197,10 @@ If (Test-Path $xpui_js_patch) {
<# Removing "Upgrade to premium" menu #> -replace 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.', $menu_split_js `
<# Disabling a playlist sponsor #> -replace "allSponsorships", ""
# Disable podcasts on the homepage
# Disable Podcast
if ($Podcasts_off) {
$new_js = $new_js `
-replace '"album,playlist,artist,show,station,episode"', '"album,playlist,artist,station"'
-replace '"album,playlist,artist,show,station,episode"', '"album,playlist,artist,station"' -replace ',this[.]enableShows=[a-z]', ""
}
Set-Content -Path $xpui_js_patch -Force -Value $new_js
@@ -253,10 +253,10 @@ If (Test-Path $xpui_spa_patch) {
<# Disabling a playlist sponsor #> -replace "allSponsorships", "" `
<# Disable Logging #> -replace "sp://logging/v3/\w+", ""
# Disable podcasts on the homepage
# Disable Podcast
if ($Podcasts_off) {
$xpuiContents = $xpuiContents `
-replace '"album,playlist,artist,show,station,episode"', '"album,playlist,artist,station"'
-replace '"album,playlist,artist,show,station,episode"', '"album,playlist,artist,station"' -replace ',this[.]enableShows=[a-z]', ""
}
$writer = New-Object System.IO.StreamWriter($entry_xpui.Open())