mirror of
https://github.com/lutris/lutris
synced 2024-10-06 15:59:39 +00:00
Match installed games by configpath (Closes #1712)
This commit is contained in:
parent
e7471193c4
commit
6dae319d77
|
@ -294,12 +294,13 @@ def get_matching_game(params):
|
|||
if not slug:
|
||||
raise ValueError("Can't add or update without an identifier")
|
||||
for game in get_games_by_slug(slug):
|
||||
if game["installed"]:
|
||||
if game["configpath"] == params.get("configpath"):
|
||||
return game["id"]
|
||||
else:
|
||||
if (
|
||||
(
|
||||
game["runner"] == params.get("runner")
|
||||
or not all([params.get("runner"), game["runner"]])
|
||||
)
|
||||
and not game["installed"]
|
||||
):
|
||||
return game["id"]
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue