From 208c6efd1e74b22b49bc6d1fcf47a4d73c46be32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=E1=BA=BF=20H=C6=B0ng?= Date: Mon, 21 Oct 2024 13:33:49 +0700 Subject: [PATCH] fix(hsr/repair): fix the decompressed url They changed it lol --- vollerei/hsr/launcher/game.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vollerei/hsr/launcher/game.py b/vollerei/hsr/launcher/game.py index 57be18f..1b2d1b7 100644 --- a/vollerei/hsr/launcher/game.py +++ b/vollerei/hsr/launcher/game.py @@ -349,11 +349,11 @@ class Game(GameABC): return patch return None - def _repair_file(self, file: PathLike, game: resource.Game) -> None: + def _repair_file(self, file: PathLike, game: resource.Main) -> None: # .replace("\\", "/") is needed because Windows uses backslashes :) relative_file = file.relative_to(self._path) url = ( - game.latest.decompressed_path + "/" + str(relative_file).replace("\\", "/") + game.major.res_list_url + "/" + str(relative_file).replace("\\", "/") ) # Backup the file if file.exists(): @@ -409,7 +409,7 @@ class Game(GameABC): game = self.get_remote_game(pre_download=pre_download) else: game = game_info - if game.latest.decompressed_path is None: + if isinstance(game.major, str | None) or game.major.res_list_url in [None, ""]: raise ScatteredFilesNotAvailableError("Scattered files are not available.") self._repair_file(file, game=game)