1
0
Fork 0
mirror of synced 2024-06-16 17:44:44 +12:00

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:
Stelios Tsampas 2023-05-04 17:45:51 +03:00
parent 3258c252ba
commit 23c2f6dc0a

View file

@ -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]: