mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-08 18:31:07 +03:00
create_metadata: do not skip APK files having no name
This commit is contained in:
parent
b29fcde16b
commit
2c8bacde42
1 changed files with 7 additions and 5 deletions
|
@ -1718,13 +1718,15 @@ def main():
|
||||||
for apk in apks:
|
for apk in apks:
|
||||||
if apk['packageName'] not in apps:
|
if apk['packageName'] not in apps:
|
||||||
if options.create_metadata:
|
if options.create_metadata:
|
||||||
if 'name' not in apk:
|
|
||||||
logging.error(apk['packageName'] + ' does not have a name! Skipping...')
|
|
||||||
continue
|
|
||||||
with open(os.path.join('metadata', apk['packageName'] + '.yml'), 'w') as f:
|
with open(os.path.join('metadata', apk['packageName'] + '.yml'), 'w') as f:
|
||||||
app = metadata.App()
|
app = metadata.App()
|
||||||
app.Name = apk['name']
|
if 'name' in apk:
|
||||||
app.Summary = apk['name']
|
app.Name = apk['name']
|
||||||
|
app.Summary = apk['name']
|
||||||
|
else:
|
||||||
|
logging.warn(apk['packageName'] + ' does not have a name! Using package name instead.')
|
||||||
|
app.Name = apk['packageName']
|
||||||
|
app.Summary = apk['packageName']
|
||||||
app.CurrentVersionCode = 2147483647 # Java's Integer.MAX_VALUE
|
app.CurrentVersionCode = 2147483647 # Java's Integer.MAX_VALUE
|
||||||
app.Categories = [os.path.basename(os.path.dirname(os.getcwd()))]
|
app.Categories = [os.path.basename(os.path.dirname(os.getcwd()))]
|
||||||
metadata.write_yaml(f, app)
|
metadata.write_yaml(f, app)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue