49 Commits

Author SHA1 Message Date
Brandon T. Kowalski 83f7224d37 fix: fuzzy title matching for PSP saves
SFO titles like "BUST A MOVE DELUXE" don't match RomM names like
"Bust-a-Move: Deluxe". Fall back to normalized matching (lowercase,
strip punctuation, collapse spaces) when exact name lookup misses.
Only triggered for directory save platforms (PSP).
2026-03-28 15:53:38 -04:00
Brandon T. Kowalski c4e52aa578 feat: PSP directory save sync with zip upload/download
Add support for PPSSPP directory-based saves. The scan detects save
folders by Game ID, resolves titles via the embedded PSP GameDB, and
matches against the ROM cache by name. Uploads zip the directory,
downloads extract it. Adds GetRomByNameLookup to the cache layer and
ZipDirectory/UnzipToDirectory helpers.
2026-03-28 14:46:27 -04:00
Brandon T. Kowalski 21d8d9775e refactor: remove no-op getCollectionInternalIDLocked wrapper 2026-03-28 01:11:56 -04:00
Brandon T. Kowalski b9eb9257a9 fix: rename Collectionssynced to CollectionsSynced 2026-03-28 00:46:46 -04:00
Brandon T. Kowalski 6d3c6de204 refactor: extract appendJunctionFilters helper and remove duplication
Extract the junction table EXISTS subquery logic into a shared helper.
Replaces 3 copy-pasted blocks (~60 lines) with one-line calls.
2026-03-28 00:40:29 -04:00
Brandon T. Kowalski 64b3a0fbcb fix: remove dead code
Remove unused DownloadRoms, DownloadRomsQuery, fetchAllGames, and
endpointRomsDownload. ROM downloads are handled by gabagool's
DownloadManager which streams to disk. fetchAllGames was replaced
by per-platform streaming in the memory optimization PR.
2026-03-28 00:39:49 -04:00
Brandon T. Kowalski 158115a4cd fix: use actual fetched count for sync tracking and drop legacy platform_id
fetchPlatformGames now returns the count of games actually fetched
instead of using the server's total ROMCount, which was incorrect for
incremental syncs. Removed deprecated platform_id query param in favor
of platform_ids. Applied gofmt.
2026-03-27 20:37:51 -04:00
ljtilley 761ac2ad16 revert: DefaultRomPageSize to 1000 after memory optimization 2026-03-27 16:39:05 -07:00
ljtilley 09bac9fc69 fix: optimize SQLite bulk load settings to reduce memory usage 2026-03-27 16:31:24 -07:00
ljtilley 76551efa69 fix: optimize resolveLookupID and batchInsertJunction for improved performance with caching 2026-03-27 16:31:08 -07:00
ljtilley 347ae58e15 fix: add PlatformIDs field for newer RomM instances while maintaining backwards compatibility 2026-03-27 15:27:50 -07:00
ljtilley dca9fda8ab fix: optimize memory usage during platform game fetching to prevent OOM crashes on 128MB devices 2026-03-27 15:27:13 -07:00
ljtilley 7b32710849 reduce page size to see if it fixes OOM on miyoo 128MB devices 2026-03-27 14:28:39 -07:00
Brandon T. Kowalski 2216dd0197 feat: add API token authentication with pairing code flow
Add support for RomM client API tokens as an alternative to
username/password authentication. Includes QR-less pairing code
exchange, token validation, and a settings option to switch
existing credential-based connections to token auth.

Refactors the HTTP client to use a generic auth header instead
of hardcoded basic auth, supporting both Bearer tokens and
Basic auth transparently via Host.AuthHeader().
2026-03-14 23:15:36 -04:00
Brandon T. Kowalski ac311b9dc9 fix: change how BIOS availability is determined using new bios count in platforms api response 2026-03-14 20:21:25 -04:00
Brandon T. Kowalski 86d120b538 More greptile issue fixing... 2026-03-05 22:09:31 -05:00
Brandon T. Kowalski 9eb5186c0a Greptile fixes <3 2026-03-04 22:11:10 -05:00
Brandon T. Kowalski 8ffd2dd1b2 Fix code smells 2026-03-04 21:54:09 -05:00
Brandon T. Kowalski a8d856d0f3 Initial work on user configured save slot 2026-03-04 21:30:44 -05:00
Brandon T. Kowalski f2d03573f1 Remove limit from sync history query
Load all sync history records instead of capping at 50.
Performance tested with 2000+ records without issue.
2026-02-22 12:54:32 -05:00
Brandon T. Kowalski ee2113faab Add save sync data layer and API changes
- cache/save_sync.go: sync history recording, querying, GetSyncedRomIDs
- cache/games.go: add GetRomByFSLookup for resolving ROMs by fs_slug
- internal/config.go: add SlotPreferences, GetSlotPreference,
  SetSlotPreference, GetDirectoryMapping
- romm/saves.go: switch device tracking endpoints from query to body
  params, add SaveDeviceBody type
2026-02-22 12:16:11 -05:00
Brandon T. Kowalski ea1d114db5 Update dependencies and add save_sync_history schema
Bump gabagool to v2.9.5 (table sections), sqlite to v1.46.1.
Add save_sync_history table in schema v10 with indexes on
rom_id and device_id.
2026-02-22 12:16:00 -05:00
Brandon T. Kowalski 07ff034b73 Nuke all existing save functionality. I don't want to retrofit this 2026-02-14 21:35:00 -05:00
Brandon T. Kowalski e793e48630 Purge deleted items from local cache with help of new identifier endpoints #83 2026-02-12 17:21:22 -05:00
Brandon T. Kowalski 0f4a555f1b Add platform filtering to unified collection view and pre-filter filters (meta) when in collections to remove non-applicable ones #127 2026-02-11 23:47:33 -05:00
Brandon T. Kowalski ac38e4dded Add filtering to games list screen that dynamically updates to filters #127 2026-02-11 23:12:40 -05:00
Brandon T. Kowalski 4e67c90951 Discovered a bug with enabling collections and the option not appearing immediately on the main menu. Related to #121 but still not sure if this solves the original issue. 2026-02-10 21:08:03 -05:00
pawndev 0a5ea2a360 feat(artwork): Choice for artwork kind
Let the user choose the artwork kind. Only support screenscrapper metadata source.
The last thing to do, is to invalidate artwork cache. Either when the config change, or on the preload cache action
2026-02-07 23:45:42 +01:00
Brandon T. Kowalski 97c8c32cfc Over-engineered it per usual 2026-01-24 01:59:52 -05:00
Brandon T. Kowalski 0ef516db91 More tweaking for the initial cache, attempting to improve performance 2026-01-24 01:30:31 -05:00
Brandon T. Kowalski 508bce7bf1 Better sql error comparison 2026-01-21 00:12:11 -05:00
Brandon T. Kowalski 85e2f92164 Cleanup unused code after refactor 2026-01-21 00:10:11 -05:00
Brandon T. Kowalski c4f0380582 Make caching more robust when options are changed. Refreshing collections now based on which types are shown. Initial cache building is smarter and background caching can have new jobs added mid sync or can be flat out canceled if a rebuild is requested. 2026-01-18 23:13:22 -05:00
Brandon T. Kowalski d960210e47 Use updated_after query param when fetching normal and smart collections. 2026-01-18 17:06:27 -05:00
Brandon T. Kowalski 06c11cecf5 Update docs to include info about local cache syncing and replace refresh cache with rebuild cache 2026-01-17 14:53:51 -05:00
Brandon T. Kowalski 970b472a1a Background cache sync for #81 2026-01-17 00:49:56 -05:00
Brandon T. Kowalski 2dee138f0b fix: add reverse mapping for local platforms to RomM slugs along with brute force matching to potentially fix #51 2026-01-14 23:29:19 -05:00
Brandon T. Kowalski 09b0111b44 Consolidated and added more detailed logging for everything attempted in a save sync 2026-01-12 22:08:45 -05:00
Brandon T. Kowalski c0bdaa23f2 Add fuzzy matching confirmation feature as third option after exact match and hash match 2026-01-11 18:41:38 -05:00
Brandon T. Kowalski b92b7da519 Start of orphan matching work 2026-01-11 01:30:18 -05:00
Brandon T. Kowalski 21e52edd00 Start of work for #57 2026-01-10 01:52:03 -05:00
Brandon T. Kowalski 80747e603d Tidy constants package and build out development docs 2026-01-08 19:59:38 -05:00
Brandon T. Kowalski 7856a7e20c Clean up missed unused functions and update deps 2026-01-06 19:04:50 -05:00
Brandon T. Kowalski fb4a027e66 Caching work and fixing save sync 2026-01-06 18:53:43 -05:00
Brandon T. Kowalski f522980f55 Rework caching to be more efficient and be backed by SQLite. 2026-01-06 02:12:12 -05:00
Brandon T. Kowalski a4cdf2485d Clean up extra logger statements 2026-01-04 16:17:42 -05:00
Brandon T. Kowalski 4ca19c38c9 More reorg and fixing the multiple platform versions mapping 2026-01-04 15:19:28 -05:00
Brandon T. Kowalski 56982c45ea More breaking up of the massive utils package. Almost organized! 2026-01-04 11:51:47 -05:00
Brandon T. Kowalski fc23056f09 Mid-mass refactor to get everything into a respectable package structure 2026-01-04 01:47:01 -05:00