This commit is contained in:
kramo
2023-03-15 02:22:11 +01:00
parent bd0cf7402a
commit 8a2ff2561b
4 changed files with 25 additions and 31 deletions

View File

@@ -24,9 +24,8 @@ from gi.repository import Gio
def run_command(executable):
subprocess.Popen(
with subprocess.Popen(
["flatpak-spawn --host " + executable], shell=True, start_new_session=True
)
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
sys.exit()
):
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
sys.exit()

View File

@@ -30,7 +30,9 @@ def toggle_hidden(game):
with open(os.path.join(games_dir, game + ".json"), "r") as open_file:
data = json.loads(open_file.read())
open_file.close()
data["hidden"] = not data["hidden"]
with open(os.path.join(games_dir, game + ".json"), "w") as open_file:
data["hidden"] = not data["hidden"]
open_file.write(json.dumps(data, indent=4))
open_file.close()