mirror of
https://github.com/derrod/legendary.git
synced 2025-01-02 12:35:27 +00:00
[cli] Fix info not displaying install information
DLC would overwrite the app name and break the check for the installed game.
This commit is contained in:
parent
362287543b
commit
a70ac2d1f9
|
@ -1650,18 +1650,18 @@ class LegendaryCLI:
|
||||||
if dlc['entitlementName'] in owned_entitlements:
|
if dlc['entitlementName'] in owned_entitlements:
|
||||||
owned_dlc.append((installable, None, dlc['title'], dlc['id']))
|
owned_dlc.append((installable, None, dlc['title'], dlc['id']))
|
||||||
elif installable:
|
elif installable:
|
||||||
app_name = dlc['releaseInfo'][0]['appId']
|
dlc_app_name = dlc['releaseInfo'][0]['appId']
|
||||||
if app_name in owned_app_names:
|
if dlc_app_name in owned_app_names:
|
||||||
owned_dlc.append((installable, app_name, dlc['title'], dlc['id']))
|
owned_dlc.append((installable, dlc_app_name, dlc['title'], dlc['id']))
|
||||||
|
|
||||||
if owned_dlc:
|
if owned_dlc:
|
||||||
human_list = []
|
human_list = []
|
||||||
json_list = []
|
json_list = []
|
||||||
for installable, app_name, title, dlc_id in owned_dlc:
|
for installable, dlc_app_name, title, dlc_id in owned_dlc:
|
||||||
json_list.append(dict(app_name=app_name, title=title,
|
json_list.append(dict(app_name=dlc_app_name, title=title,
|
||||||
installable=installable, id=dlc_id))
|
installable=installable, id=dlc_id))
|
||||||
if installable:
|
if installable:
|
||||||
human_list.append(f'App name: {app_name}, Title: "{title}"')
|
human_list.append(f'App name: {dlc_app_name}, Title: "{title}"')
|
||||||
else:
|
else:
|
||||||
human_list.append(f'Title: "{title}" (no installation required)')
|
human_list.append(f'Title: "{title}" (no installation required)')
|
||||||
game_infos.append(InfoItem('Owned DLC', 'owned_dlc', human_list, json_list))
|
game_infos.append(InfoItem('Owned DLC', 'owned_dlc', human_list, json_list))
|
||||||
|
|
Loading…
Reference in a new issue