fix: short-version order

This commit is contained in:
relikd
2024-03-04 22:31:03 +01:00
parent 421aceae96
commit e1d74f49fb
3 changed files with 6439 additions and 6440 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -266,12 +266,11 @@ class CacheDB:
bundleId = plist.get('CFBundleIdentifier') bundleId = plist.get('CFBundleIdentifier')
title = plist.get('CFBundleDisplayName') or plist.get('CFBundleName') title = plist.get('CFBundleDisplayName') or plist.get('CFBundleName')
version = str(plist.get('CFBundleVersion', ''))
v_short = str(plist.get('CFBundleShortVersionString', '')) v_short = str(plist.get('CFBundleShortVersionString', ''))
if not version: v_long = str(plist.get('CFBundleVersion', ''))
version = v_short version = v_short or v_long
if version != v_short and v_short: if version != v_long and v_long:
version = f'{version} ({v_short})' version += f' ({v_long})'
minOS = [int(x) for x in plist.get('MinimumOSVersion', '0').split('.')] minOS = [int(x) for x in plist.get('MinimumOSVersion', '0').split('.')]
minOS += [0, 0, 0] # ensures at least 3 components are given minOS += [0, 0, 0] # ensures at least 3 components are given
platforms = sum(1 << int(x) for x in plist.get('UIDeviceFamily', [])) platforms = sum(1 << int(x) for x in plist.get('UIDeviceFamily', []))