mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 15:30:28 +03:00
Made checkmarket2 update metadata nicely instead of hackily
This commit is contained in:
parent
160fe22edd
commit
6c475c4058
1 changed files with 3 additions and 13 deletions
|
|
@ -67,20 +67,10 @@ for app in apps:
|
||||||
print "...up to date"
|
print "...up to date"
|
||||||
else:
|
else:
|
||||||
print '...updating to version:' + version + ' vercode:' + vercode
|
print '...updating to version:' + version + ' vercode:' + vercode
|
||||||
newdata = ''
|
app['Market Version'] = version
|
||||||
|
app['Market Version Code'] = vercode
|
||||||
metafile = os.path.join('metadata', app['id'] + '.txt')
|
metafile = os.path.join('metadata', app['id'] + '.txt')
|
||||||
mf = open(metafile, 'r')
|
common.write_metadata(metafile, app)
|
||||||
for line in mf:
|
|
||||||
if line.startswith('Market Version:'):
|
|
||||||
newdata += 'Market Version:' + version + '\n'
|
|
||||||
elif line.startswith('Market Version Code:'):
|
|
||||||
newdata += 'Market Version Code:' + vercode + '\n'
|
|
||||||
else:
|
|
||||||
newdata += line
|
|
||||||
mf.close()
|
|
||||||
mf = open(metafile, 'w')
|
|
||||||
mf.write(newdata)
|
|
||||||
mf.close()
|
|
||||||
|
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue