mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[models] Add is_launchable_addon property to Game objects
This commit is contained in:
parent
837c166187
commit
691048d481
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue