Skip to content
xantari edited this page Apr 18, 2021 · 16 revisions

Introduction

The database browser allows to quickly find content across any website, FTP, and any other Uri compatible reference.

The database browser supports local and github repositories.

Github repositories are recommended as it will allow you to crowd source the entries, allow users to enter an issues report (such as a broken link), and provides built in change tracking.

Databases are in a simple .json format that has all the attributes you would expect to document a pinball related file. The database is documented here: VirtualPinball.Database.Models

The browser helps you fill in entries by ensuring the following:

  • The URL you enter is globally unique (no duplicate entries)
  • Related Entries are pre-filtered based off of the title to allow adding related entries easier
  • When an entry is removed it will clean up all related entry pointers
  • Ensures the URL/Title are filled in
  • Allows for auto population of certain fields from the IPDB database
  • All times are in UTC so that it is not dependent on a users time zone. This may be tricky to get used to at first, but it also displays your local time zone. This will ensure that when you see table update notifications you won't miss anything due to time zone offset discrepancies.
  • IPDB # validation / URL string data validation

During the initial load it may take awhile to load the database(s) as it will try to parse the databases and create a unified database with forward and backwards links amongst related media. It also does tag parsing and some other cleanup activities.

Database Browser

Getting Started - Github Database

The first thing you want to do for github databases is to create your repository on github. There are lots of tutorials online for that.

Once you have done that, add a single file to your repository. The file should have a .json extension.

In the file place the following content. This is the starter content from VirtualPinball.Database.Models

{
  "LastUpdateDateUtc": "2021-03-27T19:47:38.1024977Z",
  "DatabaseFormatVersion": 1,
  "Entries": [
  ]
}

There is a shortcut to do this all on github's website after you create your repo, you just click here to add your initial file:

Repo Quick Setup

Adding a Database

Once you have your github repo setup you can add a database by going to Utilities >> Add Database.

For github based databases you will want to link to the CDN Raw data endpoint. Example: https://raw.githubusercontent.com/xantari/DBRepoTest/main/DBTest.json

If your having trouble getting that link, just click the "Raw" button when viewing your initial .json file you created in the repo setup instructions above and you will see it in your browsers URL bar.

Add Database

Editing Database High level information

You can add contact information and a description to your database by going to the Utilities >> Database Info menu item.

Edit Database Info

Adding an Entry

Once your database has been added. You can add an entry.

Right click the main content grid and click "Add New".

Edit 1 Edit 2

Saving the Database

The database is saved to a temporary location and is not automatically synced to your official github repository in real time. Instead you must click the Save Databases button. The same applies to local file system based databases as well. You always edit in a temporary location, and are required to sync your changes.

For github based databases you are required to enter a commit message.

Save Database

Auto Save Preferences and Filter Criteria

The filters, window positions, grid column widths, window sizes are automatically saved upon close of the window. The settings file is maintained to store user preferences on this window in your installation folder called "pincabsettings.json".

Begin and End Date Filters

These filters are remembered when you close the form. This makes it super easy to figure out what was new since you last turned on your machine. Say you left for two weeks. The end date will likely be two weeks ago. Just change your begin and end dates and you'll see all new content across all databases in a single view. Makes keeping your cabinet updated a simple process versus visiting dozens of pages spread across multiple websites, paging through results, cross referencing to your table list.

What took hours can now take minutes.

Context Menu

Context Menu

You can right click rows or cells and a context menu will appear to bring you to the IPDB or file URL.

You can also double click a row and that will also launch the URL in your preferred web browser so you can grab the file and install it on your machine.

Be sure to like/comment the download on the site before downloading. The program will remind you of this one time per database browsing session.