Removed allow_side_effects
This commit is contained in:
@@ -169,8 +169,7 @@ class DetailsWindow(Adw.Window):
|
||||
"hidden": False,
|
||||
"source": "imported",
|
||||
"added": int(time()),
|
||||
},
|
||||
allow_side_effects=False,
|
||||
}
|
||||
)
|
||||
|
||||
else:
|
||||
|
||||
@@ -61,7 +61,7 @@ class Game(Gtk.Box):
|
||||
game_cover = None
|
||||
version = 0
|
||||
|
||||
def __init__(self, data, allow_side_effects=True, **kwargs):
|
||||
def __init__(self, data, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
self.win = shared.win
|
||||
|
||||
@@ -54,7 +54,7 @@ class BottlesSourceIterator(SourceIterator):
|
||||
bottle_name=entry["bottle"]["name"], game_name=entry["name"]
|
||||
),
|
||||
}
|
||||
game = Game(values, allow_side_effects=False)
|
||||
game = Game(values)
|
||||
|
||||
# Get official cover path
|
||||
try:
|
||||
|
||||
@@ -100,7 +100,7 @@ class FlatpakSourceIterator(SourceIterator):
|
||||
flatpak_id=flatpak_id
|
||||
),
|
||||
}
|
||||
game = Game(values, allow_side_effects=False)
|
||||
game = Game(values)
|
||||
|
||||
additional_data = {}
|
||||
if icon_name := desktop_values["Icon"]:
|
||||
|
||||
@@ -90,7 +90,7 @@ class HeroicSourceIterator(SourceIterator):
|
||||
),
|
||||
"executable": self.source.executable_format.format(app_name=app_name),
|
||||
}
|
||||
game = Game(values, allow_side_effects=False)
|
||||
game = Game(values)
|
||||
|
||||
# Get the image path from the heroic cache
|
||||
# Filenames are derived from the URL that heroic used to get the file
|
||||
|
||||
@@ -71,7 +71,7 @@ class ItchSourceIterator(SourceIterator):
|
||||
"executable": self.source.executable_format.format(cave_id=row[4]),
|
||||
}
|
||||
additional_data = {"online_cover_url": row[3] or row[2]}
|
||||
game = Game(values, allow_side_effects=False)
|
||||
game = Game(values)
|
||||
yield (game, additional_data)
|
||||
|
||||
# Cleanup
|
||||
|
||||
@@ -62,7 +62,7 @@ class LegendarySourceIterator(SourceIterator):
|
||||
except (JSONDecodeError, OSError, KeyError):
|
||||
pass
|
||||
|
||||
game = Game(values, allow_side_effects=False)
|
||||
game = Game(values)
|
||||
return (game, data)
|
||||
|
||||
def generator_builder(self) -> Generator[SourceIterationResult, None, None]:
|
||||
|
||||
@@ -74,7 +74,7 @@ class LutrisSourceIterator(SourceIterator):
|
||||
),
|
||||
"executable": self.source.executable_format.format(game_id=row[2]),
|
||||
}
|
||||
game = Game(values, allow_side_effects=False)
|
||||
game = Game(values)
|
||||
|
||||
# Get official image path
|
||||
image_path = self.source.cache_location["coverart"] / f"{row[2]}.jpg"
|
||||
|
||||
@@ -96,7 +96,7 @@ class SteamSourceIterator(SourceIterator):
|
||||
"game_id": self.source.game_id_format.format(game_id=appid),
|
||||
"executable": self.source.executable_format.format(game_id=appid),
|
||||
}
|
||||
game = Game(values, allow_side_effects=False)
|
||||
game = Game(values)
|
||||
|
||||
# Add official cover image
|
||||
image_path = (
|
||||
|
||||
@@ -138,7 +138,7 @@ class CartridgesApplication(Adw.Application):
|
||||
if shared.games_dir.is_dir():
|
||||
for game_file in shared.games_dir.iterdir():
|
||||
data = json.load(game_file.open())
|
||||
game = Game(data, allow_side_effects=False)
|
||||
game = Game(data)
|
||||
shared.store.add_game(game, {"skip_save": True})
|
||||
|
||||
def on_about_action(self, *_args):
|
||||
|
||||
Reference in New Issue
Block a user