chiark / gitweb /
Fixes to categories in update.py
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 2 Nov 2013 15:04:50 +0000 (16:04 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 2 Nov 2013 15:04:50 +0000 (16:04 +0100)
fdroidserver/update.py

index 85a75def80ac7df3f1a36e3eece24ed95de63391..38dcdeb7a280840bc85e18eb3086a4c091b57a7d 100644 (file)
@@ -528,12 +528,12 @@ def make_index(apps, apks, repodir, archive, categories):
                 common.description_html(app['Description'], linkres), doc, apel)
         addElement('license', app['License'], doc, apel)
         if 'Categories' in app:
-            categories = [c.strip() for c in app['Categories'].split(',')]
-            addElement('categories', ','.join(categories), doc, apel)
+            appcategories = [c.strip() for c in app['Categories'].split(',')]
+            addElement('categories', ','.join(appcategories), doc, apel)
             # We put the first (primary) category in LAST, which will have
             # the desired effect of making clients that only understand one
             # category see that one.
-            addElement('category', categories[0], doc, apel)
+            addElement('category', appcategories[0], doc, apel)
         addElement('web', app['Web Site'], doc, apel)
         addElement('source', app['Source Code'], doc, apel)
         addElement('tracker', app['Issue Tracker'], doc, apel)
@@ -731,7 +731,7 @@ def main():
     # Generate a list of categories...
     categories = []
     for app in apps:
-        cats = app['Category'].split(';')
+        cats = app['Categories'].split(',')
         for cat in cats:
             if cat not in categories:
                 categories.append(cat)