Lgndr: Match the arguments of legendary's get_boolean_choice
This commit is contained in:
parent
99cb7f46fd
commit
2bf41f20d1
|
@ -103,7 +103,7 @@ class ImportWorker(QRunnable):
|
||||||
args = LgndrImportGameArgs(
|
args = LgndrImportGameArgs(
|
||||||
app_path=str(path),
|
app_path=str(path),
|
||||||
app_name=app_name,
|
app_name=app_name,
|
||||||
get_boolean_choice=lambda a0: self.import_dlcs
|
get_boolean_choice=lambda prompt, default=True: self.import_dlcs
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
cli.import_game(args)
|
cli.import_game(args)
|
||||||
|
|
|
@ -25,7 +25,16 @@ class LgndrImportGameArgs:
|
||||||
with_dlcs: bool = False
|
with_dlcs: bool = False
|
||||||
yes: bool = False
|
yes: bool = False
|
||||||
# Rare: Extra arguments
|
# 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
|
@dataclass
|
||||||
|
@ -70,8 +79,8 @@ class LgndrInstallGameArgs:
|
||||||
disable_https: bool = False
|
disable_https: bool = False
|
||||||
yes: bool = True
|
yes: bool = True
|
||||||
# Rare: Extra arguments
|
# Rare: Extra arguments
|
||||||
get_boolean_choice: Callable[[str], bool] = lambda a0: False
|
get_boolean_choice: Callable[[str, bool], bool] = lambda prompt, default=True: default
|
||||||
sdl_prompt: Callable[[str, str], List[str]] = lambda a0, a1: []
|
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(
|
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"
|
f"Verification progress: {a0}/{a1} ({a2:.01f}%) [{a3:.1f} MiB/s]\t\r"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue