16BitWonder/NX-Update-Checker

Cartridge Version Database

16BitWonder opened this issue · 2 comments

Currently if a user has an entry from a cartridge with an update, the version number will match the update while inserted and be 0 while not inserted.

This can be bothersome for users that use many cartridges that have the most recent update and don't want to be told they are missing it, and that would prefer to not add these titles to the ignore list in the event updates eventually come out.

A solution is to build a local database of cartridge update information from the user's library.
The file should be something like cart_versions.txt in the nro directory.

Flow of it should be as follows:

  • Application startup
  • Before parsing local titles, first check if a cartridge is inserted.
  • If a cartridge is inserted, retrieve its title ID and version number (Needs to be version specifically from cartridge, not a digital update that may be installed internally)
  • Store/Update this title ID and version number in cart_versions.txt (Only if it's actually new, do not write to the file if nothing has changed)
  • While building the local list these cart versions should be read and used instead if they are greater than the local version (ie cart version is 65536 and local is 0)

Doing this should alleviate the problem of users being told they are missing an update that is already contained in a cartridge they have that is not inserted.