AB1908 / GOG-Galaxy-Export-Script

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

Script does not support running on linux because platform detection doesn't even consider it #65

Open k0zyrev opened 1 year ago

k0zyrev commented 1 year ago
line 578, in <module>
    'default': defaultDBlocation,
NameError: name 'defaultDBlocation' is not defined

Even though I ran the script explicitly defining path to the database, I got the error because it didn't recognize the platform and couldn't set the default location. So I just hacked it by hardcoding the default location of the database, but I guess it would be nice if the script recognized the correct platform and react accordingly or, at least, don't even set the defaultDBlocation if the script is being run with -i parameter.

command I ran python galaxy_library_export.py -i /home/user/Desktop/storage/galaxy-2.0.db -o /home/user/Desktop/gog.csv

dirty hack, line 555:

    if platform == "darwin":
        defaultDBlocation = "/Users/Shared/GOG.com/Galaxy/Storage/galaxy-2.0.db"
    # Windows
    elif platform == "win32":
        defaultDBlocation = "C:\\ProgramData\\GOG.com\\Galaxy\\storage\\galaxy-2.0.db"
    #added hack
    defaultDBlocation = "/home/user/Desktop/storage/galaxy-2.0.db
AB1908 commented 1 year ago

Could you push a PR doing a similar platform check before setting the db location? I don't actively maintain this anymore (have switched to Playnite).

k0zyrev commented 1 year ago

I actually don't really know python at all and not sure how to properly handle all this, sorry. Funny enough, I needed this script in order to figure out how to import my game tags/categories into playnite. Not sure how to do it yet, playnite doesn't seem to have any way of importing categories from csv (or like at all).