RareCore: Detect if a game in saves is from another account.
And some cleanup
This commit is contained in:
parent
22b8992e55
commit
748ff6d9ed
3 changed files with 8 additions and 5 deletions
|
@ -53,7 +53,6 @@ class LaunchDialog(QDialog):
|
||||||
if self.args.offline:
|
if self.args.offline:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
QApplication.instance().processEvents()
|
|
||||||
# Force an update check and notice in case there are API changes
|
# Force an update check and notice in case there are API changes
|
||||||
self.core.check_for_updates(force=True)
|
self.core.check_for_updates(force=True)
|
||||||
self.core.force_show_update = True
|
self.core.force_show_update = True
|
||||||
|
|
|
@ -193,6 +193,7 @@ class RareGameSlim(RareGameBase):
|
||||||
|
|
||||||
def upload_saves(self, thread=True):
|
def upload_saves(self, thread=True):
|
||||||
status, (dt_local, dt_remote) = self.save_game_state
|
status, (dt_local, dt_remote) = self.save_game_state
|
||||||
|
|
||||||
def _upload():
|
def _upload():
|
||||||
logger.info(f"Uploading save for {self.title}")
|
logger.info(f"Uploading save for {self.title}")
|
||||||
self.state = RareGameSlim.State.SYNCING
|
self.state = RareGameSlim.State.SYNCING
|
||||||
|
@ -217,6 +218,7 @@ class RareGameSlim(RareGameBase):
|
||||||
|
|
||||||
def download_saves(self, thread=True):
|
def download_saves(self, thread=True):
|
||||||
status, (dt_local, dt_remote) = self.save_game_state
|
status, (dt_local, dt_remote) = self.save_game_state
|
||||||
|
|
||||||
def _download():
|
def _download():
|
||||||
logger.info(f"Downloading save for {self.title}")
|
logger.info(f"Downloading save for {self.title}")
|
||||||
self.state = RareGameSlim.State.SYNCING
|
self.state = RareGameSlim.State.SYNCING
|
||||||
|
|
|
@ -321,11 +321,13 @@ class RareCore(QObject):
|
||||||
try:
|
try:
|
||||||
saves_list = self.__core.get_save_games()
|
saves_list = self.__core.get_save_games()
|
||||||
for s in saves_list:
|
for s in saves_list:
|
||||||
if not s.app_name in saves_dict.keys():
|
if s.app_name not in saves_dict.keys():
|
||||||
saves_dict[s.app_name] = [s]
|
saves_dict[s.app_name] = [s]
|
||||||
else:
|
else:
|
||||||
saves_dict[s.app_name].append(s)
|
saves_dict[s.app_name].append(s)
|
||||||
for app_name, saves in saves_dict.items():
|
for app_name, saves in saves_dict.items():
|
||||||
|
if app_name not in self.__library.keys():
|
||||||
|
continue
|
||||||
self.__library[app_name].load_saves(saves)
|
self.__library[app_name].load_saves(saves)
|
||||||
except (HTTPError, ConnectionError) as e:
|
except (HTTPError, ConnectionError) as e:
|
||||||
logger.error(f"Exception while fetching saves from EGS: {e}")
|
logger.error(f"Exception while fetching saves from EGS: {e}")
|
||||||
|
|
Loading…
Reference in a new issue