1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

rename lastupdated to lastUpdated to match fdroid client

This lets index-v1 be parsed directly into class instances because the
field/instance var names match exactly.  The original index v0 element
must retain the 'lastupdated' name for backwards compatibility.
This commit is contained in:
Hans-Christoph Steiner 2016-11-28 21:17:22 +01:00
parent 73bb2cf1ba
commit 8b85c860a6
5 changed files with 10 additions and 10 deletions

View File

@ -152,7 +152,7 @@ class App(dict):
self.builds = []
self.comments = {}
self.added = None
self.lastupdated = None
self.lastUpdated = None
def __getattr__(self, name):
if name in self:

View File

@ -115,7 +115,7 @@ def update_wiki(apps, sortedids, apks):
appid,
app.Name,
time.strftime('%Y-%m-%d', app.added) if app.added else '',
time.strftime('%Y-%m-%d', app.lastupdated) if app.lastupdated else '',
time.strftime('%Y-%m-%d', app.lastUpdated) if app.lastUpdated else '',
app.SourceCode,
app.IssueTracker,
app.WebSite,
@ -1132,8 +1132,8 @@ def make_index(apps, sortedids, apks, repodir, archive):
addElement('id', app.id, doc, apel)
if app.added:
addElement('added', time.strftime('%Y-%m-%d', app.added), doc, apel)
if app.lastupdated:
addElement('lastupdated', time.strftime('%Y-%m-%d', app.lastupdated), doc, apel)
if app.lastUpdated:
addElement('lastupdated', time.strftime('%Y-%m-%d', app.lastUpdated), doc, apel)
addElement('name', app.Name, doc, apel)
addElement('summary', app.Summary, doc, apel)
if app.icon:
@ -1612,12 +1612,12 @@ def main():
if 'added' in apk:
if not app.added or apk['added'] < app.added:
app.added = apk['added']
if not app.lastupdated or apk['added'] > app.lastupdated:
app.lastupdated = apk['added']
if not app.lastUpdated or apk['added'] > app.lastUpdated:
app.lastUpdated = apk['added']
if not app.added:
logging.debug("Don't know when " + appid + " was added")
if not app.lastupdated:
if not app.lastUpdated:
logging.debug("Don't know when " + appid + " was last updated")
if bestver == UNSET_VERSION_CODE:

View File

@ -1003,5 +1003,5 @@ comments:
build:42:
- '#RootCommands srclib needs changing on fdroidserver'
id: org.adaway
lastupdated: null
lastUpdated: null
metadatapath: metadata/org.adaway.json

View File

@ -335,5 +335,5 @@ builds:
versionName: 0.6.0
comments: {}
id: org.smssecure.smssecure
lastupdated: null
lastUpdated: null
metadatapath: metadata/org.smssecure.smssecure.txt

View File

@ -2243,5 +2243,5 @@ builds:
versionName: 1.2.6
comments: {}
id: org.videolan.vlc
lastupdated: null
lastUpdated: null
metadatapath: metadata/org.videolan.vlc.yml