mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 15:30:28 +03:00
Merge branch 'monitor_version' into 'master'
Add needsUpdate and noUpdateCheck to update.json See merge request fdroid/fdroidserver!870
This commit is contained in:
commit
834307a9f6
1 changed files with 9 additions and 0 deletions
|
|
@ -142,6 +142,8 @@ def status_update_json(apps, apks):
|
||||||
output['disabled'] = []
|
output['disabled'] = []
|
||||||
output['failedBuilds'] = dict()
|
output['failedBuilds'] = dict()
|
||||||
output['noPackages'] = []
|
output['noPackages'] = []
|
||||||
|
output['needsUpdate'] = []
|
||||||
|
output['noUpdateCheck'] = []
|
||||||
|
|
||||||
for appid in apps:
|
for appid in apps:
|
||||||
app = apps[appid]
|
app = apps[appid]
|
||||||
|
|
@ -154,8 +156,11 @@ def status_update_json(apps, apks):
|
||||||
antiFeatures[af]['apps'].add(appid)
|
antiFeatures[af]['apps'].add(appid)
|
||||||
|
|
||||||
apklist = []
|
apklist = []
|
||||||
|
gotcurrentver = False
|
||||||
for apk in apks:
|
for apk in apks:
|
||||||
if apk['packageName'] == appid:
|
if apk['packageName'] == appid:
|
||||||
|
if str(apk['versionCode']) == app.get('CurrentVersionCode'):
|
||||||
|
gotcurrentver = True
|
||||||
apklist.append(apk)
|
apklist.append(apk)
|
||||||
validapks = 0
|
validapks = 0
|
||||||
for build in app.get('Builds', []):
|
for build in app.get('Builds', []):
|
||||||
|
|
@ -175,6 +180,10 @@ def status_update_json(apps, apks):
|
||||||
output['noPackages'].append(appid)
|
output['noPackages'].append(appid)
|
||||||
if app.get('Disabled'):
|
if app.get('Disabled'):
|
||||||
output['disabled'].append(appid)
|
output['disabled'].append(appid)
|
||||||
|
if not gotcurrentver:
|
||||||
|
output['needsUpdate'].append(appid)
|
||||||
|
if app.get('UpdateCheckMode') == 'None' and not app.get('Disabled'):
|
||||||
|
output['noUpdateCheck'].append(appid)
|
||||||
common.write_status_json(output, options.pretty)
|
common.write_status_json(output, options.pretty)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue