diff --git a/legendary/core.py b/legendary/core.py index 85b0108..1d525bc 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -1094,7 +1094,6 @@ class LegendaryCore: delta = max(0, analysis.install_size - current_size) min_disk_space = delta + analysis.biggest_file_size - # todo when resuming, only check remaining files _, _, free = shutil.disk_usage(os.path.split(install.install_path)[0]) if free < min_disk_space: free_mib = free / 1024 / 1024 diff --git a/legendary/lfs/lgndry.py b/legendary/lfs/lgndry.py index b307117..e20fc5b 100644 --- a/legendary/lfs/lgndry.py +++ b/legendary/lfs/lgndry.py @@ -103,7 +103,8 @@ class LGDLFS: try: self._installed = json.load(open(os.path.join(self.path, 'installed.json'))) - except Exception as e: # todo do not do this + except Exception as e: + self.log.debug(f'Loading installed games failed: {e!r}') self._installed = None # load existing app metadata diff --git a/legendary/models/chunk.py b/legendary/models/chunk.py index 510083d..c32a2b5 100644 --- a/legendary/models/chunk.py +++ b/legendary/models/chunk.py @@ -10,7 +10,6 @@ from uuid import uuid4 from legendary.utils.rolling_hash import get_hash -# ToDo do some reworking to make this more memory efficient class Chunk: header_magic = 0xB1FE3AA2 diff --git a/legendary/models/exceptions.py b/legendary/models/exceptions.py index 9f26931..7602b49 100644 --- a/legendary/models/exceptions.py +++ b/legendary/models/exceptions.py @@ -1,12 +1,4 @@ # coding: utf-8 -# ToDo more custom exceptions where it makes sense - - -class CaptchaError(Exception): - """Raised by core if direct login fails""" - pass - - class InvalidCredentialsError(Exception): pass diff --git a/legendary/models/manifest.py b/legendary/models/manifest.py index c66b9cb..ad3d54a 100644 --- a/legendary/models/manifest.py +++ b/legendary/models/manifest.py @@ -16,8 +16,8 @@ def read_fstring(bio): # if the length is negative the string is UTF-16 encoded, this was a pain to figure out. if length < 0: - # utf-16 chars are 2 bytes wide but the length is # of characters, not bytes - # todo actually make sure utf-16 characters can't be longer than 2 bytes + # utf-16 chars are (generally) 2 bytes wide, but the length is # of characters, not bytes. + # 4-byte wide chars exist, but best I can tell Epic's (de)serializer doesn't support those. length *= -2 s = bio.read(length - 2).decode('utf-16') bio.seek(2, 1) # utf-16 strings have two byte null terminators