feat: persist imported resource packs in IndexedDB with selection storage#47
Merged
feat: persist imported resource packs in IndexedDB with selection storage#47
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add respackStorage service using IndexedDB for storing resource packs - Auto-load stored resource packs on page mount - Save imported resource packs (with converted audio) to IndexedDB - Persist selected resource pack ID in localStorage - Remove stored resource packs from IndexedDB on deletion - Handle de-duplication when re-importing existing packs - Add i18n messages for saving/loading stored resource packs Co-authored-by: Naptie <57532127+Naptie@users.noreply.github.com> Agent-Logs-Url: https://github.com/PhiZone/player/sessions/9a9239fc-1e4b-4616-a2c1-7b28f3770232
Co-authored-by: Naptie <57532127+Naptie@users.noreply.github.com> Agent-Logs-Url: https://github.com/PhiZone/player/sessions/9a9239fc-1e4b-4616-a2c1-7b28f3770232
Copilot
AI
changed the title
[WIP] Store imported resource packs locally using IndexedDB
feat: persist imported resource packs in IndexedDB with selection storage
Mar 21, 2026
Naptie
approved these changes
Mar 21, 2026
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.
Resource packs were lost on page reload, requiring re-import and re-selection every session. Audio in resource packs is already FFmpeg-converted to WAV during import, so storing the post-conversion form eliminates re-processing on reload entirely.
Changes
New
src/lib/services/respackStorage.ts— IndexedDB service (phizone_playerdatabase,resource_packsstore) withsaveRespack/loadAllRespacks/deleteRespack. Files are stored as{data: Blob, name, type}tuples and reconstructed asFileobjects on load. Selected pack ID persisted via localStorage.src/routes/(app)/+page.svelteinit()addOrReplaceRespack()helper handles upsert + reactivity + async persistence_respackDBskeletoni18n — Added
saving_respack/loading_stored_respacksmessages (en, zh)Storage format
Since audio is already WAV (48kHz stereo) post-import,
canPlayType('audio/wav')passes on all browsers — no FFmpeg load or progress bar on reload.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.jsdelivr.net/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/player/player/node_modules/.bin/../@inlang/paraglide-js/bin/run.js compile --project ./project.inlang(dns block)eu.posthog.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/player/player/node_modules/.bin/../@inlang/paraglide-js/bin/run.js compile --project ./project.inlang(dns block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.