Bottles import

This commit is contained in:
kramo
2023-02-02 18:52:06 +01:00
parent 24dd082681
commit 8d1e98c277
5 changed files with 30 additions and 3 deletions

View File

@@ -69,6 +69,11 @@ def bottles_parser(parent_widget, action):
values = {}
values["game_id"] = "bottles_" + game["id"]
if values["game_id"] in parent_widget.games and "removed" not in parent_widget.games[
values["game_id"]].keys():
continue
values["name"] = game["name"]
values["executable"] = "xdg-open bottles:run/" + game["bottle"]["name"] + "/" + game["name"]
values["hidden"] = False
@@ -77,7 +82,7 @@ def bottles_parser(parent_widget, action):
values["last_played"] = 0
if game["thumbnail"]:
values["pixbuf_options"] = save_cover(values, parent_widget, os.path.join(bottles_dir, "bottles", game["bottle"]["path"], "grids", game["thumbnail"].replace("grid:", "")))
values["pixbuf_options"] = save_cover(values, parent_widget, os.path.join(bottles_dir, "bottles", game["bottle"]["path"], "grids", game["thumbnail"].split(":")[1]))
bottles_games[values["game_id"]] = values