Skip to content

Inner Workings

stoj edited this page Jun 1, 2021 · 15 revisions

Scanning

Phase 1: Loading

  1. Parse the PinballX/Y DB to extract all the tables (aka games)

Phase 2: Checking

  1. For each configured "content type" (e.g. table audio, wheel images, etc)..
    1. For each configured "file extension"..
      1. Enumerate all files within the matching configured "content folder"
      2. For each file file against a table based on the configured "check criteria"..
        1. Associate file against a table (aka 'hit')..
          • Exact: DB Description == file name (minus file extension). 'Description' only used for content files; png, mp3, etc.
          • Duplicate extension: more than 1 exact match (i.e. different file extensions)
          • Wrong case: DB description == file name igoring case
          • Table: DB TableFile == file name (minus file extension). 'TableFile' only be used for Vpin files; vpx, b2s, and pov.
          • Fuzzy: table file or description partially matches file name. To be extended in future release.
        2. Mark file as 'unknown' if none of the above criteia match.

Phase 3: Fixing

  1. For each table (from the DB)..
    1. For each configured content type..
      1. For each 'hit' (matching file)..
        1. Rename file: the closest configured match based on priority order..
          • Wrong case
          • Table name
          • Fuzzy
        2. Delete files: anyting that wasn't a exact match (or renamed file).
      2. Delete unknown files: anything that wasn't designatd as a table 'hit'
  2. All renamed and deleted folders are first copied to the backup folder and indexed against the current date/time.

Rebuilding

Phase 1: Loading

  1. TBD

Phase 2: Checking

  1. TBD

Phase 3: Merging

  1. TBD