r/spicetify • • 6h ago

Showcase Spicetify Pantry: back up and restore your extensions and their settings

Post image
2 Upvotes

Spicetify forgets. Pantry doesn't.

Spotify updates kept wiping my extension settings, so I built a small Windows app for it.

Needs: the regular Spotify installer (not the Microsoft Store version). It isn't code-signed, so SmartScreen asks first: More info → Run anyway.

Feedback and bug reports welcome!


r/spicetify • • 8h ago

Showcase Auto re-apply Spicetify every time Spotify updates (Windows, no shortcut changes)

1 Upvotes

Every time Spotify updated, Spicetify got wiped and I had to run spicetify backup apply manually. I saw a lot of people complaining about the same thing, so I made a small script that does it automatically.

What it does: it creates a Windows scheduled task that runs at logon and every hour. It checks Spotify's version and, only if it changed, runs spicetify backup apply. If there's no update, it does nothing.

Why not spicetify auto? I know about spicetify auto, but it only works if you always open Spotify from that custom shortcut. This works no matter how you open Spotify (taskbar, startup, Start menu, links), and it runs silently in the background.

Requirements: Spicetify already installed and applied, and the Spotify app from the website (not the Microsoft Store version).

Install: open PowerShell (no admin needed), paste this and press Enter:

$dir = "$env:LOCALAPPDATA\spicetify-auto"
New-Item -ItemType Directory -Force $dir | Out-Null
@'
$dir       = Split-Path -Parent $MyInvocation.MyCommand.Path
$stateFile = Join-Path $dir 'last-spotify-version.txt'
$logFile   = Join-Path $dir 'auto-apply.log'
$spotify   = Join-Path $env:APPDATA 'Spotify\Spotify.exe'
if (-not (Test-Path $spotify)) { exit 0 }
$current = (Get-Item $spotify).VersionInfo.ProductVersion
$last = ''
if (Test-Path $stateFile) { $last = (Get-Content $stateFile -Raw).Trim() }
if ($current -ne $last) {
    Add-Content $logFile "$(Get-Date -Format s)  Spotify $last -> $current, running backup apply"
    & "$env:LOCALAPPDATA\spicetify\spicetify.exe" backup apply | Out-Null
    if ($LASTEXITCODE -eq 0) { Set-Content $stateFile $current -Encoding utf8; Add-Content $logFile "$(Get-Date -Format s)  OK" }
    else { Add-Content $logFile "$(Get-Date -Format s)  FAILED (exit $LASTEXITCODE)" }
}
'@ | Set-Content "$dir\auto-apply.ps1" -Encoding utf8
(Get-Item "$env:APPDATA\Spotify\Spotify.exe").VersionInfo.ProductVersion | Set-Content "$dir\last-spotify-version.txt" -Encoding utf8
$action   = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$dir\auto-apply.ps1`""
$t1       = New-ScheduledTaskTrigger -AtLogOn -User $env:USERNAME
$t2       = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Hours 1)
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable
Register-ScheduledTask -TaskName "Spicetify Auto Apply" -Action $action -Trigger $t1,$t2 -Settings $settings -Force | Out-Null
Write-Host "Done: Spicetify will re-apply automatically when Spotify updates."

The log is saved at %LOCALAPPDATA%\spicetify-auto\auto-apply.log.

To remove it:

Unregister-ScheduledTask "Spicetify Auto Apply" -Confirm:$false; Remove-Item -Recurse "$env:LOCALAPPDATA\spicetify-auto"

Note: if Spotify is open when an update is detected, it restarts and the music stops for a moment.

Feedback welcome! 🎧