chiark / gitweb /
make "Current Version Code" default to most recent APK
authorHans-Christoph Steiner <hans@eds.org>
Tue, 16 Feb 2016 23:11:22 +0000 (00:11 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 17 Feb 2016 09:40:07 +0000 (10:40 +0100)
closes #36 https://gitlab.com/fdroid/fdroidserver/issues/36

fdroidserver/metadata.py
fdroidserver/update.py

index dc0055f21deb310176c3e1cbfd1d02b050227c71..bc8708df4377c7889e8dbe164fe6ce1fce2fb7c3 100644 (file)
@@ -132,7 +132,7 @@ class App():
         self.UpdateCheckName = None
         self.UpdateCheckData = None
         self.CurrentVersion = ''
-        self.CurrentVersionCode = '0'
+        self.CurrentVersionCode = None
         self.NoSourceSince = ''
 
         self.id = None
index bf264121709826ae01819193432795be3d02aa21..7c5f8e286f0867ea2cf83d8fe2d3ac652303928d 100644 (file)
@@ -1284,6 +1284,8 @@ def main():
             if app.Name is None:
                 app.Name = bestapk['name']
             app.icon = bestapk['icon'] if 'icon' in bestapk else None
+            if app.CurrentVersionCode is None:
+                app.CurrentVersionCode = str(bestver)
 
     # Sort the app list by name, then the web site doesn't have to by default.
     # (we had to wait until we'd scanned the apks to do this, because mostly the