2021-03-09 05:20:28 +13:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
2021-05-23 07:56:13 +12:00
|
|
|
class InstallOptionsModel:
|
2021-03-09 05:20:28 +13:00
|
|
|
def __init__(self, app_name: str, path: str = os.path.expanduser("~/legendary"),
|
2021-05-23 07:56:13 +12:00
|
|
|
max_workers: int = os.cpu_count() * 2, repair: bool = False, dl_only: bool = False,
|
|
|
|
ignore_free_space: bool = False, force: bool = False, sdl_list: list = ['']
|
2021-05-21 09:00:38 +12:00
|
|
|
):
|
2021-03-09 05:20:28 +13:00
|
|
|
self.app_name = app_name
|
|
|
|
self.path = path
|
|
|
|
self.max_workers = max_workers
|
|
|
|
self.repair = repair
|
2021-05-23 07:56:13 +12:00
|
|
|
self.dl_only = dl_only
|
2021-03-25 23:49:05 +13:00
|
|
|
self.ignore_free_space = ignore_free_space
|
2021-04-05 21:53:33 +12:00
|
|
|
self.force = force
|
2021-05-22 02:48:15 +12:00
|
|
|
self.sdl_list = sdl_list
|
2021-05-23 07:56:13 +12:00
|
|
|
|
|
|
|
|
|
|
|
class InstallDownloadModel:
|
|
|
|
def __init__(self, dlmanager, analysis, game, igame, repair: bool = False, repair_file: str = None):
|
|
|
|
self.dlmanager = dlmanager
|
|
|
|
self.analysis = analysis
|
|
|
|
self.game = game
|
|
|
|
self.igame = igame
|
|
|
|
self.repair = repair
|
|
|
|
self.repair_file = repair_file
|
|
|
|
|
|
|
|
|
|
|
|
class InstallQueueItemModel:
|
|
|
|
def __init__(self, queue, download: InstallDownloadModel, options: InstallOptionsModel):
|
|
|
|
self.queue = queue
|
|
|
|
self.download = download
|
|
|
|
self.options = options
|