Cache cleanup optimization

- Fixed slow client startup if cache purge was set
- Now there is a log file (Spotify/cache/log.txt) in which you can find information about the script to clear the cache.
- A little code optimization
This commit is contained in:
amd64fox
2022-02-05 22:43:40 +03:00
parent b8e870a086
commit 9c22f6d34d
8 changed files with 168 additions and 70 deletions

View File

@@ -48,15 +48,8 @@ if exist "%Appdata%\Spotify\SpotifyMigrator.bak" (
)
)
if exist "%Appdata%\Spotify\Spotify.vbs" (
del /f /s /q %Appdata%\Spotify\Spotify.vbs > NUL 2>&1
)
if exist "%Appdata%\Spotify\cache-spotify.ps1" (
del /f /s /q %Appdata%\Spotify\cache-spotify.ps1 > NUL 2>&1
del /f /s /q %Userprofile%\Desktop\Spotify.lnk > NUL 2>&1
if exist "%Appdata%\Spotify\cache" (
rd /s /q %Appdata%\Spotify\cache > NUL 2>&1
SET Esc_LinkDest=%Userprofile%\Desktop\Spotify.lnk
SET Esc_LinkTarget=%Appdata%\Spotify\Spotify.exe