This commit is contained in:
kramo
2023-03-14 17:21:16 +01:00
parent a4b1b8efd9
commit 094bfad10d
4 changed files with 16 additions and 11 deletions

View File

@@ -385,9 +385,7 @@ class CartridgesWindow(Adw.ApplicationWindow):
game_id = list(self.toasts)[-1]
except IndexError:
return
open_file = open(os.path.join(os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "games", game_id + ".json")), "r")
data = json.loads(open_file.read())
open_file.close()
data = get_games([game_id])[game_id]
data.pop("removed")
save_games({game_id : data})
self.update_games([game_id])