Update Heroic GOG path
This commit is contained in:
@@ -116,7 +116,9 @@ def heroic_importer(win):
|
|||||||
# Import GOG games
|
# Import GOG games
|
||||||
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():
|
elif (heroic_dir / "gog_store" / "installed.json").exists() and (
|
||||||
|
heroic_dir / "store_cache" / "gog_library.json"
|
||||||
|
).exists():
|
||||||
data = (heroic_dir / "gog_store" / "installed.json").read_text("utf-8")
|
data = (heroic_dir / "gog_store" / "installed.json").read_text("utf-8")
|
||||||
installed = json.loads(data)
|
installed = json.loads(data)
|
||||||
|
|
||||||
@@ -136,8 +138,8 @@ 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
|
||||||
data = (heroic_dir / "gog_store" / "library.json").read_text("utf-8")
|
data = (heroic_dir / "store_cache" / "gog_library.json").read_text("utf-8")
|
||||||
library = json.loads(data)
|
library = json.loads(data)
|
||||||
for game in library["games"]:
|
for game in library["games"]:
|
||||||
if game["app_name"] == app_name:
|
if game["app_name"] == app_name:
|
||||||
|
|||||||
Reference in New Issue
Block a user