From a9a5a1d3c2f26e6d6387197ad3969b07af223acf Mon Sep 17 00:00:00 2001 From: kramo Date: Wed, 1 Feb 2023 16:34:26 +0100 Subject: [PATCH] Rename to Cartridges --- README.md | 10 +++++----- ...desktop.in => hu.kramo.Cartridges.desktop.in} | 6 +++--- ...chema.xml => hu.kramo.Cartridges.gschema.xml} | 4 ++-- ...ml.in => hu.kramo.Cartridges.metainfo.xml.in} | 8 ++++---- ...amo.GameShelf.svg => hu.kramo.Cartridges.svg} | 0 ...olic.svg => hu.kramo.Cartridges-symbolic.svg} | 0 data/icons/meson.build | 2 +- data/meson.build | 10 +++++----- ...mo.GameShelf.json => hu.kramo.Cartridges.json | 6 +++--- meson.build | 2 +- po/{gameshelf.pot => cartridges.pot} | 4 ++-- po/hu.po | 4 ++-- po/meson.build | 2 +- ...lf.gresource.xml => cartridges.gresource.xml} | 2 +- src/{gameshelf.in => cartridges.in} | 12 ++++++------ src/game.py | 2 +- src/main.py | 16 ++++++++-------- src/meson.build | 14 +++++++------- src/preferences.py | 2 +- src/utils/create_details_window.py | 1 - src/utils/get_cover.py | 2 +- src/utils/get_games.py | 2 +- src/utils/run_command.py | 2 +- src/utils/save_cover.py | 2 +- src/utils/save_games.py | 2 +- src/utils/toggle_hidden.py | 2 +- src/window.blp | 6 +++--- src/window.py | 16 ++++++++-------- 28 files changed, 70 insertions(+), 71 deletions(-) rename data/{hu.kramo.GameShelf.desktop.in => hu.kramo.Cartridges.desktop.in} (59%) rename data/{hu.kramo.GameShelf.gschema.xml => hu.kramo.Cartridges.gschema.xml} (89%) rename data/{hu.kramo.GameShelf.metainfo.xml.in => hu.kramo.Cartridges.metainfo.xml.in} (68%) rename data/icons/hicolor/scalable/apps/{hu.kramo.GameShelf.svg => hu.kramo.Cartridges.svg} (100%) rename data/icons/hicolor/symbolic/apps/{hu.kramo.GameShelf-symbolic.svg => hu.kramo.Cartridges-symbolic.svg} (100%) rename hu.kramo.GameShelf.json => hu.kramo.Cartridges.json (89%) rename po/{gameshelf.pot => cartridges.pot} (99%) rename src/{gameshelf.gresource.xml => cartridges.gresource.xml} (89%) rename src/{gameshelf.in => cartridges.in} (81%) diff --git a/README.md b/README.md index 97c3ee3..96d299b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@
- + - # Game Shelf + # Cartridges A GTK4 + Libadwaita game launcher @@ -10,7 +10,7 @@ ## The Project -Game Shelf is a simple game launcher written in Python using GTK4 + Libadwaita. +Cartridges is a simple game launcher written in Python using GTK4 + Libadwaita. ### Features - Manually adding and editing games - Importing games from Steam and Heroic @@ -31,7 +31,7 @@ Game Shelf is a simple game launcher written in Python using GTK4 + Libadwaita. ### From Releases 1. Install `org.gnome.Platform` from the [gnome-nightly repository](https://wiki.gnome.org/Apps/Nightly) if needed. 2. Download the latest release from Releases. -3. Install it via GNOME Software or `flatpak install hu.kramo.GameShelf.flatpak`. +3. Install it via GNOME Software or `flatpak install hu.kramo.Cartridges.flatpak`. ### From GNOME Builder Click the down arrow next to the hammer at the top of your GNOME Builder window, then click "Export". This will create a flatpak that then can be installed on your system. @@ -45,6 +45,6 @@ Fork the repository, make your changes, then create a pull request. Currently, translations can be added manually with the following steps: 1. Clone the repository. 2. If it isn't already there, add your language to `/po/LINGUAS`. -3. Create a new translation from the `/po/gameshelf.pot` file with a program such as [Poedit](https://poedit.net/). +3. Create a new translation from the `/po/cartridges.pot` file with a program such as [Poedit](https://poedit.net/). 4. Save the file as `[YOUR LANGUAGE CODE].po` to `/po/`. 5. Create a pull request with your translations. diff --git a/data/hu.kramo.GameShelf.desktop.in b/data/hu.kramo.Cartridges.desktop.in similarity index 59% rename from data/hu.kramo.GameShelf.desktop.in rename to data/hu.kramo.Cartridges.desktop.in index 8e4a51c..fc6b717 100644 --- a/data/hu.kramo.GameShelf.desktop.in +++ b/data/hu.kramo.Cartridges.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] -Name=Game Shelf -Exec=gameshelf -Icon=hu.kramo.GameShelf +Name=Cartridges +Exec=cartridges +Icon=hu.kramo.Cartridges Terminal=false Type=Application Categories=Game; diff --git a/data/hu.kramo.GameShelf.gschema.xml b/data/hu.kramo.Cartridges.gschema.xml similarity index 89% rename from data/hu.kramo.GameShelf.gschema.xml rename to data/hu.kramo.Cartridges.gschema.xml index 787701a..3d112f4 100644 --- a/data/hu.kramo.GameShelf.gschema.xml +++ b/data/hu.kramo.Cartridges.gschema.xml @@ -1,6 +1,6 @@ - - + + false diff --git a/data/hu.kramo.GameShelf.metainfo.xml.in b/data/hu.kramo.Cartridges.metainfo.xml.in similarity index 68% rename from data/hu.kramo.GameShelf.metainfo.xml.in rename to data/hu.kramo.Cartridges.metainfo.xml.in index 95e63d7..fee29a5 100644 --- a/data/hu.kramo.GameShelf.metainfo.xml.in +++ b/data/hu.kramo.Cartridges.metainfo.xml.in @@ -1,13 +1,13 @@ - hu.kramo.GameShelf.desktop + hu.kramo.Cartridges.desktop CC0-1.0 GPL-3.0-or-later - Game Shelf + Cartridges Launch all your games -

Game Shelf is a simple game launcher. It has support for importing your games from Steam and Heroic with organizational features such as hiding and sorting by date added or last played.

+

Cartridges is a simple game launcher. It has support for importing your games from Steam and Heroic with organizational features such as hiding and sorting by date added or last played.

- hu.kramo.GameShelf.desktop + hu.kramo.Cartridges.desktop kramo
diff --git a/data/icons/hicolor/scalable/apps/hu.kramo.GameShelf.svg b/data/icons/hicolor/scalable/apps/hu.kramo.Cartridges.svg similarity index 100% rename from data/icons/hicolor/scalable/apps/hu.kramo.GameShelf.svg rename to data/icons/hicolor/scalable/apps/hu.kramo.Cartridges.svg diff --git a/data/icons/hicolor/symbolic/apps/hu.kramo.GameShelf-symbolic.svg b/data/icons/hicolor/symbolic/apps/hu.kramo.Cartridges-symbolic.svg similarity index 100% rename from data/icons/hicolor/symbolic/apps/hu.kramo.GameShelf-symbolic.svg rename to data/icons/hicolor/symbolic/apps/hu.kramo.Cartridges-symbolic.svg diff --git a/data/icons/meson.build b/data/icons/meson.build index efece6a..25f8a5c 100644 --- a/data/icons/meson.build +++ b/data/icons/meson.build @@ -1,4 +1,4 @@ -application_id = 'hu.kramo.GameShelf' +application_id = 'hu.kramo.Cartridges' scalable_dir = join_paths('hicolor', 'scalable', 'apps') install_data( diff --git a/data/meson.build b/data/meson.build index ddf495a..67488af 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,6 +1,6 @@ desktop_file = i18n.merge_file( - input: 'hu.kramo.GameShelf.desktop.in', - output: 'hu.kramo.GameShelf.desktop', + input: 'hu.kramo.Cartridges.desktop.in', + output: 'hu.kramo.Cartridges.desktop', type: 'desktop', po_dir: '../po', install: true, @@ -13,8 +13,8 @@ if desktop_utils.found() endif appstream_file = i18n.merge_file( - input: 'hu.kramo.GameShelf.metainfo.xml.in', - output: 'hu.kramo.GameShelf.metainfo.xml', + input: 'hu.kramo.Cartridges.metainfo.xml.in', + output: 'hu.kramo.Cartridges.metainfo.xml', po_dir: '../po', install: true, install_dir: join_paths(get_option('datadir'), 'metainfo') @@ -25,7 +25,7 @@ if appstream_util.found() test('Validate appstream file', appstream_util, args: ['validate', appstream_file]) endif -install_data('hu.kramo.GameShelf.gschema.xml', +install_data('hu.kramo.Cartridges.gschema.xml', install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') ) diff --git a/hu.kramo.GameShelf.json b/hu.kramo.Cartridges.json similarity index 89% rename from hu.kramo.GameShelf.json rename to hu.kramo.Cartridges.json index 2eae3e9..df06295 100644 --- a/hu.kramo.GameShelf.json +++ b/hu.kramo.Cartridges.json @@ -1,9 +1,9 @@ { - "app-id" : "hu.kramo.GameShelf", + "app-id" : "hu.kramo.Cartridges", "runtime" : "org.gnome.Platform", "runtime-version" : "master", "sdk" : "org.gnome.Sdk", - "command" : "gameshelf", + "command" : "cartridges", "finish-args" : [ "--share=ipc", "--socket=fallback-x11", @@ -27,7 +27,7 @@ ], "modules" : [ { - "name" : "gameshelf", + "name" : "cartridges", "builddir" : true, "buildsystem" : "meson", "sources" : [ diff --git a/meson.build b/meson.build index 608ed9c..58607d0 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('gameshelf', +project('cartridges', version: '0.1.1', meson_version: '>= 0.59.0', default_options: [ 'warning_level=2', 'werror=false', ], diff --git a/po/gameshelf.pot b/po/cartridges.pot similarity index 99% rename from po/gameshelf.pot rename to po/cartridges.pot index 6b008d7..a66ddcb 100644 --- a/po/gameshelf.pot +++ b/po/cartridges.pot @@ -68,7 +68,7 @@ msgid "Games you hide will appear here." msgstr "" #: src/window.blp:29 -msgid "Game Shelf" +msgid "Cartridges" msgstr "" #: src/window.blp:52 @@ -124,7 +124,7 @@ msgid "Keyboard Shortcuts" msgstr "" #: src/window.blp:351 -msgid "About Game Shelf" +msgid "About Cartridges" msgstr "" #: src/window.blp:360 diff --git a/po/hu.po b/po/hu.po index 7671a56..f9b6dfd 100644 --- a/po/hu.po +++ b/po/hu.po @@ -69,7 +69,7 @@ msgid "Games you hide will appear here." msgstr "A rejtett játékaid itt lesznek megtalálhatók." #: src/window.blp:29 -msgid "Game Shelf" +msgid "Cartridges" msgstr "Játékpolc" #: src/window.blp:52 @@ -125,7 +125,7 @@ msgid "Keyboard Shortcuts" msgstr "Billentyűparancsok" #: src/window.blp:351 -msgid "About Game Shelf" +msgid "About Cartridges" msgstr "A Játékpolcról" #: src/window.blp:360 diff --git a/po/meson.build b/po/meson.build index 601332e..1fadd2e 100644 --- a/po/meson.build +++ b/po/meson.build @@ -1 +1 @@ -i18n.gettext('gameshelf', preset: 'glib') +i18n.gettext('cartridges', preset: 'glib') diff --git a/src/gameshelf.gresource.xml b/src/cartridges.gresource.xml similarity index 89% rename from src/gameshelf.gresource.xml rename to src/cartridges.gresource.xml index e3c73a7..26d71c0 100644 --- a/src/gameshelf.gresource.xml +++ b/src/cartridges.gresource.xml @@ -1,6 +1,6 @@ - + window.ui gtk/help-overlay.ui gtk/game.ui diff --git a/src/gameshelf.in b/src/cartridges.in similarity index 81% rename from src/gameshelf.in rename to src/cartridges.in index 004cea9..ad974da 100755 --- a/src/gameshelf.in +++ b/src/cartridges.in @@ -1,6 +1,6 @@ #!@PYTHON@ -# gameshelf.in +# cartridges.in # # Copyright 2022 kramo # @@ -31,16 +31,16 @@ localedir = '@localedir@' sys.path.insert(1, pkgdatadir) signal.signal(signal.SIGINT, signal.SIG_DFL) -locale.bindtextdomain('gameshelf', localedir) -locale.textdomain('gameshelf') -gettext.install('gameshelf', localedir) +locale.bindtextdomain('cartridges', localedir) +locale.textdomain('cartridges') +gettext.install('cartridges', localedir) if __name__ == '__main__': import gi from gi.repository import Gio - resource = Gio.Resource.load(os.path.join(pkgdatadir, 'gameshelf.gresource')) + resource = Gio.Resource.load(os.path.join(pkgdatadir, 'cartridges.gresource')) resource._register() - from gameshelf import main + from cartridges import main sys.exit(main.main(VERSION)) diff --git a/src/game.py b/src/game.py index 32fa582..839cac3 100644 --- a/src/game.py +++ b/src/game.py @@ -19,7 +19,7 @@ from gi.repository import Gtk -@Gtk.Template(resource_path='/hu/kramo/GameShelf/gtk/game.ui') +@Gtk.Template(resource_path='/hu/kramo/Cartridges/gtk/game.ui') class game(Gtk.Box): __gtype_name__ = 'game' diff --git a/src/main.py b/src/main.py index 2a001e6..c0186a9 100644 --- a/src/main.py +++ b/src/main.py @@ -24,7 +24,7 @@ gi.require_version("Adw", "1") from gi.repository import Gtk, Gio, GLib, Adw -from .window import GameShelfWindow +from .window import CartridgesWindow from .preferences import PreferencesWindow from .toggle_hidden import toggle_hidden from .save_games import save_games @@ -33,9 +33,9 @@ from .steam_parser import steam_parser from .heroic_parser import heroic_parser from .create_details_window import create_details_window -class GameShelfApplication(Adw.Application): +class CartridgesApplication(Adw.Application): def __init__(self): - super().__init__(application_id="hu.kramo.GameShelf", flags=Gio.ApplicationFlags.FLAGS_NONE) + super().__init__(application_id="hu.kramo.Cartridges", flags=Gio.ApplicationFlags.FLAGS_NONE) self.create_action("quit", self.on_quit_action, ["q"]) self.create_action("about", self.on_about_action) self.create_action("preferences", self.on_preferences_action) @@ -52,7 +52,7 @@ class GameShelfApplication(Adw.Application): # Create the main window win = self.props.active_window if not win: - win = GameShelfWindow(application=self) + win = CartridgesWindow(application=self) win.present() @@ -70,8 +70,8 @@ class GameShelfApplication(Adw.Application): def on_about_action(self, widget, callback=None): about = Adw.AboutWindow(transient_for=self.props.active_window, - application_name="Game Shelf", - application_icon="hu.kramo.GameShelf", + application_name="Cartridges", + application_icon="hu.kramo.Cartridges", developer_name="kramo", version="0.1.1", developers=["kramo"], @@ -119,7 +119,7 @@ class GameShelfApplication(Adw.Application): # Add "removed=True" to the game properties so it can be deleted on next init game_id = self.props.active_window.active_game_id - open_file = open(os.path.join(os.path.join(os.environ.get("XDG_DATA_HOME"), "games", game_id + ".json")), "r") + 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["removed"] = True @@ -153,6 +153,6 @@ class GameShelfApplication(Adw.Application): self.set_accels_for_action(f"win.{name}", shortcuts) def main(version): - app = GameShelfApplication() + app = CartridgesApplication() return app.run(sys.argv) diff --git a/src/meson.build b/src/meson.build index d1eabf7..c49ca9a 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,5 +1,5 @@ pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) -moduledir = join_paths(pkgdatadir, 'gameshelf') +moduledir = join_paths(pkgdatadir, 'cartridges') gnome = import('gnome') blueprints = custom_target('blueprints', @@ -13,8 +13,8 @@ blueprints = custom_target('blueprints', command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], ) -gnome.compile_resources('gameshelf', - 'gameshelf.gresource.xml', +gnome.compile_resources('cartridges', + 'cartridges.gresource.xml', gresource_bundle: true, install: true, install_dir: pkgdatadir, @@ -30,14 +30,14 @@ conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir'))) conf.set('pkgdatadir', pkgdatadir) configure_file( - input: 'gameshelf.in', - output: 'gameshelf', + input: 'cartridges.in', + output: 'cartridges', configuration: conf, install: true, install_dir: get_option('bindir') ) -gameshelf_sources = [ +cartridges_sources = [ '__init__.py', 'main.py', 'window.py', @@ -55,4 +55,4 @@ gameshelf_sources = [ 'utils/create_details_window.py' ] -install_data(gameshelf_sources, install_dir: moduledir) +install_data(cartridges_sources, install_dir: moduledir) diff --git a/src/preferences.py b/src/preferences.py index 801c611..e4073ed 100644 --- a/src/preferences.py +++ b/src/preferences.py @@ -19,7 +19,7 @@ from gi.repository import Adw, Gtk, Gio, GLib -@Gtk.Template(resource_path='/hu/kramo/GameShelf/gtk/preferences.ui') +@Gtk.Template(resource_path='/hu/kramo/Cartridges/gtk/preferences.ui') class PreferencesWindow(Adw.PreferencesWindow): __gtype_name__ = 'PreferencesWindow' diff --git a/src/utils/create_details_window.py b/src/utils/create_details_window.py index bd00ae4..6605c78 100644 --- a/src/utils/create_details_window.py +++ b/src/utils/create_details_window.py @@ -131,7 +131,6 @@ def create_details_window(parent_widget, game_id = None): values = {} - games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "games") final_name = name.get_buffer().get_text() final_executable = executable.get_buffer().get_text() diff --git a/src/utils/get_cover.py b/src/utils/get_cover.py index fdf0c40..65b8959 100644 --- a/src/utils/get_cover.py +++ b/src/utils/get_cover.py @@ -21,7 +21,7 @@ def get_cover(game, parent_widget): from gi.repository import GdkPixbuf import os - cover_path = os.path.join(os.environ.get("XDG_DATA_HOME"), "covers", game["game_id"] + ".dat") + cover_path = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "covers", game["game_id"] + ".dat") if os.path.isfile(cover_path) == False: return parent_widget.placeholder_pixbuf diff --git a/src/utils/get_games.py b/src/utils/get_games.py index 680cd6a..940b29d 100644 --- a/src/utils/get_games.py +++ b/src/utils/get_games.py @@ -20,7 +20,7 @@ def get_games(): import os, json - games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "games") + games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "games") games = {} if os.path.exists(games_dir) == False: diff --git a/src/utils/run_command.py b/src/utils/run_command.py index aa90863..0670514 100644 --- a/src/utils/run_command.py +++ b/src/utils/run_command.py @@ -24,5 +24,5 @@ def run_command(parent_widget, executable): subprocess.Popen(["flatpak-spawn --host " + executable], shell=True, start_new_session=True) - if Gio.Settings.new("hu.kramo.GameShelf").get_boolean("exit-after-launch") == True: + if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch") == True: sys.exit() diff --git a/src/utils/save_cover.py b/src/utils/save_cover.py index 707d89b..bf93fa8 100644 --- a/src/utils/save_cover.py +++ b/src/utils/save_cover.py @@ -21,7 +21,7 @@ def save_cover(game, parent_widget, file_path, pixbuf = None, game_id = None): from gi.repository import GdkPixbuf import os - covers_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "covers") + covers_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "covers") if os.path.exists(covers_dir) == False: os.makedirs(covers_dir) diff --git a/src/utils/save_games.py b/src/utils/save_games.py index 1f1485f..66c1e90 100644 --- a/src/utils/save_games.py +++ b/src/utils/save_games.py @@ -19,7 +19,7 @@ def save_games(games): import os, json - games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "games") + games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "games") existing = [] if os.path.exists(games_dir) == False: diff --git a/src/utils/toggle_hidden.py b/src/utils/toggle_hidden.py index fc46014..4094da0 100644 --- a/src/utils/toggle_hidden.py +++ b/src/utils/toggle_hidden.py @@ -19,7 +19,7 @@ def toggle_hidden(game): import os, json - games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "games") + games_dir = os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "games") if os.path.exists(games_dir) == False: return diff --git a/src/window.blp b/src/window.blp index bfbd00b..47240c1 100644 --- a/src/window.blp +++ b/src/window.blp @@ -25,8 +25,8 @@ Adw.StatusPage hidden_notice_empty { valign: center; } -template GameShelfWindow : Adw.ApplicationWindow { - title: _("Game Shelf"); +template CartridgesWindow : Adw.ApplicationWindow { + title: _("Cartridges"); default-width: 1110; default-height: 820; @@ -348,7 +348,7 @@ menu primary_menu { } item { - label: _("About Game Shelf"); + label: _("About Cartridges"); action: "app.about"; } } diff --git a/src/window.py b/src/window.py index 0fa1a5c..15fc8d7 100644 --- a/src/window.py +++ b/src/window.py @@ -26,9 +26,9 @@ from .get_cover import get_cover from .get_games import get_games from .save_games import save_games -@Gtk.Template(resource_path="/hu/kramo/GameShelf/window.ui") -class GameShelfWindow(Adw.ApplicationWindow): - __gtype_name__ = "GameShelfWindow" +@Gtk.Template(resource_path="/hu/kramo/Cartridges/window.ui") +class CartridgesWindow(Adw.ApplicationWindow): + __gtype_name__ = "CartridgesWindow" toast_overlay = Gtk.Template.Child() stack = Gtk.Template.Child() @@ -77,14 +77,14 @@ class GameShelfWindow(Adw.ApplicationWindow): self.overview.set_measure_overlay(self.overview_box, True) self.overview.set_clip_overlay(self.overview_box, False) - self.schema = Gio.Settings.new("hu.kramo.GameShelf") - self.placeholder_pixbuf = GdkPixbuf.Pixbuf.new_from_resource_at_scale("/hu/kramo/GameShelf/assets/library_placeholder.svg", 200, 300, False) + self.schema = Gio.Settings.new("hu.kramo.Cartridges") + self.placeholder_pixbuf = GdkPixbuf.Pixbuf.new_from_resource_at_scale("/hu/kramo/Cartridges/assets/library_placeholder.svg", 200, 300, False) games = get_games() for game in games: if "removed" in games[game].keys(): - os.remove(os.path.join(os.environ.get("XDG_DATA_HOME"), "games", game + ".json")) + os.remove(os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "games", game + ".json")) try: - os.remove(os.path.join(os.environ.get("XDG_DATA_HOME"), "covers", game + ".dat")) + os.remove(os.path.join(os.environ.get("XDG_DATA_HOME"), "cartridges", "covers", game + ".dat")) except FileNotFoundError: pass @@ -374,7 +374,7 @@ class GameShelfWindow(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"), "games", game_id + ".json")), "r") + 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.pop("removed")