1
0
Fork 0
mirror of synced 2024-06-17 10:04:43 +12:00

Lgndr: Match the arguments of legendary's get_boolean_choice

This commit is contained in:
loathingKernel 2022-07-15 21:00:52 +03:00
parent 99cb7f46fd
commit 2bf41f20d1
2 changed files with 13 additions and 4 deletions

View file

@ -103,7 +103,7 @@ class ImportWorker(QRunnable):
args = LgndrImportGameArgs(
app_path=str(path),
app_name=app_name,
get_boolean_choice=lambda a0: self.import_dlcs
get_boolean_choice=lambda prompt, default=True: self.import_dlcs
)
try:
cli.import_game(args)

View file

@ -25,7 +25,16 @@ class LgndrImportGameArgs:
with_dlcs: bool = False
yes: bool = False
# Rare: Extra arguments
get_boolean_choice: Callable[[str], bool] = lambda a0: False
get_boolean_choice: Callable[[str, bool], bool] = lambda prompt, default=True: default
@dataclass
class LgndrUninstallGameArgs:
app_name: str
keep_files: bool = False
yes: bool = False
# Rare: Extra arguments
get_boolean_choice: Callable[[str, bool], bool] = lambda prompt, default=True: default
@dataclass
@ -70,8 +79,8 @@ class LgndrInstallGameArgs:
disable_https: bool = False
yes: bool = True
# Rare: Extra arguments
get_boolean_choice: Callable[[str], bool] = lambda a0: False
sdl_prompt: Callable[[str, str], List[str]] = lambda a0, a1: []
get_boolean_choice: Callable[[str, bool], bool] = lambda prompt, default=True: default
sdl_prompt: Callable[[str, str], List[str]] = lambda sdl_data, title: [""]
verify_stdout: Callable[[int, int, float, float], None] = lambda a0, a1, a2, a3: print(
f"Verification progress: {a0}/{a1} ({a2:.01f}%) [{a3:.1f} MiB/s]\t\r"
)