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:
parent
4b99162bce
commit
b18da4e495
2
setup.py
2
setup.py
@ -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',
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user