Skip to content

feat(app): auto-update linked modpacks before launch and in background#6438

Open
amnesiaof wants to merge 6 commits into
modrinth:mainfrom
amnesiaof:auto-modpack-update
Open

feat(app): auto-update linked modpacks before launch and in background#6438
amnesiaof wants to merge 6 commits into
modrinth:mainfrom
amnesiaof:auto-modpack-update

Conversation

@amnesiaof

Copy link
Copy Markdown

Adds an auto_update_modpack setting per profile. When enabled for a linked modpack, checks for and applies updates before launching and periodically in the background.

Backend (packages/app-lib, apps/app):

  • New auto_update_modpack INTEGER NULL column on the profiles table + migration
  • New auto_update_modpack: Option<bool> field on Profile, deserialized from DB
  • Added to EditProfile with double_option serde, wired into profile_edit
  • Pre-launch check in run_credentials: if enabled and update available, runs update
  • auto_update_all_modpacks() — iterates all profiles, skips running ones, updates if enabled
  • Background task in main.rs: spawns after 30s, runs auto-update every 60 minutes
  • Exposed as Tauri command profile_auto_update_all_modpacks

Frontend (apps/app-frontend):

  • auto_update_modpack?: boolean on GameInstance type
  • Toggle in GeneralSettings.vue (visible only for linked modpacks via hasLinkedModpack)
  • Saves on toggle via edit() with local/remote sync watchers
  • i18n messages for label and description

The main idea is the auto-update flow itself — code can be tightened up on review if needed.

@modrinth-bot

Copy link
Copy Markdown
Member

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants