feat(service): add auto-apply on Spotify updates#3839
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis PR introduces a background service mechanism for Spicetify that automatically checks for updates and maintains the applied patch state. It adds a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI as spicetify CLI
participant Config as Config File
participant Startup as Startup Manager
participant OS as OS/System
User->>CLI: spicetify service install
CLI->>Config: SetServiceAutoUpdate(true)
Config-->>CLI: Write Service.auto_update=1
CLI->>Startup: SyncServiceStartup(true)
Startup->>OS: Resolve executable path
Startup->>Startup: Create parent directories
Startup->>OS: Write startup artifact (.cmd/.desktop/.plist)
OS-->>Startup: Artifact created
Startup-->>CLI: Sync complete
CLI-->>User: Service installed and enabled
sequenceDiagram
participant OS as OS/System
participant Service as Service Monitor
participant Config as Config File
participant Spotify as Spotify
participant CLI as spicetify CLI
OS->>Service: Start() on system boot/interval
Service->>Config: Read Service.auto_update & interval_seconds
loop Every poll cycle
Service->>Config: Reparse config & backup state
Service->>Service: Check if patch applied or interval expired
alt Healing needed
Service->>Service: heal()
Service->>CLI: cmd.Update(version)
Service->>Spotify: Kill if patch missing
Service->>CLI: cmd.Apply(version)
Service-->>Service: Update last state & timestamp
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
|
Spicetify was never designed to run in background, and also it's out of scope of the "CLI" app. Sorry |
This change adds an automatic self-healing service for Spicetify. It runs in the background, checks for new Spicetify releases on startup and every 6 hours, and reapplies the patch when needed. The installer now enables the service automatically, and
spicetify restoredisables it so user intent is respected.Summary by CodeRabbit
Release Notes
spicetify servicecommand with install, enable, disable, and status subcommands