chiark / gitweb /
Fall back to launchable-activity label if application has none
authorDaniel Martí <mvdan@mvdan.cc>
Fri, 23 May 2014 07:47:11 +0000 (09:47 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 23 May 2014 07:47:11 +0000 (09:47 +0200)
This fixes apps like MiniZip not having a name

fdroidserver/update.py

index 4f9f1c82361a8937024f508fffa6590e6e1b4c02..ba3245bcc2ed5ba05b8793af46777ccd9befe63e 100644 (file)
@@ -402,6 +402,8 @@ def scan_apks(apps, apkcache, repodir, knownapks):
                         thisinfo['icons_src']['-1'] = match.group(1)
                 elif line.startswith("launchable-activity:"):
                     # Only use launchable-activity as fallback to application
+                    if not thisinfo['name']:
+                        thisinfo['name'] = re.match(label_pat, line).group(1)
                     if '-1' not in thisinfo['icons_src']:
                         match = re.match(icon_pat_nodpi, line)
                         if match: