[models] Add "third_party_store" property to Game

This commit is contained in:
derrod 2021-10-16 19:42:47 +02:00
parent 7f53746ee6
commit 9462aa331f

View file

@ -52,6 +52,12 @@ class Game:
def is_dlc(self): def is_dlc(self):
return self.metadata and 'mainGameItem' in self.metadata return self.metadata and 'mainGameItem' in self.metadata
@property
def third_party_store(self):
if not self.metadata:
return None
return self.metadata.get('customAttributes', {}).get('ThirdPartyManagedApp', {}).get('value', None)
@property @property
def supports_cloud_saves(self): def supports_cloud_saves(self):
return self.metadata and (self.metadata.get('customAttributes', {}).get('CloudSaveFolder') is not None) return self.metadata and (self.metadata.get('customAttributes', {}).get('CloudSaveFolder') is not None)