AB1908 / GOG-Galaxy-Export-Script

Export your list of games from GOG Galaxy
MIT License
150 stars 27 forks source link

Not clear which field is exported: title or originalTitle / meta or originalMeta #40

Closed TheMelmacian closed 3 years ago

TheMelmacian commented 3 years ago

Currently it is not clear which title is exported. It can be either "title" or "originalTitle". Which ever comes first in the sorted list will be exported. Example:

I think same can happen with the meta data. It is already possible to change the release date of a game in the galaxy client. And for genres, developers and publisher there is a tooltip: "coming soon".

@AB1908 @Varstahl I wanted to discuss the possible solutions before I implement a fix.

Title: A simple solution would be to separate title and originalTitle. Use title as standard and originalTitle can be added if the user needs it in the export. Or if you prefer the other way around: originalTitle as standard and the (custom)title as optional export. It's also possible to always export both.

Meta data:

  1. Only export one value
  2. Always export both values. For example releaseDate and originalReleaseDate if --release-date is selected.
  3. User can choose which he wants to export
AB1908 commented 3 years ago

From what I recall, there were some differences between the do which guided my choice in using one over the other. I'll look into the differences and list them if possible. I would personally prefer OriginalTitle as the standard and the custom title as an optional export.

Varstahl commented 3 years ago

iirc we export title, and not originalTitle, provided that title exists. They should be two separate entities, and title might or might not be the same of originalTitle. Exporting the original title makes no sense in most cases: if you set up a custom title for a game, chances are the game title is somewhat inadequate.

If you want to export both and keep them 100% separate, then originalTitle must be the default, obviously, since there might not be custom titles after all.

As for the tags, I would think appending a -original to the meta export command should be enough, --release-date-original in the example you provided.

TheMelmacian commented 3 years ago

I agree. If a user changes somthing on the title (or tags) he probably has a good reason. At the moment title has always a value. If it is not customized it is the same as originalTitle. So choosing titleas the default should be OK if the current database structure stays the same.

The current script selects both titles. Which one is exported depends on the sort order:

og_conditions = [""" WHERE ((MasterList.gamePieceTypeId={}) OR (MasterList.gamePieceTypeId={})) AND ((PLATFORMS.releaseKey=MasterList.releaseKey) AND (PLATFORMS.gamePieceTypeId={}))""".format(
            id('originalTitle'),
            id('title'),
            id('allGameReleases')
        )]

same for the meta data

dbCondition='(METADATA.releaseKey=MasterList.releaseKey) AND ((METADATA.gamePieceTypeId={}) OR (METADATA.gamePieceTypeId={}))'.format(id('originalMeta'), id('meta')),