vangogh icon indicating copy to clipboard operation
vangogh copied to clipboard

Refactor: Use PCGamingWiki raw data for all PCGW related properties

Open boggydigital opened this issue 1 year ago • 0 comments

Currently vangogh uses several sources for PCGamingWiki data:

  • PageId by GOG Id
  • PageId by Steam AppId
  • Engine cargo query
  • External links cargo query
  • Raw page

Ideally this is consolidated into 2 requests:

  • PageId by GOG Id OR Steam AppId
  • Raw page

The first change is straightforward to understand (I need to investigate if it's possible to query using OR condition...) and is likely not problematic. This data is only fetched when it's missing locally, so once for each product.

The second change is more interesting:

  • I've started collecting raw pages as a preparation for Cloud Saves implementation, currently it's not used for anything else
  • However it seems like it contains all the data extracted from Engine and External links cargo queries and much more
  • Based on response times it looks like getting the raw page is cheaper than running even simple cargo queries, so replacing the latter with the former seems like a good change to be a more polite user agent

Here are the properties extracted from those sources:

  • External links: https://github.com/arelate/southern_light/blob/c9318fff1ebb13e61b8bf255968cc0ec6e11e5f5/vangogh_integration/properties.go#L367
  • Engine: https://github.com/arelate/southern_light/blob/c9318fff1ebb13e61b8bf255968cc0ec6e11e5f5/vangogh_integration/properties.go#L380 (I'm not sure we need to preserve the separation, just the engine + the version would be fine with me)

Additional data that looks interesting to extract:

  • Certainly: Save game data location - already extracted, but needs to be improved
  • Certainly: Essential improvements
  • Maybe: Video? Input? Audio? API?

boggydigital avatar Apr 23 '25 03:04 boggydigital