Skip to content

Commit

Permalink
fix: correct Title ID and version identification for DLC
Browse files Browse the repository at this point in the history
Fix found by @PortableProgrammer in #97
  • Loading branch information
a1ex4 committed Aug 13, 2024
1 parent 7472750 commit c6556b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def generate_library():
else:
app_id_version_from_versions_txt = get_app_id_version_from_versions_txt(title['app_id'])
if app_id_version_from_versions_txt is not None:
if title['version'] == int(app_id_version_from_versions_txt):
if int(title['version']) == int(app_id_version_from_versions_txt):
dlc_has_latest_version = True
else:
dlc_has_latest_version = False
Expand Down
5 changes: 3 additions & 2 deletions app/titles.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def identify_appId(app_id):
title_id = app_id[:-3] + '000'
else:
app_type = APP_TYPE_DLC
title_id = app_id[:-3] + '000'
base_hex = app_id[:-3]
title_id = hex(int(base_hex, base=16) - 1)[2:].rjust(len(base_hex), '0') + '000'

return title_id.upper(), app_type

Expand Down Expand Up @@ -243,7 +244,7 @@ def get_all_dlc_existing_versions(app_id):
print(f'No keys in cnmts.json for DLC app ID: {app_id.upper()}')
return None
else:
print(f'DLC app ID not in cnmts.json: {app_id.upper()}')
# print(f'DLC app ID not in cnmts.json: {app_id.upper()}')
return None

def get_app_id_version_from_versions_txt(app_id):
Expand Down

0 comments on commit c6556b8

Please sign in to comment.