Fix GOG path check
This commit is contained in:
@@ -116,7 +116,7 @@ def heroic_importer(win):
|
|||||||
if not win.schema.get_boolean("heroic-import-gog"):
|
if not win.schema.get_boolean("heroic-import-gog"):
|
||||||
pass
|
pass
|
||||||
elif (heroic_dir / "gog_store" / "installed.json").exists() and (
|
elif (heroic_dir / "gog_store" / "installed.json").exists() and (
|
||||||
heroic_dir / "gog_store" / "library.json"
|
heroic_dir / "store_cache" / "gog_library.json"
|
||||||
).exists():
|
).exists():
|
||||||
installed = json.load((heroic_dir / "gog_store" / "installed.json").open())
|
installed = json.load((heroic_dir / "gog_store" / "installed.json").open())
|
||||||
|
|
||||||
@@ -136,8 +136,10 @@ def heroic_importer(win):
|
|||||||
importer.save_game()
|
importer.save_game()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Get game title and developer from library.json as they are not present in installed.json
|
# Get game title and developer from gog_library.json as they are not present in installed.json
|
||||||
library = json.load((heroic_dir / "store_cache" / "gog_library.json").open())
|
library = json.load(
|
||||||
|
(heroic_dir / "store_cache" / "gog_library.json").open()
|
||||||
|
)
|
||||||
for game in library["games"]:
|
for game in library["games"]:
|
||||||
if game["app_name"] == app_name:
|
if game["app_name"] == app_name:
|
||||||
values["developer"] = game["developer"]
|
values["developer"] = game["developer"]
|
||||||
|
|||||||
Reference in New Issue
Block a user