mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-25 20:28:37 -06:00
fix: No need to get best version when already available locally
This commit is contained in:
parent
a215aa6467
commit
c770b5f821
1 changed files with 11 additions and 10 deletions
|
@ -37,16 +37,6 @@ def apkpure_dl(apk, appname, version, hard_version, session, present_vers, flag)
|
|||
res.raise_for_status()
|
||||
soup = bs(res.text, 'html.parser')
|
||||
|
||||
if not hard_version:
|
||||
apkpure_version = apkpure_best_match(version, soup)
|
||||
if version != apkpure_version:
|
||||
print(f"Required version {version} not found in APKPure, choosing version {apkpure_version} instead.")
|
||||
version=apkpure_version
|
||||
|
||||
if flag == 'checkonly' and present_vers[apk] != version:
|
||||
print(f"{apk} has an update ({present_vers[apk]} -> {version})")
|
||||
return
|
||||
|
||||
try:
|
||||
if present_vers[apk] == version and flag != 'force' and os.path.isfile(apk+'.apk'):
|
||||
print(
|
||||
|
@ -54,6 +44,17 @@ def apkpure_dl(apk, appname, version, hard_version, session, present_vers, flag)
|
|||
return
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
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.")
|
||||
version=apkpure_version
|
||||
|
||||
if flag == 'checkonly' and present_vers[apk] != version:
|
||||
print(f"{apk} has an update ({present_vers[apk]} -> {version})")
|
||||
return
|
||||
|
||||
print(f" Downloading {apk} version {version}...")
|
||||
|
||||
# Get the version code
|
||||
|
|
Loading…
Reference in a new issue