1
0
Fork 0
mirror of synced 2024-06-02 10:44:40 +12:00
This commit is contained in:
loathingKernel 2023-03-12 13:19:24 +02:00
parent f46dc2209d
commit 16400da020
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD
3 changed files with 6 additions and 3 deletions

View file

@ -34,6 +34,10 @@ logger = getLogger("RareCore")
class RareCore(QObject):
progress = pyqtSignal(int, str)
completed = pyqtSignal()
# lk: these are unused but remain if case they are become relevant
# completed_saves = pyqtSignal()
# completed_origin = pyqtSignal()
# completed_entitlements = pyqtSignal()
# lk: special case class attribute, this has to be here
__instance: Optional['RareCore'] = None
@ -181,6 +185,7 @@ class RareCore(QObject):
super(RareCore, self).deleteLater()
def __validate_installed(self):
# TODO: investigate if this could also go into async loading
filter_lambda = lambda rg: rg.is_installed and not (rg.is_dlc or rg.is_non_asset)
length = len(list(self.__filter_games(filter_lambda)))
for i, rgame in enumerate(self.__filter_games(filter_lambda)):

View file

@ -16,8 +16,6 @@ class FetchWorker(Worker):
class Result(IntEnum):
GAMES = 1
NON_ASSET = 2
SAVES = 5
ENTITLEMENTS = 6
class Signals(QObject):
result = pyqtSignal(object, int)

View file

@ -25,7 +25,7 @@ class Worker(QRunnable):
@property
def signals(self) -> QObject:
if self.__signals is None:
raise RuntimeError(f"Subclasses must implement '{type(self).__name__}.signals' QObject attribute")
raise RuntimeError(f"Subclasses must assign '{type(self).__name__}.signals' QObject attribute")
return self.__signals
@signals.setter