Add option to skip syncing assets for installed systems and modules#86
Open
Noisyink wants to merge 1 commit into
Open
Add option to skip syncing assets for installed systems and modules#86Noisyink wants to merge 1 commit into
Noisyink wants to merge 1 commit into
Conversation
Adds a new sync toggle 'Skip assets for installed systems & modules (recreated on install)' that is checked by default. When enabled, assets under modules/<id>/ for any installed module and under systems/<id>/ for the active system are excluded from the download pass, since a local package install recreates those files. A persistent-storage carve-out always syncs <type>/<id>/storage/ when the package declares persistentStorage in its manifest. The full Forge inventory is kept for the WorldMigration DB-rewrite step so that references to skipped assets are still remapped to their local paths correctly. Implements iteration 1 of ForgeVTT#24. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #24.
Adds an Asset Sync toggle (on by default) that skips downloading assets under
modules/<id>/andsystems/<id>/when<id>is an installed package, since those files are recreated locally on package install. Assets for packages that are not installed still sync. The persistent-storage carve-out (<type>/<id>/storage/) always syncs when the manifest setspersistentStorage: true. World and compendium database rewrites are unaffected, since they still receive the full asset map.First iteration: systems are detected via
game.system.idonly. Multi-system detection viaFilePicker.browseis left for a follow-up, as discussed in the issue.Test plan
Verified on Foundry v14.363 against a real Forge library of 39,542 assets, via a live Asset Sync run:
modules/<id>/and the currentsystems/<id>/are skipped before any download. With four matching modules present ingame.modules(764 + 25 + 9 + 4 assets), the console loggedskipping 802 assets/folders belonging to installed packagesand none of those folders received files.persistentStorage: true, the skip count dropped to 796, i.e. its sixstorage/entries synced instead of being skipped.game.modules, and any non-current system, still sync. Paths outsidemodules//systems/are never skipped.game.modules/game.system.id), including the apiKeyPath-prefix andstorage/edge cases.