Remove game version check in download_full_game()

Fix remote archive name detection (because archive.game.latest.name doesn't contain it anymore)

Signed-off-by: tretrauit <tretrauit@gmail.com>
This commit is contained in:
tretrauit 2022-04-01 09:27:03 +07:00
parent 4b99162bce
commit b18da4e495
Signed by: tretrauit
GPG Key ID: 862760FF1903319E
2 changed files with 4 additions and 7 deletions

View File

@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text()
setup(
name='worthless',
version='1.3.1',
version='1.3.1-1',
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
url='https://git.froggi.es/tretrauit/worthless-launcher',
license='MIT License',

View File

@ -362,15 +362,12 @@ class Installer:
self._config.set_game_version(version)
self._config.save()
async def download_full_game(self, overwrite: bool = False):
if self._version and not overwrite:
raise ValueError("Game already exists")
async def download_full_game(self):
archive = await self._launcher.get_resource_info()
if archive is None:
raise RuntimeError("Failed to fetch game resource info.")
if self._version == archive.game.latest.version:
raise ValueError("Game is already up to date.")
await self._download_file(archive.game.latest.path, archive.game.latest.name, archive.game.latest.size)
archive_name = archive.game.latest.path.split("/")[-1]
await self._download_file(archive.game.latest.path, archive_name, archive.game.latest.size)
async def download_full_voiceover(self, language: str):
archive = await self._launcher.get_resource_info()