RareGame: Return app_title
as folder name if FolderName
is not in customAttributes
Fortnite specifically doesn't provide `FolderName` in `customAttributes`, meaning we can't create the shortcut. If the attribute is not provided, assume that it is safe to use the application title. Fixes: #283
This commit is contained in:
parent
3258c252ba
commit
23c2f6dc0a
|
@ -438,7 +438,11 @@ class RareGame(RareGameSlim):
|
|||
|
||||
@property
|
||||
def folder_name(self) -> str:
|
||||
return self.game.metadata.get("customAttributes", {}).get("FolderName", {}).get("value")
|
||||
return (
|
||||
folder_name
|
||||
if (folder_name := self.game.metadata.get("customAttributes", {}).get("FolderName", {}).get("value"))
|
||||
else self.app_title
|
||||
)
|
||||
|
||||
@property
|
||||
def save_path(self) -> Optional[str]:
|
||||
|
|
Loading…
Reference in a new issue