Add version to game_id.json

This commit is contained in:
kramo
2023-05-11 13:08:25 +02:00
committed by GeoffreyCoulaud
parent d347c30dff
commit e93c93e802
2 changed files with 122 additions and 0 deletions

View File

@@ -74,6 +74,9 @@ class CartridgesWindow(Adw.ApplicationWindow):
details_view_game_cover = None
sort_state = "a-z"
# The version of the game_id.json spec
spec_version = 2.0
def __init__(self, **kwargs):
super().__init__(**kwargs)
@@ -111,6 +114,9 @@ class CartridgesWindow(Adw.ApplicationWindow):
):
path.unlink(missing_ok=True)
elif game.get("version") > self.spec_version:
continue
else:
Game(game).update()