mirror of
https://github.com/c9moser/sgbackup.git
synced 2026-01-19 11:30:13 +00:00
bugfixes
This commit is contained in:
parent
289d18e1b6
commit
f62f0810f2
@ -1711,9 +1711,10 @@ class GameManager(GObject):
|
||||
|
||||
def add_game(self,game:Game):
|
||||
self.__games[game.key] = game
|
||||
if game.steam:
|
||||
if game.steam and game.steam.appid >= 0:
|
||||
self.__steam_games[game.steam.appid] = game
|
||||
if game.epic:
|
||||
|
||||
if game.epic and game.epic.catalog_item_id:
|
||||
self.__epic_games[game.epic.catalog_item_id] = game
|
||||
|
||||
def remove_game(self,game:Game|str):
|
||||
@ -1728,13 +1729,12 @@ class GameManager(GObject):
|
||||
key = game.key
|
||||
|
||||
|
||||
for appid,steam_game in list(self.__steam_games.items()):
|
||||
if steam_game.key == game.key:
|
||||
del self.__steam_games[appid]
|
||||
if game.steam and game.steam.appid >= 0 and game.steam.appid in self.__steam_games:
|
||||
del self.__steam_games[game.steam.appid]
|
||||
|
||||
for appname,epic_game in list(self.__epic_games.items()):
|
||||
if epic_game.key == game.key:
|
||||
del self.__epic_games[appname]
|
||||
if game.epic and game.epic and game.epic.catalog_item_id and game.epic.catalog_item_id in self.__epic_games:
|
||||
del self.__epic_games[game.epic.catalog_item_id]
|
||||
|
||||
|
||||
del self.__games[key]
|
||||
|
||||
|
||||
@ -680,6 +680,8 @@ class GameDialog(Gtk.Dialog):
|
||||
label = Gtk.Label.new("App ID:")
|
||||
page.appid_entry = Gtk.Entry()
|
||||
page.appid_entry.set_hexpand(True)
|
||||
page.appid_entry.set_input_hints(Gtk.InputHints.NO_EMOJI | Gtk.InputHints.NO_SPELLCHECK)
|
||||
page.appid_entry.set_input_purpose(Gtk.InputPurpose.NUMBER)
|
||||
grid.attach(label,0,0,1,1)
|
||||
grid.attach(page.appid_entry,1,0,1,1)
|
||||
page.append(grid)
|
||||
@ -1185,10 +1187,11 @@ class GameDialog(Gtk.Dialog):
|
||||
or self.get_is_valid_savegame_type(SavegameType.STEAM_LINUX)
|
||||
or self.get_is_valid_savegame_type(SavegameType.STEAM_MACOS)):
|
||||
|
||||
appid_text = self.__steam.appid_entry.get_text()
|
||||
if self.__game.steam:
|
||||
self.__game.steam.appid = int(self.__steam.appid_entry.get_text())
|
||||
self.__game.steam.appid = int(appid_text) if appid_text else -1
|
||||
else:
|
||||
self.__game.steam = SteamGameData(int(self.__steam.appid_entry.get_text()))
|
||||
self.__game.steam = SteamGameData(int(appid_text) if appid_text else -1)
|
||||
|
||||
|
||||
if self.get_is_valid_savegame_type(SavegameType.STEAM_WINDOWS):
|
||||
@ -1259,7 +1262,7 @@ class GameDialog(Gtk.Dialog):
|
||||
if self.__game.epic:
|
||||
self.__game.epic.catalog_item_id = self.__epic.catalogitemid_entry.get_text()
|
||||
else:
|
||||
self.__game.epic = EpicGameData(appname=self.__epic.catalogitemid_entry.get_text())
|
||||
self.__game.epic = EpicGameData(catalog_item_id=self.__epic.catalogitemid_entry.get_text())
|
||||
|
||||
if self.__game.epic.windows:
|
||||
self.__game.epic.windows.savegame_root = data['sgroot']
|
||||
|
||||
Loading…
Reference in New Issue
Block a user