From f2e5a70a740ad3c46ddb92691a42564a3b7a0a49 Mon Sep 17 00:00:00 2001 From: amd64fox Date: Sat, 13 Nov 2021 16:05:53 +0300 Subject: [PATCH] Typos - Minor fix - typos --- cache-spotify.ps1 | 12 ++++++------ cache_spotify_ru.ps1 | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cache-spotify.ps1 b/cache-spotify.ps1 index 0a51077..536e944 100644 --- a/cache-spotify.ps1 +++ b/cache-spotify.ps1 @@ -1,13 +1,13 @@ # Launch Spotify.exe and wait for the process to stop Start-Process -FilePath $env:APPDATA\Spotify\Spotify.exe; wait-process -name Spotify -# This block deletes files by the last access time to it, files that have not been changed and have not been opened for more than the number of days you have selected will be deleted. If you need to replace with another number of days, then substitute the value in the 6th row and 113th column (The default is 7 days). -If(Test-Path -Path $env:LOCALAPPDATA\Spotify\Data){ -Get-ChildItem $env:LOCALAPPDATA\Spotify\Data -File -Recurse |Where-Object lastaccesstime -lt (get-date).AddDays(-7) |Remove-Item +# This block deletes files by the last access time to it, files that have not been changed and have not been opened for more than the number of days you have selected will be deleted. If you need to replace with another number of days, then substitute the value in the 6th row and 118th column (The default is 7 days). +If (Test-Path -Path $env:LOCALAPPDATA\Spotify\Data) { + Get-ChildItem $env:LOCALAPPDATA\Spotify\Data -File -Recurse | Where-Object lastaccesstime -lt (get-date).AddDays(-7) | Remove-Item } # Delete the file mercury.db if its size exceeds 100 MB. -If(Test-Path -Path $env:LOCALAPPDATA\Spotify\mercury.db){ -$file_mercury = Get-Item "$env:LOCALAPPDATA\Spotify\mercury.db" -if ($file_mercury.length -gt 100MB) {Get-ChildItem $env:LOCALAPPDATA\Spotify\mercury.db -File -Recurse | Remove-Item} +If (Test-Path -Path $env:LOCALAPPDATA\Spotify\mercury.db) { + $file_mercury = Get-Item "$env:LOCALAPPDATA\Spotify\mercury.db" + if ($file_mercury.length -gt 100MB) { Get-ChildItem $env:LOCALAPPDATA\Spotify\mercury.db -File -Recurse | Remove-Item } } \ No newline at end of file diff --git a/cache_spotify_ru.ps1 b/cache_spotify_ru.ps1 index afb3c36..71a349b 100644 --- a/cache_spotify_ru.ps1 +++ b/cache_spotify_ru.ps1 @@ -10,4 +10,4 @@ If (Test-Path -Path $env:LOCALAPPDATA\Spotify\Data) { If (Test-Path -Path $env:LOCALAPPDATA\Spotify\mercury.db) { $file_mercury = Get-Item "$env:LOCALAPPDATA\Spotify\mercury.db" if ($file_mercury.length -gt 100MB) { Get-ChildItem $env:LOCALAPPDATA\Spotify\mercury.db -File -Recurse | Remove-Item } -} +} \ No newline at end of file