about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-07-03 20:49:20 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-07-03 20:49:20 +0300
commit887b26f923f01d46ee30d0f0397c5d2da907e03f (patch)
tree7fc6a6872a3aacbbebb603f26633d5e4c059507b
parent8e6b522d09ad85663e319e88cedbe896e328e49a (diff)
downloadfungus-launcher-887b26f923f01d46ee30d0f0397c5d2da907e03f.tar.gz
fungus-launcher-887b26f923f01d46ee30d0f0397c5d2da907e03f.tar.xz
remove UI backup_games
-rw-r--r--fungus/__init__.py8
-rw-r--r--fungus/game_model.py4
-rw-r--r--fungus/main_window.py6
3 files changed, 5 insertions, 13 deletions
diff --git a/fungus/__init__.py b/fungus/__init__.py
index e64600d..fb28812 100644
--- a/fungus/__init__.py
+++ b/fungus/__init__.py
@@ -5,6 +5,7 @@ __all__ = [
     "ConfigManager",
     "FungusApp",
     "Game",
+    "GameLibrary",
     "Main",
     "PathManager",
     "SandboxWarningDialog",
@@ -20,9 +21,6 @@ __all__ = [
     "fungus_run",
     "fungus_version",
     "icons_dir",
-    "load_games_json",
-    "save_games_json",
-    "update_game_field"
 ]
 
 __version__ = "0.1.0"
@@ -36,14 +34,12 @@ def __getattr__(name):
         "FungusApp": "fungus.app",
         "ConfigManager": "fungus.config_manager",
         "Game": "fungus.game_model",
+        "GameLibrary": "fungus.game_model",
         "Main": "fungus.main_window",
         "PathManager": "fungus.path_manager",
         "SandboxWarningDialog": "fungus.dialogs",
         "SettingsDialog": "fungus.settings_dialog",
         "format_title": "fungus.utils_pure",
-        "load_games_json": "fungus.game_model",
-        "save_games_json": "fungus.game_model",
-        "update_game_field": "fungus.game_model",
     }
     if name in _modules:
         import importlib
diff --git a/fungus/game_model.py b/fungus/game_model.py
index a21ad99..396df0f 100644
--- a/fungus/game_model.py
+++ b/fungus/game_model.py
@@ -60,7 +60,9 @@ class Game:
         )
 
 
-# ── JSON I/O helpers (pure functions, no UI coupling) ───────────────────
+# ── JSON I/O helpers (deprecated — kept for migration fallback) ─────────
+# These are no longer used by the new per-game storage but remain for
+# the one-shot migration from monolithic games.json.
 
 
 def load_games_json(path):
diff --git a/fungus/main_window.py b/fungus/main_window.py
index 989db27..1f90e08 100644
--- a/fungus/main_window.py
+++ b/fungus/main_window.py
@@ -16,7 +16,6 @@ from fungus.logger import get_logger
 from fungus.shortcuts import create_shortcut, remove_shortcut, set_image_shortcut_icon
 from fungus.constants import (
     app_dir,
-    backup_dir,
     desktop_dir,
     fungus_backup,
     fungus_launcher_dir,
@@ -36,7 +35,6 @@ from fungus.dialogs import (
 from fungus.game_model import (
     Game,
     GameLibrary,
-    backup_games_file,
 )
 from fungus.settings_dialog import SettingsDialog
 from fungus.utils import format_title, is_safe_prefix_path
@@ -1013,10 +1011,6 @@ class Main(Gtk.ApplicationWindow):
             if game.gameid in playtime_map:
                 game.playtime = playtime_map[game.gameid]
 
-    def backup_games(self):
-        """Create a timestamped backup of games.json."""
-        backup_games_file(games_json, backup_dir)
-
     def save_games(self):
         """Persist the current in-memory game list to per-game INI files."""
         games_to_save = self.games