fix: Check for existing versions for latest version

This commit is contained in:
Sayantan Santra 2023-08-29 01:15:34 -05:00
parent ed8e7859e2
commit c6ea4f8f00
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F

View file

@ -50,6 +50,13 @@ def apkpure_dl(apk, appname, version, hard_version, session, present_vers, flag)
if version not in [apkpure_version, '0']: if version not in [apkpure_version, '0']:
print(f"Required version {version} not found in APKPure, choosing version {apkpure_version} instead.") print(f"Required version {version} not found in APKPure, choosing version {apkpure_version} instead.")
version=apkpure_version version=apkpure_version
try:
if present_vers[apk] == version and flag != 'force' and os.path.isfile(apk+'.apk'):
print(
f"Recommended version {version} of {apk} is already present.")
return
except KeyError:
pass
if flag == 'checkonly' and present_vers[apk] != version: if flag == 'checkonly' and present_vers[apk] != version:
print(f"{apk} has an update ({present_vers[apk]} -> {version})") print(f"{apk} has an update ({present_vers[apk]} -> {version})")