Skip missing hidden key

This commit is contained in:
kramo
2023-07-20 19:52:59 +02:00
parent bb4870e99d
commit 82dddd1c5c

View File

@@ -20,19 +20,19 @@
import json import json
import logging import logging
from abc import abstractmethod
from hashlib import sha256 from hashlib import sha256
from json import JSONDecodeError from json import JSONDecodeError
from pathlib import Path from pathlib import Path
from time import time from time import time
from typing import Optional, TypedDict, Iterable from typing import Iterable, Optional, TypedDict
from abc import abstractmethod
from src import shared from src import shared
from src.game import Game from src.game import Game
from src.importer.sources.location import Location from src.importer.sources.location import Location
from src.importer.sources.source import ( from src.importer.sources.source import (
SourceIterationResult,
SourceIterable, SourceIterable,
SourceIterationResult,
URLExecutableSource, URLExecutableSource,
) )
@@ -311,6 +311,7 @@ class HeroicSourceIterable(SourceIterable):
# Get the hidden app names # Get the hidden app names
try: try:
store = path_json_load(self.source.config_location["store_config.json"]) store = path_json_load(self.source.config_location["store_config.json"])
if "hidden" in store["games"].keys():
self.hidden_app_names = { self.hidden_app_names = {
game["appName"] for game in store["games"]["hidden"] game["appName"] for game in store["games"]["hidden"]
} }