1
0
Fork 0
mirror of synced 2024-05-25 15:00:07 +12:00
Commit graph

1138 commits

Author SHA1 Message Date
loathingKernel 50a37be433 DownloadsTab: Remove dead code 2022-08-17 23:46:10 +03:00
loathingKernel c40fef0595 Lgndr: Transfer what DownloadThread does to install_game_real (not used yet)
DownloadThread: Refactor names to match Lgndr
2022-08-12 13:17:53 +03:00
loathingKernel dffd768934 Re-add dlc arguments 2022-08-08 21:32:31 +03:00
loathingKernel 5e022e6d28 Lgndr: Rename a few fields to reflect legendary's names 2022-08-08 21:06:58 +03:00
loathingKernel e97e9fe841 Downloads: Add skip_dlcs and with_dlcs arguments. 2022-08-08 17:26:38 +03:00
loathingKernel 3ee789a695 Update DownloadThread 2022-08-03 02:33:50 +03:00
loathingKernel 38dfdc8bc2 Lgndr: Remove LegendaryCLISingleton
Since `LegendaryCLI` isn't stateful, we can instantiate
it when needed
2022-08-02 10:42:38 +03:00
loathingKernel 5ac71e99f0 DownloadThread: Use clean_post_install instead of local copy
InstallDialog: Handly empty `config_tags`
Lgndr: Cleanup
2022-08-02 10:42:38 +03:00
loathingKernel e5c7b029ff GameInfo: Offer to also update the game after a verification if there is one 2022-08-02 10:42:38 +03:00
loathingKernel 785aaf648e GameInfo: Detect repair_and_update requirement
If a game was partially installed and it was imported
through the import functionality, if `repair_and_update`
is specified it will report `0` download size if there
is no real update to be done. Fix it by detecting the
need for an update explicitly.

This will also force games that have failed verification
to also update while repairing them, fixing the
long-standing issue of repairing an older version of a
game and then doing the update in a separate step.
2022-08-02 10:42:38 +03:00
loathingKernel c388f99c46 Lgndr: Move generic function implementations to api_monkeys 2022-08-02 10:42:38 +03:00
loathingKernel 3501741c03 DownloadsTab: invalidate and recreate update widgets on import
Previously on game import, multiple update widgets for the same game
were created in the downloads tab. Instead of checking if a widget
already exists, invalidate the delete the existing and add a new one
with the current information about the installed game.
2022-08-02 10:42:38 +03:00
loathingKernel f375357a2c Utils: fix unresolved references 2022-08-02 10:42:38 +03:00
loathingKernel 7408116deb Lgndr: Don' use lambda with default argument 2022-08-02 10:42:38 +03:00
loathingKernel 3ecbae0564 Utils: Rename utils.py to misc.py to not confuse PyCharm checker 2022-08-02 10:42:38 +03:00
loathingKernel f51563ea93 Models: Move installation related models into their own file 2022-08-02 10:42:38 +03:00
loathingKernel 7fba2259ed LoginDialog: Fix crash due to messagebox parent 2022-08-02 10:42:38 +03:00
loathingKernel ee5adce18b Implement LgndrIndirectLogger to return the last logged message from LegendaryAPI
The indirect return is stored in a `LgndrIndirectStatus` object that provides checking and unpacking features

Lgndr: `LgndrInstallGameArgs.install_tag` default to None
Lgndr: add default `move` method.
Lgndr: monkeypatch `dlm.status_queue` after preparing a download to reduce `InstallQueueItemModel`
InstallOptionsModel: implement `as_install_kwargs` to pass only relevant arguments to `LgndrInstallGameArgs` in InstallDialog
InstallOptionsModel: rename `sdl_list` to `install_tag` as they were the same thing
LegendaryUtils: Update to use `LgndrIndirectStatus`
UninstallDialog: Add option to keep configuration decoupled from keeping game data
GameUtils: Add messagebox to show error messages from legendary after uninstalling a game
InstallDialog: Update to use `LgndrIndirectStatus`
InstallDialog: Update selectable download handling to match legendary's
DownloadThread: Remove multiple instance variables, instead reference them directly from `InstallQueueItemModel` instance
ImportGroup: Replace `info_label` with an `ElideLabel` for displaying long messages
ImportGroup: Don't translate message strings in the `ImportWorker`
GameInfo: Call `repair()` if needed after verification instead of handling it locally
GamesTab: Fix string matching for capitalized strings and scroll to top on when searching
2022-08-02 10:42:38 +03:00
loathingKernel 28531eec38 Lgndr: Add logger monkey class
The class acts as an intermediate between the logger and the function call
It keeps the last message that was sent to the logger. The instance of the
class can be returned as a return value from the LegendaryCLI methods to
provide return status and the message related to it.

The level at which it considers the logged message as an error is configurable.
By default it considers logging.ERROR and above as faulty return values
2022-08-02 10:42:38 +03:00
loathingKernel bbaff5f42c Lgndr: Add re-implemented uinstall_game
Lgndr: Change the exception level to CRITICAL for core
LegendaryUtils: Use uninstall_game from our Lgndr
UninstallDialog: Update to return a tuple of values
App: Keep files if the install directory was lost
App: Run legendary's exit procedures on exit
2022-08-02 10:42:38 +03:00
loathingKernel 8bbb42a045 Lgndr: cleanup 2022-08-02 10:42:38 +03:00
loathingKernel 654f734975 Lgndr: Update test get_boolean_choice to the arguments of its counterpart 2022-08-02 10:42:38 +03:00
loathingKernel 5c1ff81370 LegendarySettings: clean_manifests expects more values 2022-08-02 10:42:38 +03:00
loathingKernel 2bf41f20d1 Lgndr: Match the arguments of legendary's get_boolean_choice 2022-08-02 10:42:38 +03:00
loathingKernel 99cb7f46fd ImportGroup: Set the wordwrap option for the information label 2022-08-02 10:42:38 +03:00
loathingKernel d05f74b286 ImportGroup: Add option to import DLCs 2022-08-02 10:42:38 +03:00
loathingKernel 14087a3c6c Lgndr: Add default implementation for get_boolean_choice that returns False 2022-08-02 10:42:38 +03:00
loathingKernel 9df3355200 LegendaryUtils: Remove dead re-implemented functions 2022-08-02 10:42:38 +03:00
loathingKernel b4a1efa357 Lgndr: Add 'repair_and_update' argument in InstallOptionsModel 2022-08-02 10:42:38 +03:00
loathingKernel aeb149a3e9 Lgndr: Use custom wrapped decorator to wrap LegendaryCLI functions
Lgndr: Add `get_boolean_choice` to relevant args dataclasses
Lgndr: Move mock functions to `api_monkeys`

InstallDialog: Add status queue to prepare_overlay_install arguments, fixes missing download stats
2022-08-02 10:42:38 +03:00
loathingKernel 7aded95a1f Lgndr: Monkeypatch modified DLManager into LegendaryCore at module import 2022-08-02 10:42:38 +03:00
loathingKernel a208c9b1d4 Revert "Requirements: Add parse"
This reverts commit e100d90708a98e29d23826f56e61561db96b60be.
2022-08-02 10:42:38 +03:00
loathingKernel caffd9c51d Lgndr: Return result from resolve_aliases (woops) 2022-08-02 10:42:38 +03:00
loathingKernel 9acfd7a67f Lgndr: Follow comment pattern 2022-08-02 10:42:38 +03:00
loathingKernel 53fba8c705 Lgndr: Set 'estimate' to 0 before it can be calculated 2022-08-02 10:42:38 +03:00
loathingKernel 10b845c0aa Lgndr: Save the manifest if it was downloaded while verifying 2022-08-02 10:42:38 +03:00
loathingKernel 545d77ef07 Lgndr: Expose 'resolve_aliases' for outside usage 2022-08-02 10:42:38 +03:00
loathingKernel 3aae3887f6 Lgndr: Create argument models for consistent function arguments and cleaner implementation.
Lgndr: Prefix files that aren't part of legendary with 'api_'
Lgndr: Return statistics from 'verify_game' instead of parsing the exception
VerifyWorker: Add 'error' signal for exceptions.
2022-08-02 10:42:38 +03:00
loathingKernel d7aba41aa4 Requirements: Add parse 2022-08-02 10:42:38 +03:00
loathingKernel 197f915fb3 InstallOptionsModel: Rename fields to use the same names as Legendary's arguments 2022-08-02 10:42:38 +03:00
loathingKernel 883bd268ff Mirror Legendary classes structure in the shim.
Lgndr: Move code segments copied from `prepare_download` back to their original location in `install_game`
Lgndr: Add the LgndrLogHandler at initialization instead of every function.
Lgndr: Move `verify_game` to its original place in `LegendaryCLI`
Lgndr: Change the way DLManager is patched into LegendaryCore proper
Shared: Add singleton for LegendaryCLI, LegendaryCoreSignleton returns core from LegendaryCLI
VerifyWorker: Update to use `verify_game` from `LegendaryCLI` directly
PreLaunchThread: Initialize LegendaryCLI to get LegendaryCore from it
InstallDialog: Update `prepare_install` argument names
2022-08-02 10:42:38 +03:00
loathingKernel 3892f4a594 ImportGroup: Update the shim stuff for the import worker 2022-08-02 10:42:38 +03:00
loathingKernel 51c45015a4 InstallDialog: Remove unused arguments 2022-08-02 10:42:38 +03:00
loathingKernel d4bf783018 Update core to the submodule rebase 2022-08-02 10:42:38 +03:00
loathingKernel fd2c094dc2 Add override for prepare_overlay_install() 2022-08-02 10:42:38 +03:00
loathingKernel 9af4e7ead8 Specify correct return type for prepare_download() and disable formatting for copied code segments 2022-08-02 10:42:38 +03:00
loathingKernel 2c2f44c97c Use a loggin handler in stead of monkeypatching for raising LgndrException 2022-08-02 10:42:38 +03:00
loathingKernel 78fb13830e Set logging level instead of disabling it in DLManager 2022-08-02 10:42:38 +03:00
loathingKernel 99ab488820 Pass the correct status queue and monkeypatch run_real in prepare_download 2022-08-02 10:42:38 +03:00
loathingKernel 9698bf445b Re-enable logging in DLManager correctly 2022-08-02 10:42:38 +03:00