[models] Add is_launchable_addon property to Game objects

This commit is contained in:
derrod 2023-12-14 14:54:25 +01:00
parent 837c166187
commit 691048d481

View file

@ -97,6 +97,12 @@ class Game:
return None
return self.metadata.get('customAttributes', {}).get('AdditionalCommandLine', {}).get('value', None)
@property
def is_launchable_addon(self):
if not self.metadata:
return False
return any(m['path'] == 'addons/launchable' for m in self.metadata.get('categories', []))
@property
def catalog_item_id(self):
if not self.metadata: