Use utf-8 everywhere

This commit is contained in:
kramo
2023-04-02 07:28:04 +02:00
parent b511ce22b7
commit 960eaa1949
7 changed files with 10 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ def heroic_parser(parent_widget):
if not schema.get_boolean("heroic-import-epic"):
pass
elif (heroic_dir / "lib-cache" / "library.json").exists():
data = (heroic_dir / "lib-cache" / "library.json").read_text()
data = (heroic_dir / "lib-cache" / "library.json").read_text("utf-8")
library = json.loads(data)
try:
@@ -111,7 +111,7 @@ def heroic_parser(parent_widget):
if not schema.get_boolean("heroic-import-gog"):
pass
elif (heroic_dir / "gog_store" / "installed.json").exists():
data = (heroic_dir / "gog_store" / "installed.json").read_text()
data = (heroic_dir / "gog_store" / "installed.json").read_text("utf-8")
installed = json.loads(data)
importer.total_queue += len(installed["installed"])
@@ -131,7 +131,7 @@ def heroic_parser(parent_widget):
continue
# Get game title and developer from library.json as they are not present in installed.json
data = (heroic_dir / "gog_store" / "library.json").read_text()
data = (heroic_dir / "gog_store" / "library.json").read_text("utf-8")
library = json.loads(data)
for game in library["games"]:
if game["app_name"] == app_name:
@@ -162,7 +162,7 @@ def heroic_parser(parent_widget):
if not schema.get_boolean("heroic-import-sideload"):
pass
elif (heroic_dir / "sideload_apps" / "library.json").exists():
data = (heroic_dir / "sideload_apps" / "library.json").read_text()
data = (heroic_dir / "sideload_apps" / "library.json").read_text("utf-8")
library = json.loads(data)
importer.total_queue += len(library["games"])