1
0
Fork 0
mirror of synced 2024-07-02 21:20:54 +12:00

Fix some rebase errors

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
This commit is contained in:
lennard 2023-01-27 16:26:16 +02:00 committed by loathingKernel
parent 1938bd7084
commit eec3dfeb1e
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD
2 changed files with 6 additions and 10 deletions

View file

@ -42,7 +42,7 @@ class GameInfoTabs(SideTabWidget):
self.info_tab.update_game(rgame) self.info_tab.update_game(rgame)
self.settings_tab.load_settings(rgame) self.settings_tab.load_settings(rgame)
self.settings_tab.setEnabled(rgame.is_installed) self.settings_tab.setEnabled(rgame.is_installed or rgame.is_origin)
self.dlc_tab.update_dlcs(rgame) self.dlc_tab.update_dlcs(rgame)
self.dlc_tab.setEnabled(rgame.is_installed and bool(rgame.owned_dlcs)) self.dlc_tab.setEnabled(rgame.is_installed and bool(rgame.owned_dlcs))

View file

@ -396,8 +396,7 @@ class RareGame(RareGameSlim):
@return bool If the game should be considered installed @return bool If the game should be considered installed
""" """
return (self.igame is not None) \ return (self.igame is not None) \
or (self.is_origin and self.__get_origin_install_path() is not None) \ or (self.is_origin and self.__get_origin_install_path() is not None)
or (self.is_non_asset and platform.system() != "Windows") # TODO: Remove this line
def set_installed(self, installed: bool) -> None: def set_installed(self, installed: bool) -> None:
"""! """!
@ -536,8 +535,7 @@ class RareGame(RareGameSlim):
@return bool If the game is an Origin game @return bool If the game is an Origin game
""" """
return ( return (
self.game.metadata.get("customAttributes", {}).get("ThirdPartyManagedApp", {}).get("value") self.game.metadata.get("customAttributes", {}).get("ThirdPartyManagedApp", {}).get("value") == "Origin"
== "Origin"
) )
@property @property
@ -609,7 +607,7 @@ class RareGame(RareGameSlim):
) )
return True return True
__registry_cache: Optional[Dict] = None __registry_cache: Dict = {}
__origin_install_path = None __origin_install_path = None
def __get_origin_install_path(self) -> Optional[str]: def __get_origin_install_path(self) -> Optional[str]:
@ -633,10 +631,8 @@ class RareGame(RareGameSlim):
# TODO cache this line # TODO cache this line
t = time.time() t = time.time()
if self.__registry_cache is None: if wine_prefix in RareGame.__registry_cache.keys():
RareGame.__registry_cache = {} reg = RareGame.__registry_cache[wine_prefix]
if wine_prefix in self.__registry_cache.keys():
reg = self.__registry_cache[wine_prefix]
else: else:
reg = read_registry("system.reg", wine_prefix) reg = read_registry("system.reg", wine_prefix)
RareGame.__registry_cache[wine_prefix] = reg RareGame.__registry_cache[wine_prefix] = reg