[models] Add is_launchable_addon property to Game objects

pull/632/head
derrod 2023-12-14 14:54:25 +01:00
parent 837c166187
commit 691048d481
1 changed files with 6 additions and 0 deletions

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: