mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-25 20:28:37 -06:00
fix: Check required version
This commit is contained in:
parent
0a701f4588
commit
8e126d4d45
1 changed files with 25 additions and 25 deletions
|
@ -48,7 +48,8 @@ def apkpure_dl(apk, appname, version, hard_version, session, present_vers, flag)
|
|||
if not hard_version:
|
||||
apkpure_version = apkpure_best_match(version, soup)
|
||||
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
|
||||
try:
|
||||
if present_vers[apk] == version and flag != 'force' and os.path.isfile(apk+'.apk'):
|
||||
|
@ -81,7 +82,6 @@ def apkpure_dl(apk, appname, version, hard_version, session, present_vers, flag)
|
|||
print(" Done!")
|
||||
|
||||
|
||||
|
||||
# Download apk files, if needed
|
||||
def get_apks(appstate):
|
||||
present_vers = appstate['present_vers']
|
||||
|
@ -118,7 +118,7 @@ def get_apks(appstate):
|
|||
print(f"Checking {pretty_name}...")
|
||||
try:
|
||||
required_ver = build_config[app]['version']
|
||||
required_ver[0]
|
||||
required_ver = Version(required_ver)
|
||||
hard_version = True
|
||||
print(f"Using version {required_ver} of {app} from build_config.")
|
||||
except:
|
||||
|
@ -129,7 +129,7 @@ def get_apks(appstate):
|
|||
if pkg['name'] == apk:
|
||||
try:
|
||||
compatible_vers.append(pkg['versions'][-1])
|
||||
except IndexError:
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
if not compatible_vers:
|
||||
|
|
Loading…
Reference in a new issue