mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-26 12:48:36 -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:
|
if not hard_version:
|
||||||
apkpure_version = apkpure_best_match(version, soup)
|
apkpure_version = apkpure_best_match(version, soup)
|
||||||
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:
|
try:
|
||||||
if present_vers[apk] == version and flag != 'force' and os.path.isfile(apk+'.apk'):
|
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!")
|
print(" Done!")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Download apk files, if needed
|
# Download apk files, if needed
|
||||||
def get_apks(appstate):
|
def get_apks(appstate):
|
||||||
present_vers = appstate['present_vers']
|
present_vers = appstate['present_vers']
|
||||||
|
@ -118,7 +118,7 @@ def get_apks(appstate):
|
||||||
print(f"Checking {pretty_name}...")
|
print(f"Checking {pretty_name}...")
|
||||||
try:
|
try:
|
||||||
required_ver = build_config[app]['version']
|
required_ver = build_config[app]['version']
|
||||||
required_ver[0]
|
required_ver = Version(required_ver)
|
||||||
hard_version = True
|
hard_version = True
|
||||||
print(f"Using version {required_ver} of {app} from build_config.")
|
print(f"Using version {required_ver} of {app} from build_config.")
|
||||||
except:
|
except:
|
||||||
|
@ -129,7 +129,7 @@ def get_apks(appstate):
|
||||||
if pkg['name'] == apk:
|
if pkg['name'] == apk:
|
||||||
try:
|
try:
|
||||||
compatible_vers.append(pkg['versions'][-1])
|
compatible_vers.append(pkg['versions'][-1])
|
||||||
except IndexError:
|
except TypeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not compatible_vers:
|
if not compatible_vers:
|
||||||
|
|
Loading…
Reference in a new issue